Commit Graph

1529 Commits

Author SHA1 Message Date
Dominic Clifton 5a025b7164 Bump config version for LED color storage. 2015-01-22 22:58:08 +01:00
Dominic Clifton 8bdca1b38e Improve magic number use. 2015-01-22 22:57:34 +01:00
Dominic Clifton ae752217c6 Avoid static use. Causes problems when the amount of LEDs in the ring
is odd.
2015-01-22 22:56:38 +01:00
Dominic Clifton e7302a9e10 Update MSP to allow setting of LED colors. 2015-01-22 22:24:58 +01:00
St7ven ddc7a39fa2 Add support for LED thrust ring. (St7ven)
This commit includes various fixed not included in the original pull request.
2015-01-22 22:20:00 +01:00
Dominic Clifton d2536e3792 Ensure LED configuration is re-evaluated after changes to led
configuration are made via MSP.
2015-01-22 21:38:09 +01:00
Dominic Clifton a2628c59d5 Cleanup whitespace. 2015-01-22 21:36:05 +01:00
Dominic Clifton aadf6de5ae Merge branch 'ledOnOff' of https://github.com/chris-penny/cleanflight into chris-penny-ledOnOff 2015-01-22 20:10:21 +01:00
Dominic Clifton e58f2948f3 STM32F3DISCOVERY - Updating L3GD20 alignment defaults. (MJ666) 2015-01-22 19:39:36 +01:00
Dominic Clifton 9e73dca591 CC3D - Use Flex port in I2C mode unless USART3 is used. Add I2C drivers
for compass, baro and display.
2015-01-22 19:19:43 +01:00
Dominic Clifton 2c6b55bf69 Merge pull request #406 from avoid3d/throttle-correction-comment
Throttle correction comment
2015-01-22 09:44:36 +01:00
Pierre Hugo 616c40a827 Added clarifying comment and todo. 2015-01-21 19:44:01 -08:00
Pierre Hugo 29c5630957 Moved vectors, euler angles, rotation and normalization from imu to maths. 2015-01-21 19:42:06 -08:00
Pierre Hugo 919a8796e7 Switched configureIMU to consistant name. 2015-01-21 19:37:56 -08:00
Pierre Hugo ab8b5efe2c Switched initIMU to consistant name. 2015-01-21 19:36:41 -08:00
Pierre Hugo 80b78fd808 Fixed flight_imu_test after including maths. 2015-01-21 19:29:45 -08:00
Pierre Hugo d6b08f22c1 Added clarifying comments to calculateHeading body. 2015-01-21 19:28:05 -08:00
Pierre Hugo d1a1cc3f13 Added clarifying comment to calculateHeading method. 2015-01-21 19:27:46 -08:00
Pierre Hugo fcdc0af218 Clarified comments around vector rotate method. 2015-01-21 19:26:28 -08:00
Pierre Hugo 6711c56dc5 Switched to explicitly using M_PI. 2015-01-21 19:20:19 -08:00
Pierre Hugo 3e6e8f44c2 Switched to using degreesToRadians from DEG2RAD macro. 2015-01-21 19:14:31 -08:00
Pierre Hugo add0b517ed Removed unused macro RADX10. 2015-01-21 19:13:15 -08:00
Pierre Hugo c4dbe66249 Removed unused DEG2RAD macro. 2015-01-21 19:04:32 -08:00
Petr Ledvina 0fb598d9b0 blackbox - add amperageLatest logging
Raw ADC value is logged, currentMeter configuration is stored in header(as H currentMeter:<offset>,<scale>)

vbatLatest refactored to vbatLatestADC
2015-01-21 20:35:58 +01:00
Chris Penny a6409a030b LED on/off changes to ledStripEnabled flag 2015-01-21 09:54:27 +00:00
Nicholas Sherlock 6f7256242d Blackbox: Fix GPS timestamp jitter on low logging rates 2015-01-21 18:42:42 +13:00
Dominic Clifton b7850270c4 Cleanup CC3D/NAZE/OLIMEXINO ADC initialisation and PWM mapping. Fixes
#297.
2015-01-21 01:06:16 +01:00
Dominic Clifton e31b6e3e75 Merge pull request #261 from ledvinap/fix-adc
Fix ADC clock speed to be within specification
2015-01-21 00:00:46 +01:00
Dominic Clifton 1a2ee0e5b9 Merge branch 'LSM303DLHC_compass_new' of https://github.com/MJ666/cleanflight into MJ666-LSM303DLHC_compass_new
Conflicts:
	src/main/target/STM32F3DISCOVERY/target.h
2015-01-20 23:54:35 +01:00
Chris Penny bfa79ab010 changed ledStripIsOnFlag to ledStripEnabled and ledStripEnabled fail check 2015-01-20 22:43:32 +00:00
Dominic Clifton 650389afb6 Disable ADC initialisation on CJMCU. Replace MASSIVEF3 with SPRACINGF3.
Conditional VCP code inclusion.  Other minor F1/F3 cleanups.
2015-01-20 23:33:03 +01:00
Michael Jakob 24b1e9f49e Add LSM303DLHC compass support using HMC5883L driver 2015-01-20 23:28:42 +01:00
Dominic Clifton f825f15a9f Cleanup warnings in accgyro_l3gd20.
This file needs some cleanup since it also does SPI initialisation and
that should be moved out.
2015-01-20 22:02:12 +01:00
Dominic Clifton 42aac00b87 Cleanup warnings in sound_beeper_stm32f30x.c when no beeper is
available.
2015-01-20 21:58:37 +01:00
Dominic Clifton 4bf1d9cf51 Cleanup warnings in serial_usb_vcp.c 2015-01-20 21:53:18 +01:00
Chris Penny bfdb4d7564 removed commented out code 2015-01-20 20:27:37 +00:00
Chris Penny aede4037cf LED on/off add via LEDLOW mode 2015-01-20 19:51:07 +00:00
Chris Penny 0da650b5bd changed rc mode to BOXLEDLOW 2015-01-20 10:45:10 +00:00
chris-penny 48bd7c1e19 I hope this is along the right lines... I have it running on NAZE32 ACRO
it is using the BOXLLIGHTS at the moment but I'll update it to use
BOXLEDLOW asap
2015-01-19 22:53:02 +00:00
Ben Hitchcock 82161882bb Bugfix for situations where Rx mapping is being used, and failsafe is kicking in unecessarily. An example is when a GPS is being used on UART2 (Rx pin 4), with the mapping of AET4R123. This code prevents failsafe being triggered by GPS data on Rx pin 4. 2015-01-17 22:29:06 +08:00
Dominic Clifton d72983e150 Bump version numbers for release. 2015-01-16 12:38:44 +00:00
tracernz a81fad9cc2 Add virtual current sensor documentation
..and remove a couple of defines I didn't use.
2015-01-16 23:07:06 +13:00
tracernz a37c6ee9ee Merge https://github.com/cleanflight/cleanflight into virtualcurrent 2015-01-16 22:03:53 +13:00
tracernz 999f0ce002 Add virtual current sensor support
Virtual current sensor calculates an estimate of current based on
throttle position, current_meter_scale, and current_meter_offset.
Documentation to follow later.
2015-01-16 22:00:45 +13:00
Dominic Clifton b64c71264c Renaming getRcStickPosition to getRcStickDeflection and moving to
rc_controls.c.
2015-01-16 01:00:40 +00:00
Dominic Clifton b7462c0b3d Merge pull request #351 from nebbian/baseflight-pid-horizon-mode-tuneup_a
Baseflight pid (pid_controller=2) horizon mode tuneup
2015-01-16 00:50:12 +00:00
Dominic Clifton eceace7f08 Merge pull request #354 from sherlockflight/master
Add blackbox logging for AutoTune events
2015-01-16 00:47:43 +00:00
Dominic Clifton d8fa662446 Shorten SBus frame timeout. Fixes #361.
See 5401092afa.
2015-01-16 00:42:15 +00:00
Dominic Clifton 8caff86006 Update MSP_SET_LED_STRIP_CONFIG. Each LED must be sent one at a time
since sending 32 leds needs a packet larger than the MSP receiver buffer
allows.
2015-01-16 00:09:02 +00:00
Dominic Clifton 5de6fee787 Minor const correctness. 2015-01-15 23:48:27 +00:00
Nicholas Sherlock a61f7eeddf Clean shutdown of blackbox (allows us to write "log completed" event) 2015-01-16 10:52:35 +13:00
Nicholas Sherlock 0b424b00c4 Merge remote-tracking branch 'upstream/master' 2015-01-16 10:50:10 +13:00
Stefan Grufman 0a3a8667d1 Merge branch 'master' into xbus_jr01 2015-01-15 20:15:36 +01:00
Dominic Clifton ad65722f0e Code size reduction when led animation is disabled. 2015-01-15 16:53:14 +00:00
Dominic Clifton 947bb0d918 Minor code size reduction. Adding some const correctness. 2015-01-15 10:48:54 +00:00
Dominic Clifton 30b928c0bc Cleanup unit test compiler flags. Fix compiler warnings in unit test
and related code.
2015-01-14 15:09:29 +00:00
Dominic Clifton bf88696847 Update unit tests to correctly use C/C++ where appropriate. Cleanup
makefile by using additional whitespace.
2015-01-14 14:24:34 +00:00
Nicholas Sherlock cf37c5247f Merge remote-tracking branch 'upstream/master' 2015-01-14 15:44:35 +13:00
Nicholas Sherlock b893e457f1 Don't break the blackbox stream when PIDs change in-flight 2015-01-14 15:42:38 +13:00
Nicholas Sherlock 2b1e8c12fc Add Blackbox logging for autotune events 2015-01-14 15:14:25 +13:00
Nicholas Sherlock f7a9a628b6 Add logging for GPS ground course (heading) 2015-01-14 11:46:53 +13:00
Dominic Clifton b6ac9204d3 STM32F3 - Fix LED Strip hardware initialisation. 2015-01-12 22:02:10 +00:00
Nicholas Sherlock a43ae266f5 Transmit blackbox header slower on faster looptimes to avoid errors 2015-01-11 14:36:05 +13:00
Dominic Clifton 5d8e39f2d9 SPARKY - Add LED STRIP support.
Update PWM mapping to avoid PWM/LedStrip clash on Motor output pin 5.
2015-01-11 00:24:57 +00:00
Dominic Clifton 5a07194d62 LedStrip - Fix missing GPIO Output type configuration. 2015-01-11 00:24:52 +00:00
Dominic Clifton 3e6646ec45 STM32F3 - Fix LED Strip timer initialisation. 2015-01-10 22:54:04 +00:00
Joel Fuster f5afb74126 motorCount needs to be global 2015-01-10 14:33:52 -05:00
Joel Fuster 09862aed78 Merge with upstream 2015-01-10 14:31:34 -05:00
Joel Fuster a81d686a84 Merge branch 'master' of https://github.com/cleanflight/cleanflight 2015-01-10 14:27:19 -05:00
Petr Ledvina 6b5f1fc38b fix index overflow in channel mapping 2015-01-09 10:52:46 +01:00
Dominic Clifton ce49dcee31 Bump MSP api version. Ensure the the number of LEDs in the
MSP_SET_LED_STRIP_CONFIG packet is validated.
2015-01-08 23:19:57 +00:00
Dominic Clifton 9729c59cb0 Fix MSP_LED_STRIP_CONFIG length. 2015-01-08 22:47:28 +00:00
Dominic Clifton e3f0cc143b Bump version to 1.5.0 2015-01-08 19:01:21 +00:00
Dominic Clifton fd86014308 Update RX_MSP to support 18 channels. Fix MSP_SET_RAW_RC / channel
mapping problem.
2015-01-08 09:03:57 +00:00
Dominic Clifton 1ef76f2f3f Exclude GPS features from blackbox for targets without GPS. 2015-01-08 04:42:40 +00:00
Dominic Clifton 801548bedb Fix line endings. 2015-01-08 01:23:48 +00:00
Dominic Clifton 53faaff63c Add CJMCU revision detection. Use LEDs to indicate Spektrum binding
activity.
2015-01-08 01:19:25 +00:00
Dominic Clifton a981ac5103 Replace some tabs with spaces. 2015-01-07 23:04:29 +00:00
Dominic Clifton 83a5c319b5 CJMCU - Add support for LED2. Swap usage of LED0 and LED1.
Currently the LED2 (blue) is just enabled after the main board
initialisation is complete and then it stays on.
2015-01-07 23:02:05 +00:00
Ben Hitchcock 22afc54228 Removing misplaced function definition 2015-01-07 22:04:21 +08:00
Ben Hitchcock 69d94c81e1 Second draft of the tuneup.
This uses ints for the sensitivity instead of mapping floats back and forth.
 Also the stick position is read directly, without the RC_Rate affecting this value.
2015-01-07 21:54:13 +08:00
Joel Fuster 62147736b2 Remove unnecessary cast 2015-01-06 20:26:09 -05:00
Dominic Clifton 31817e612e Adding blackbox support to other targets. 2015-01-06 22:41:56 +00:00
Dominic Clifton fcbda7ec63 Merge pull request #227 from sherlockflight/master
Add blackbox flight data recorder feature
2015-01-06 21:56:49 +00:00
Ben Hitchcock 6b7c9facd3 First draft of better horizon mode 2015-01-06 21:53:23 +08:00
Pierre-A 92ca14a419 Correction of bug issue#312 2015-01-05 10:40:25 +01:00
Joel Fuster 6abd6297df Merge branch 'master' of https://github.com/cleanflight/cleanflight 2015-01-04 22:34:23 -05:00
Joel Fuster fd71e1ee93 Limit UT changes to those mixer-related 2015-01-04 22:32:11 -05:00
Joel Fuster c853f20d75 Disable mixer debug 2015-01-04 22:25:13 -05:00
Joel Fuster 06ce23951b Rename freq parameter; remove UT warnings 2015-01-04 22:15:09 -05:00
Joel Fuster dc3271255c More unit tests 2015-01-04 22:10:20 -05:00
Joel Fuster de7fa3f31a Fixed point passes initial unit test 2015-01-04 21:11:40 -05:00
Joel Fuster 11a9725605 Fixed point passes initial unit test 2015-01-04 21:11:28 -05:00
Nicholas Sherlock a0f3ee6315 Fix signed comparison warning 2015-01-05 10:28:15 +13:00
Nicholas Sherlock 6c2ce5038c Merge remote-tracking branch 'upstream/master' 2015-01-04 10:35:59 +13:00
Joel Fuster fc218ebebc Merge in benchmark changes 2015-01-03 15:01:47 -05:00
Joel Fuster 596da65a87 Interim dev checkin 2015-01-03 14:56:50 -05:00
Joel Fuster d019fa181d time filter execution 2015-01-03 13:10:05 -05:00
Joel Fuster 64a78f82f8 Interim checkin 2015-01-03 12:25:46 -05:00
Stefan Grufman bf3aca8240 Merge branch 'master' into xbus_jr01
Conflicts:
	src/main/io/serial.c
2015-01-03 17:23:21 +01:00
Dominic Clifton 5c83ba0b19 Use indentation and whitespace to improve readability. 2015-01-03 13:48:41 +00:00
Joel Fuster 20ab61479e Merge remote-tracking branch 'upstream/master' 2015-01-02 20:10:04 -05:00
Joel Fuster ad7ec4b915 Back out notch filter changes 2015-01-02 20:03:33 -05:00
Dominic Clifton 73e82b8446 Adding new (private) MSP commands for configurating serial port
scenarios and baud rates.
2015-01-03 00:54:24 +00:00
Joel Fuster 654c614380 Fix rounding; drive unused servos 2015-01-02 17:47:00 -05:00
Joel Fuster 4bcedab3e9 Clean up lowpass patch 2015-01-02 17:16:55 -05:00
Joel Fuster 0043fb4b12 Remove unneded notch filter table 2015-01-02 17:01:01 -05:00
Joel Fuster a3cc92347b Lowpass filter tested 2015-01-02 16:59:42 -05:00
Dominic Clifton 98b258e83f Ensure that rcRate great than 1.0 doesn't cause stability issues when
aircraft is inverted.  See #281.
2015-01-02 19:20:30 +00:00
Dominic Clifton 98343af7a2 Break MSP_API_VERSION into smaller more specific commands. Bump MSP API
version to 1.1.  Set FC version to 1.4 to match next release.
2015-01-02 18:31:51 +00:00
Joel Fuster 3eee9eb079 Lowpass testing 2015-01-01 19:24:35 -05:00
Joel Fuster c5b822ecf1 Fix permissions 2015-01-01 17:08:14 -05:00
Joel Fuster cf40e3231a Add configuration of notch filter
More fine-grained filter freqs
2015-01-01 15:03:40 -05:00
Joel Fuster ceb4690bef Servo filtering test 2015-01-01 11:56:56 -05:00
Joel Fuster a9020d7b51 Servo filtering test 2015-01-01 11:56:41 -05:00
Nicholas Sherlock 3ef83389e9 Fix bug intoduced in 0.1.6 which truncated the header in recorded logs 2014-12-30 20:12:30 +13:00
Nicholas Sherlock 8435989dc1 Logging of P interval was missing for some reason 2014-12-30 16:35:54 +13:00
Nicholas Sherlock 566bd561dc Beep as logging begins to use as a synchronisation point for video 2014-12-29 01:41:13 +13:00
Nicholas Sherlock fcda0db127 Merge remote-tracking branch 'upstream/master' 2014-12-28 21:07:34 +13:00
Dominic Clifton 10d507ccc6 LedStrip failsafe warning now correctly checks that the feature is
enabled.
2014-12-28 00:49:57 +00:00
Dominic Clifton 5401092afa Improve SBus code. Fix SBus Failsafe detection, tested with FrSky X8R
and X4RSB.  Check for end-byte to improve robustness.

Less logic.  Better definition of frame structure eliminates the '-1's.
2014-12-28 00:49:56 +00:00
Stefan Grufman d3b21f8e36 Messed up the numbers, now changed to correct RJ01. 2014-12-27 14:52:06 +01:00
Stefan Grufman e8e53ab7f1 Added initial suport for Align JR01 DMSS (i.e. satellite receiver for JR systems) support. 2014-12-27 14:01:40 +01:00
Nicholas Sherlock 321fc717ab Merge remote-tracking branch 'upstream/master' 2014-12-27 20:00:45 +13:00
Nicholas Sherlock 421ac3d0f7 Only log VBAT if that feature is turned on 2014-12-27 19:35:28 +13:00
Nicholas Sherlock d195880bb8 Support logging Vbat, baro, mag
Don't bother logging PID "D" results if the corresponding D setting is
zero
2014-12-27 19:17:44 +13:00
Michael Jakob 1ea0fec58f AlienWii32 fix FEATURE_FAILSAFE 2014-12-27 01:08:13 +01:00
Dominic Clifton 347b156727 Avoid calling mwDisarm() when due to having auto_disarm_delay when using
switch to arm().
2014-12-26 20:22:13 +00:00
Dominic Clifton c0dbde0318 Fix unable to arm using after setting mode range for arm and being able
to arm using sticks after removing all mode ranges for arm.
2014-12-26 20:04:17 +00:00
Dominic Clifton bbf9e6db23 Rename disarmTime to disarmAt for clarity. 2014-12-26 20:02:10 +00:00
Dominic Clifton 84b197d5f8 Merge branch 'feature-autodisarm' of https://github.com/ledvinap/cleanflight into ledvinap-feature-autodisarm 2014-12-26 19:01:24 +00:00
Dominic Clifton abe4fbbaae Merge branch 'PWM_mapping' of https://github.com/MJ666/cleanflight into MJ666-PWM_mapping
Conflicts:
	src/main/main.c
2014-12-26 18:51:40 +00:00
Dominic Clifton 996d72eee5 Merge branch 'AlienWii32_defaults' of
https://github.com/MJ666/cleanflight into MJ666-AlienWii32_defaults

Conflicts:
	src/main/target/NAZE/target.h
2014-12-26 18:40:01 +00:00
Dominic Clifton e7cac196a1 Prevent MSP from hogging the CPU. 2014-12-26 18:06:27 +00:00
Petr Ledvina 6888de5192 Fix ADC clock speed to be within specification
ADC clock speed may be slightly higher, but there is no benefit in current code
2014-12-26 17:16:05 +01:00
Dominic Clifton 916aa60254 STM32F3 - Support hardware serial inversion.
Tested on the Sparky board with an FrSky X4RSB without external hardware
inverter.
2014-12-26 12:16:24 +00:00
Nicholas Sherlock ff9dad067c Give access to raw battery ADC readings for blackbox 2014-12-26 19:00:09 +13:00
Dominic Clifton 8656344394 EUSTM32F103RB - Support MPU9150 breakout board alignment. 2014-12-26 01:42:00 +00:00
Dominic Clifton 4a763ba638 STM32F3Discovery - Prefer MPU6050 ACC over onboard ACC. 2014-12-26 01:20:14 +00:00
Dominic Clifton 451ee4ab2b Move sensor alignment defaults into target.h files. 2014-12-26 01:19:58 +00:00
Dominic Clifton 78bb6b52e2 STM32F3 - Fix failing multi-byte reads on the AK8975. 2014-12-26 01:19:41 +00:00
Dominic Clifton 5805782584 Cleanup MPU9150 & AK8975 support.
Conflicts:

	src/main/drivers/compass_ak8975.c
2014-12-26 01:19:14 +00:00
Nicholas Sherlock 5a51ca8d62 Update references for renamed mixer constants 2014-12-26 12:06:13 +13:00
Nicholas Sherlock dfd8e5b2b0 Merge branch 'master' of https://github.com/cleanflight/cleanflight 2014-12-26 11:56:00 +13:00
Dominic Clifton 36c0b6f106 Cleanup MPU9150 support. 2014-12-24 23:53:17 +00:00
Dominic Clifton e9c07675be Add MPU9150 support to STMF3Discovery. Use 7-bit I2C addressing on
STM32F30x.
2014-12-24 21:11:22 +00:00
Dominic Clifton 5e573c4071 Minor mixup cleanups. 2014-12-24 14:52:58 +00:00
Dominic Clifton ee19c1f071 Rename multiType to mixerMode. Rename MULTITYPE_* to MIXER_*.
'Type' is a noise word.

'Multi' is a mis-nomer - there is nothing 'multi' about a gimbal or
fixed wing.
2014-12-24 11:58:57 +00:00
Dominic Clifton b123b4ef03 Cleanup disabling of mixers for CJMCU, this might be usefulfor the
AlienWii32 target too.

Deleted old out of date comments.  Various other minor cleanups.
2014-12-24 11:33:14 +00:00
Dominic Clifton db14bd80cb Cleanup sonar driver
* spend less time in interrupt handler.
* avoid pointer usage to prevent the inclination adjusted reading being
replaced by the interrupt handler's calculation.
* only calculate the actual distance based on the measurement when
required.
2014-12-24 01:31:50 +00:00
Dominic Clifton bd29298197 Fix being unable to configure mixer via GUI. 2014-12-23 19:37:39 +00:00
Dominic Clifton e9bc6c9353 Merge pull request #224 from GruffyPuffy/xbus
Added initial version of JRPropo XBUS Mode B support.
2014-12-23 12:08:23 +00:00
Petr Ledvina eea8f90595 auto-disarm implementation, slight rewrite of HFMan commit 931478054e70cd6a51916ea9430f041f61b7f7ba
Added automatic disarm after 5 seconds when feature MOTOR_STOP is enabled (has no effect on
FIXED_WING configurations.)  Users that don't have a buzzer to warn when
board is armed and use feature MOTOR_STOP can forget to disarm the
board. For example after landing they pick up copter and then
accidentally move throttle up when trying to remove flight battery.

Configurable via CLI using 'set auto_disarm_board=x' where x is 0-60
seconds.  If zero, does not auto_disarm.
2014-12-22 14:39:50 +01:00
Nicholas Sherlock 2889f5904e Update includes to add new required headers 2014-12-22 23:42:28 +13:00
Nicholas Sherlock 1b1a285b4a Syncing with Cleanflight upstream 2014-12-22 23:23:26 +13:00
Dominic Clifton 183c5f8e16 Add MPU9150 mag support and mag autodetection. Add AK8975 mag driver.
Note: not working on the sparky, MPU9150 needs passthough enabling but
when enabled the mag and gyro won't ack on the default addresses.  Needs
further investigation.
2014-12-21 23:40:48 +00:00
Dominic Clifton 13305dd2e4 Disable mixer configuration on CJMCU to save flash size. 2014-12-21 23:40:48 +00:00
Stefan Grufman 19bfabbce4 Changed name of define to better name. 2014-12-21 22:13:23 +01:00
Stefan Grufman 981adf51d9 Cleanup for coding standard. 2014-12-21 17:01:14 +01:00
Dominic Clifton d605ded161 Adding ATAIL support.
See https://github.com/multiwii/baseflight/pull/192
2014-12-21 14:58:46 +00:00
Dominic Clifton 705e64d91e Fix continuous beeping when rate profile selection is used. 2014-12-20 09:58:41 +00:00
Nicholas Sherlock 9b9474250e Header definitions now provided by a struct instead of lots of strings
Introduce mechanism for disabling log fields at logging-start
Remove a div/mod from handleBlackbox()
Bring code required to be executed upon state transitions into a central
setState() routine.
2014-12-20 16:51:38 +13:00
Dominic Clifton ec5929d278 Add MSP_BUILDINFO. 2014-12-20 02:57:02 +00:00
Dominic Clifton df61d9a7eb Support GPS Provider and SBAS mod in MSP_MISC. 2014-12-20 02:22:51 +00:00
Dominic Clifton a48a848890 Fix CRC errors in msp responses caused by double calling of
headSerialReply().  Ensure system is not reset while MSP response is
being transmitted.
2014-12-19 23:47:58 +00:00
Dominic Clifton 5b2659c92c Implement MSP_CONFIG and MSP_SET_CONFIG for backwards compatibility for
configurator.
2014-12-19 22:56:56 +00:00
Dominic Clifton 367eb79bd0 Add battery warning beeper. Update MSP_MISC/MSP_SET_MISC.
Note the old beeper was essentially 'battery critical'.
2014-12-19 22:16:47 +00:00
Nicholas Sherlock 50c81aa00e Make tag8_4S16 encoding more space efficent.
This replaces the older encoding variant, so the data version number has
been bumped.
2014-12-19 02:06:44 +13:00
Nicholas Sherlock 54ead59791 Rename axisP to less-cryptic axisPID_P (same for I and D) 2014-12-19 00:24:51 +13:00
Nicholas Sherlock cdb3cc0dd3 Whitespace 2014-12-18 18:47:13 +13:00
Nicholas Sherlock 0ed47d5e6d Use spaces instead of tabs 2014-12-18 18:42:22 +13:00
Nicholas Sherlock c85a172370 Merge remote-tracking branch 'upstream/master' 2014-12-18 18:17:59 +13:00
Nicholas Sherlock 5aa8e61c6e Be defensive and don't mod by zero if denominator somehow gets set to
zero
2014-12-18 17:39:09 +13:00
Dominic Clifton 78d4f24ad2 Various cleanups for Spektrum binding support. 2014-12-18 00:50:30 +00:00
Dominic Clifton 8b59e03ea3 Add SPEKTRIM_BIND support to SPARKY and EUSTM32F103RC targets. 2014-12-17 23:15:35 +00:00
Dominic Clifton 19525fdd3c Removing unnecessary comment. 2014-12-17 23:15:34 +00:00
Dominic Clifton ca7991d532 Update MSP_RX_CONFIG to include the ability to confugure spektrum
satellite binding.
2014-12-17 23:15:33 +00:00
Michael Jakob 8d1cfe633e Implement softreset detection for STM32F3xx based targets
Function still needs to be tested on target hardware
2014-12-17 23:15:33 +00:00
Michael Jakob 1be3e8e550 Added detection of soft reset and swich of bind mode
after first hard reset (power on) if hardware bind plug is not
configured. Now completly tested.
2014-12-17 23:15:32 +00:00
Michael Jakob c09877e5b9 Fix spelling errors in comments 2014-12-17 23:15:31 +00:00
Michael Jakob 7b2c3be563 Remove softreset detection to make it more simple
User needs to reset spektrum_sat_bind manualy after binding the
sattelite receiver and the hardware bind plug is not present.
2014-12-17 23:15:31 +00:00
Michael Jakob 97523e832c Enable Spektrum bind for CJMCU, CC3D, NAZE32PRO targets 2014-12-17 23:15:30 +00:00
Michael Jakob 1766857da6 Spectrum bind code to be more geenic
Actualy only activated for the NAZE taget for USART2

#define SPEKTRUM_BIND
#define BIND_PORT  GPIOA
#define BIND_PIN   Pin_3

This is to activate the Hardware bind pug feature
#define HARDWARE_BIND_PLUG
#define BINDPLUG_PORT  GPIOB
#define BINDPLUG_PIN   Pin_5

can now be easyly added and configured for other tagets after testing.
2014-12-17 23:15:28 +00:00
Michael Jakob 3aaaa3f9f5 Updates and fixes
fix FEATURE_RX_SERIAL
Delay for the hardware bind plug
Bind code will only work on default NAZE serial port (document
limitation)
2014-12-17 23:15:28 +00:00
Michael Jakob c80090f39f Spektrum Satelitte bind code ported from Baseflight
includes support for a hardware bind plug (PB5 pin 41)
Activate via OPTIONS="HARDWARE_BIND_PLUG" during make
2014-12-17 23:15:27 +00:00
Dominic Clifton dd54a59991 Fix compilation on EUSTM32F103RC target. 2014-12-17 23:14:56 +00:00
Nicholas Sherlock ce5d64f653 Firmware version 0.1.4
Add ability to reduce recorded data rate
Update struct names to conform to code style guidelines
2014-12-17 17:16:17 +13:00
Stefan Grufman 67cce3b9a0 Cleanup of code (whitespaces/defines etc). Added initial text for docs about XBus and its configurations. 2014-12-16 18:36:43 +01:00
Dominic Clifton 101f2aa8c2 DISPLAY - Only show GPS page when using GPS passthrough. 2014-12-16 00:17:56 +00:00
Stefan Grufman 509f73853d Added initial version of JRPropo XBUS Mode B support. 2014-12-15 22:15:47 +01:00
Dominic Clifton 19ea3a60fd GPS - cleanup and fix home/hold mode transitioning. 2014-12-15 11:53:59 +00:00
Michael Jakob 64c5cda1f7 Remove include from pwm_mapping.c (not needed) 2014-12-15 11:00:04 +01:00
Michael Jakob 4b0d5e7e15 Use same PWM mapping for PPM and Serial RX
Without this fix an Octocopter with serialh RX will not work. Standard
 receiver mapping with only 6 motors outputs will apply.
2014-12-15 07:46:47 +01:00
Dominic Clifton c595bf8fd4 GPS - Fix build for non-GPS enabled targets. 2014-12-14 23:55:31 +00:00
Dominic Clifton 00d0e30981 Update GPS PH and Navigation defaults.
These come from the multiwii codebase and were tested by stronnag.

See
https://code.google.com/p/multiwii/source/browse/trunk/MultiWii_shared/MultiWii.h#187
2014-12-14 23:52:23 +00:00
Michael Jakob 2499e39e5a Add custom mixer configuration for AllienWii32
The preconfigured custom mixer allows clean cabling for Octocopter
builds with the AlienWii32 board
2014-12-14 22:11:12 +01:00
Dominic Clifton d8b5f6c60c GPS - Add satellite strength bargraphs to OLED display. 2014-12-13 21:58:54 +00:00
Dominic Clifton e8dbb77db5 UART1 - Fix interrupt race condition which resulted in UART randomly
stopping transmission of data.
2014-12-13 19:45:02 +00:00
Dominic Clifton 9cc7a5aab1 DISPLAY - Skip GPS page if GPS is not enabled. 2014-12-13 19:40:19 +00:00
Dominic Clifton 9bcc0acd18 DISPLAY - Only compile in GPS page if GPS is enabled. 2014-12-13 19:37:27 +00:00
Dominic Clifton f78b80fe01 GPS - Update UBOX auto-configure to use Pedestrian navigation mode.
"Applications with low acceleration and speed, e.g. how a pedestrian
would move. Low acceleration assumed. MAX Altitude [m]: 9000, MAX
Velocity [m/s]: 30, MAX Vertical Velocity [m/s]: 20, Sanity check type:
Altitude and Velocity, Max Position Deviation: Small"
2014-12-13 18:16:03 +00:00
Dominic Clifton ea9633f2b1 Minor usart code readability improvement. 2014-12-13 18:05:22 +00:00
Dominic Clifton 119542a218 Avoid use of calls to the display when display not supported by the
target.
2014-12-13 12:08:13 +00:00
Dominic Clifton 6d1b0cec40 USART fixes based on feedback from @ledvinap. 2014-12-13 11:38:01 +00:00
Dominic Clifton ce6582b88a GPS - remove temporary hack for fixing the OLED page to the GPS page.
Fix incorrect flag usage.
2014-12-13 03:45:39 +00:00
Dominic Clifton 9b81dea320 Fix USART total bytes waiting when tx/rx buffer sizes are not equal.
Avoid using % operator.  Allow buffer sizes that are not powers of two.
2014-12-13 03:29:24 +00:00
Dominic Clifton 27ae6fdb72 GPS - move debug code for gps OLED page around. 2014-12-13 02:19:49 +00:00
Dominic Clifton ff9806e7a8 GPS - send UBlox SVINFO only once every 5 cycles (1hz) to reduce load on
the FC.
2014-12-13 02:15:53 +00:00
Dominic Clifton 62134057f0 GPS - handling incoming data as soon as possible to avoid observed GPS
packet loss.
2014-12-13 01:45:48 +00:00
Dominic Clifton 31ba3b7c94 SPARKY - Support GPS.
GPS tested on USART1 concurrently with SUMD on USART2, MSP on USART2 and
MSP on USB.  All working as expected.
2014-12-13 01:44:47 +00:00
Dominic Clifton 1c8416db2c GPS - handle data loss occurs in the start of a UBLOX frame 2014-12-13 01:42:35 +00:00
Dominic Clifton 20f32d632c GPS - differenciate between timeouts and crc errors. Improve packet
logging.  Cleanup UBLOX packet parsing.
2014-12-12 18:26:38 +00:00
Dominic Clifton 6610a91ce0 Optimize uart buffer counter incrementing. 2014-12-12 18:23:40 +00:00
Dominic Clifton 39f9b799d3 GPS - quick hack to parse the received GPS data and update the OLED
display in GPS passthough mode.
2014-12-12 17:04:33 +00:00
Dominic Clifton 1d5c2fb13e GPS - fix ubox maximum packet size comparisons. Increase UBlox buffer
size to work with Glonass MSG-SVINFO packets.  Skip data from packets
that are too large to process without attempting to process a large
payout as packet data.  Ignore GPS presence check when enabling
passthrough mode so that it is possible to configure a GPS unit via the
FC without the GPS unit actually having communicated to the FC first.
2014-12-12 16:32:26 +00:00
Dominic Clifton ad9a2d2833 Update serial port irq handlers so they avoid the % operator. 2014-12-12 16:23:44 +00:00
Dominic Clifton 6ce288063e GPS - Add packet logging to the OLED display. Allow autobauding to be
enabled/disabled via cli (disabled by default now).  Fix missing rate
configuration for UBLOX SVINFO which would have resulted in missing
satallite counts.
2014-12-12 14:43:59 +00:00
Dominic Clifton 8345401ff2 GPS - Demystify some magic numbers. 2014-12-12 14:41:49 +00:00
Dominic Clifton be1367059d GPS - cleanup nagivation reset flag usage. 2014-12-11 18:02:12 +00:00
Dominic Clifton 0b23afec8e GPS - adding a fixme regarding 'ap_mode' variable. 2014-12-11 17:47:55 +00:00
Dominic Clifton 78f7a35f4f GPS - minor code readability improvements. 2014-12-11 17:20:29 +00:00
Dominic Clifton 2778ad0c5d Fix gps error counter so that it is meaningful, it was being reset each
time the gps unit was reinitialised leading users to think there were no
GPS errors.
2014-12-11 16:31:14 +00:00
Dominic Clifton 80acc39a46 GPS page on the display to aid GPS outdoor testing. 2014-12-11 15:41:18 +00:00
Dominic Clifton 237ce4ba5b Reset navigation if sat count is too low. 2014-12-11 15:40:14 +00:00
Dominic Clifton a7e128e684 SPARKY - PWM output on PWM1-10. 2014-12-10 16:26:00 +00:00
Dominic Clifton b3f74fb1a3 SPARKY - Use RX_PPM by default. 2014-12-10 15:01:54 +00:00
Dominic Clifton 6a5ed737f7 STM32F30x - Fix GPIO initialisation.
Closes #154
2014-12-10 12:48:20 +00:00
Nicholas Sherlock 5cc3ad3da7 New encoding for PID I terms which saves 2 bytes per frame 2014-12-10 15:35:36 +13:00
Dominic Clifton 334ff322f6 SPARKY - Update UART2 configuration.
UART2 RX working using SumD.
2014-12-09 16:29:59 +00:00
Dominic Clifton d34d5ceef2 STM32F30x - Allow overriding of USARTx GPIO pins from target.h.
USART1 RX/TX now working on Sparky.
2014-12-09 14:58:56 +00:00
Dominic Clifton b2529620f7 STM32F30x - Fix uart3 pinsource definitions
UART3 RX/TX working on sparky.
2014-12-09 14:39:48 +00:00
Nicholas Sherlock e492aa6a39 Add (untested) support for recording Tricopter tail servo position 2014-12-09 17:27:56 +13:00
Dominic Clifton 27b7df2996 Fix comments in system startup files. 2014-12-09 03:18:11 +00:00
Dominic Clifton 6c96b8dd86 Support the Sparky board by peabody124 - work in progress, not flight
ready.

https://github.com/TauLabs/TauLabs/wiki/Sparky

http://buildandcrash.blogspot.co.uk/2013/05/sparky-testing-and-building-no-crashing.html
2014-12-09 03:12:38 +00:00
Dominic Clifton fed6df275f Add MPU9150 driver.
This is a almost a complete clone of the 6050 - needs cleanup and
de-duplication.
2014-12-09 03:12:37 +00:00
Dominic Clifton e43348598a Whitespace cleanup. 2014-12-09 03:12:36 +00:00
Dominic Clifton 693307d51d STM32F30x - Add support for UART3 - untested. 2014-12-09 03:12:35 +00:00
Dominic Clifton a4ec81450c STM32F30x - Add support for I2C2. 2014-12-09 02:54:46 +00:00
Nicholas Sherlock 8c41772584 Add Blackbox 0.1.0 2014-12-08 22:06:57 +13:00
Dominic Clifton 0b92f74b80 Remove usage of feature() from rx driver code so that driver code does
not have a dependency on config.c.
2014-12-06 14:33:43 +00:00
Dominic Clifton 7356863939 Removing unnecessary volatile keyword. 2014-12-06 14:32:32 +00:00
Dominic Clifton 9165e11449 EUSTM32F103 - Add LED support. 2014-12-06 12:59:22 +00:00
Dominic Clifton e802e2d032 Remove usage of feature() from pwm driver code so that driver code does
not have a dependency on config.c.
2014-12-06 11:39:31 +00:00
Dominic Clifton d7e26980a8 Merge branch 'feature-oneshot125a' of https://github.com/nebbian/cleanflight into nebbian-feature-oneshot125a 2014-12-06 10:48:27 +00:00
Dominic Clifton 1cf9ea226d Remove redundant comments from timer.c. 2014-12-05 14:17:50 +00:00
Ben Hitchcock 895d215265 Tightening up code inside atomic block, and whitespace changes (tabs to spaces) 2014-12-04 06:59:27 +08:00
Ben Hitchcock 8a9e51c779 Putting overflow code inside an atomic block, and style improvement (using predefined constant instead of raw number) 2014-12-02 06:11:40 +08:00
Dominic Clifton d6012058a3 Fix sensor detection on old revision naze boards with MPU3050 (missing
#define). Fixes #134.
2014-12-01 19:38:58 +00:00
Michael Jakob ece3859f9d Add comment regarding bind plug 2014-12-01 17:30:05 +01:00
Ben Hitchcock e9aaff808e Updates to the way that timers are forced to overflow in oneshot mode.
Now the current count value is saved, and then passed to the listeners.  This _should_ mean that CC3D PPM might work this time.
2014-12-01 22:43:17 +08:00