Dominic Clifton
36990951df
Adding code to change led colors based on mode and armed state.
2014-07-02 21:53:50 +01:00
Dominic Clifton
de04acd7e1
First cut of programmatically orientation lights using an LED strip
...
configuration that defines each LED's functions, orientation and
position in a grid.
2014-07-02 20:40:26 +01:00
Dominic Clifton
af87cff18f
Fix debug output of alt-hold data, accSum was reset prior to output.
2014-07-02 18:51:27 +01:00
Dominic Clifton
af2f9a2655
Work-in-progress
2014-07-02 08:58:10 +01:00
Dominic Clifton
596ac71861
Fixing barometer related warnings when compiling without barometer
...
support.
2014-07-01 18:56:43 +01:00
Dominic Clifton
07547d35aa
Initialisation order meant that useServos was always false, the problem
...
was introduced in fd59a4cd52
.
2014-06-30 19:41:46 +01:00
Dominic Clifton
b364a0ea31
Fix initialisation of useUart2 when Parallel PWM is used. Additionally
...
we now ensure that pwm_params is initialized before use.
2014-06-30 00:22:44 +01:00
Dominic Clifton
2150fb4a08
Fixing missed multiwii scale factor accidentally removed from
...
432c43bab7
during merge.
2014-06-26 00:40:19 +01:00
Dominic Clifton
668772f1f3
Explicitly use float literals in velocity calculation.
2014-06-24 00:30:58 +01:00
Dominic Clifton
f127847bf2
Some baro cleanups to avoid using or exposing incomplete and
...
uninitialised baro data.
imu code size reduction (treym)
2014-06-24 00:14:30 +01:00
Dominic Clifton
2413130c0f
Prevent bad data being used during early system startup.
2014-06-23 22:08:29 +01:00
Dominic Clifton
e30a373c92
Disable ADC debug output and enable AltHold debugging output.
2014-06-23 22:06:17 +01:00
Dominic Clifton
91bfdf05ca
Move mw loop() code into separate methods. Cleanup related code.
...
If a given feature or mode is off the next task is not processed in the
current loop but will be processed during the next loop iteration for
simplification, this allowed the cleanup of return values in other code.
2014-06-23 00:47:45 +01:00
Dominic Clifton
8d0509dbfb
Move altitude hold code into separate files.
2014-06-21 23:57:14 +01:00
Dominic Clifton
aeca17a0a9
Extract Altitude Hold code from mw main loop into methods.
2014-06-21 23:42:11 +01:00
Dominic Clifton
9afcb20b7e
Cleanup mismatch of buzzer/beeper terminology. Beep and Beeper should
...
be used from now on.
2014-06-21 23:32:58 +01:00
Dominic Clifton
bcc7f10e26
Shorten warning beeps.
2014-06-21 23:22:29 +01:00
Dominic Clifton
ed3e0769cf
Renamed alt_hold_throttle_neutral to alt_hold_deadband for consistency.
2014-06-21 22:40:30 +01:00
Dominic Clifton
f96bdf0965
remove unnecessary variable. unroll loop for better code size.
2014-06-18 23:44:35 +01:00
Dominic Clifton
fd59a4cd52
Update mixer to use servo count from results of pwm mapping.
...
Also ensure that only aux channels for which there are available servos
are used when forwarding channels.
Removed magic number usage.
2014-06-11 19:13:40 +01:00
Dominic Clifton
1730e3dfd3
Relocated led strip user code into separate file.
...
Added documentation.
Added LED_STRIP feature, can only be enabled under certain circumstances
depending on target due to pin/timer mappings - see documentation.
2014-06-09 19:11:31 +01:00
Dominic Clifton
3c09b6a8c7
STM32F30x - Support WS2811 LEDs.
2014-06-08 15:43:00 +01:00
Dominic Clifton
5a010c6b21
Remove unnecessary includes.
2014-06-08 15:43:00 +01:00
Dominic Clifton
0e59bc7b02
Fix divide by zero error which resulted in way too many LED updates
...
being sent.
This was the root cause of the loop time increase that was seen.
2014-06-08 15:43:00 +01:00
Dominic Clifton
57cfac24ec
NAZE - Fix LED0 GPIO selection.
2014-06-08 15:43:00 +01:00
Dominic Clifton
578585db74
Extract STM32F10x specific WS2811 code into separate file, ready for
...
STM32F30x port.
2014-06-08 15:42:49 +01:00
Dominic Clifton
0861310537
Improve cycle times by avoiding an led strip update while one is still
...
in progress.
2014-06-08 12:58:21 +01:00
Dominic Clifton
b200e2cb2d
Change precedence of LED flight mode colors.
2014-06-08 12:58:20 +01:00
Dominic Clifton
8d6f48cddc
Change LED strip colors based on flight mode.
2014-06-08 12:58:20 +01:00
Dominic Clifton
32018d0310
Update turn indicators and battery led flashing to operate
...
independently.
Turn indicators now flash faster the more you're turning.
2014-06-08 12:58:19 +01:00
Dominic Clifton
bad872377b
Quickly hack up implementation of turn indicators.
...
With an LED strip length of 10, arrange the leds clockwise from 1 to 10
starting with led 1 at the north west (10:30hrs) with led 5 north east
(01:30hrs), led 6 south east and led 10 south west.
When armed or not, moving the roll stick to the left will make the leds
on the left flash, and same for right and also for pitch forwards and
backwards too.
2014-06-08 12:58:19 +01:00
Dominic Clifton
651a433718
Cleanup WS2811 code and sanitize API.
...
Removed many magic numbers.
Deduplicated code.
Removed unnecessary local variable usage.
The LED Strip is initialised to WHITE briefly on power up so that it's
possible to visually check that all LEDs are functioning correctly -
white uses each individual RGB diode and draws maximum power.
Introduced an API to allow any code to change any or all LED colors
individually. This takes a little ram since an additional buffer is
needed - 3 bytes per LED, in addition to the DMA buffer.
2014-06-08 12:58:19 +01:00
Dominic Clifton
c82754f5dc
Fix WS2811 RAM usage by using the correct types.
2014-06-08 12:58:18 +01:00
Dominic Clifton
6d13c21d49
Update the ws2811 led strip code for orientation and battery warning.
...
When armed the first half of the strip is green the second half is red.
When disarmed the strip is various shades of red.
When the battery is low the strip will flash.
2014-06-08 12:58:18 +01:00
Dominic Clifton
da52b2d67c
Hack WS2811 led strip. Proof-of-concept.
2014-06-08 12:58:18 +01:00
Dominic Clifton
ad1b7dd216
Update Olimexo to support a 10DOF board.
...
Sensors on it are: MPU6050 HMC5883L BMP085.
BMP085 not connected to GPIO pins.
2014-06-08 12:57:30 +01:00
luggi
432c43bab7
yaw improvement
...
this should stop the copter from carrying on spinning at high yaw rates.
Conflicts:
src/mw.c
2014-06-08 10:34:00 +01:00
Trey Marc
d6545efa10
do not include serial nor telemetry handler in cycletime calculation
...
Conflicts:
src/mw.c
2014-06-08 10:28:03 +01:00
Dominic Clifton
bb356057fc
Ensure battery cell detection happens after everything has powered up.
...
Previously, on the OLIMEXINO at least, initial readings are lower than
normal readings and that meant that the battery warning voltage was
incorrectly set.
2014-06-08 03:03:24 +01:00
Dominic Clifton
a8874dc499
Prevent the first 8 usages of updateBatteryVoltage/vbat from being
...
incorrect due to insufficient samples being taken.
Reduce the amount of samples from 32 to 8 but increase the delay between
samples.
2014-06-07 23:50:55 +01:00
Dominic Clifton
7505b53bdc
Remove old FIXMEs from light_ledring.c
2014-06-07 16:56:12 +01:00
Dominic Clifton
fd9d58110b
Disable unused LED ring code.
...
Although it was compiled in for the NAZE target the ledringDetect()
method is never called. Removing the feature for now too.
2014-06-07 16:53:25 +01:00
Dominic Clifton
0b9c326ffe
Complete decoupling of imu code from config.
...
The giant list of unrelated includes is now gone and the dependencies
are now clear.
2014-06-07 02:44:06 +01:00
Dominic Clifton
deda79cb14
Update unit tests to reflect new location of battery.c/h
2014-06-07 02:39:38 +01:00
Dominic Clifton
5f18926a79
Add missing include statement from
...
ab0296c991
2014-06-07 02:30:18 +01:00
Dominic Clifton
2bbbf9937d
Decoupling imu from config - acc_unarmedcal.
2014-06-07 02:27:07 +01:00
Dominic Clifton
3643c08475
Decoupling imu from config - acc deadband.
2014-06-06 21:37:41 +01:00
Dominic Clifton
51eee3d62c
Decoupling imu from config - barometer config.
2014-06-06 20:59:59 +01:00
Dominic Clifton
82bb6b7982
Decoupling imu from config - pid profile.
2014-06-06 20:45:59 +01:00
Dominic Clifton
da73be1b2d
Start decoupling imu from config.
2014-06-06 20:40:00 +01:00