Commit graph

2704 commits

Author SHA1 Message Date
dongie
009fe86833 Merge pull request #122 from treymarc/patch-7
remove unnecessary variable
2014-06-12 10:50:57 +09:00
Trey Marc
4ccf31d514 unroll loop for better code size
gcc remove 29 bytes here
2014-06-12 03:50:16 +02:00
Trey Marc
6eeb86fe68 remove unnecessary variable 2014-06-12 03:42:49 +02: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
dongie
2fef9d5fa9 Fixing gimbal_flags not working when feature SERVO_TILT was enabled. This was done by properly calculating servo offset instead of depending on enabled features/mixers. 2014-06-11 15:10:17 +09:00
dongie
ab87a99238 On second thought, no need to make inverter configurable. only sbus will use it, and the driver can set inversion automatically. 2014-06-11 14:13:45 +09:00
dongie
84729747b0 allow controlling external XOR gate connected to PB2 (BOOT1) to invert USART2_RX signal on F1. Currently used by sbus driver. 2014-06-11 12:52:03 +09:00
Dominic Clifton
51366ed629 Latest binary with WS2812 LED support and other recent changes. Test
flown.
2014-06-10 20:31:27 +01:00
Dominic Clifton
6f718757b1 Merge branch 'ws2811' 2014-06-09 19:12:37 +01:00
Dominic Clifton
eea615c0aa Update developer TODOs. 2014-06-09 19:12:08 +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
Dominic Clifton
e17048a2f6 Merge remote-tracking branch 'multiwii/master' 2014-06-08 10:37: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
dongie
e35c92b0da Merge pull request #120 from luggi/yaw
yaw improvement
2014-06-08 08:44:32 +09: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
0d3353c080 Update Olimexino shield notes. 2014-06-07 16:45:32 +01:00
luggi
20b7a9fbfb yaw improvement
this should stop the copter from carrying on spinning at high yaw rates.
2014-06-07 15:32:08 +02:00
dongie
51e7c71bb0 Merge pull request #119 from treymarc/patch-3
remove heading duplicate declaration
2014-06-07 14:30:18 +09:00
Trey Marc
e487fe2488 remove heading duplicate declaration
extern int16_t heading; duplicate declaration line 363
2014-06-07 07:26:15 +02:00
Dominic Clifton
1020e5f6de Updating readme. 2014-06-07 03:01:58 +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
5f4a464f50 Updating basflight migration instructions. 2014-06-06 21:42:28 +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
Dominic Clifton
9b6e8feeea Ensure that Lux's pid controller observes the max_angle_inclination
setting.
2014-06-06 20:40:00 +01:00
Dominic Clifton
ab0296c991 Fix bug that prevented throttle angle correction working correctly when
using different values in different.

The cause was the IMU init code which triggered calculation was never
called after switching profiles - it couldn't be called twice because it
also initialised the compass.

The solution was to decouple compass initialisation from IMU
initialisation and extract the code to recalculate throttle angle scale
to a new method.
2014-06-06 20:39:59 +01:00