1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00
Commit graph

242 commits

Author SHA1 Message Date
Dominic Clifton
8ebdb245c2 Instead of copying a profile from the master config into memory again,
just use it in-place.  This saves ~308bytes of memory.

Prior to this there were 4 profiles in ram all the time, the 3 main
profiles and a copy of one of them.

This commit was aided by a side effect of the work done to clean up the
output of the cli dump command since it is now easy to conditionally
apply the changes to the memory addressed used to read/write cli
variables.  See 8c3a869251.
2014-08-22 21:53:23 +01:00
Dominic Clifton
d0338eac19 Cleanup sonar support for Naze/Flip32/Olimexino. Add Sonar
documentation.
2014-08-13 22:01:39 +01:00
Dominic Clifton
9906294cd8 Split navigation functionality from io/gps.c into flight/navigation.c.
gps.c now only has code that deals with gps hardware, state and
messaging.
navigation.c  now only has code dealing with flight
navigation/waypoints/home/hold/etc
2014-08-07 14:23:05 +01:00
Dominic Clifton
ac61a5ae5b Fixing current meter, vbatCycleTime was not being reset and the ADC
index was wrong.

See 5cc9750d12
2014-08-06 22:12:41 +01:00
Dominic Clifton
9a9ff9b1ad Cleanup various compiler warnings that were appearing since the
additional compiler flags were added.
2014-08-01 20:02:10 +01:00
Dominic Clifton
326a10b1dc Allow autotune to be compiled in/out. 2014-08-01 01:14:23 +01:00
Dominic Clifton
5e045616fa Delete remaining LED Ring code. Please use generic WS2812 LEDs instead. 2014-08-01 00:54:30 +01:00
Dominic Clifton
125f6d1450 CJMCU - Allow various features to be compiled out to support. 2014-08-01 00:18:37 +01:00
Dominic Clifton
3b629d58a0 GPS can now be conditionally compiled in. 2014-07-30 23:35:33 +01:00
Dominic Clifton
0ac2b51c60 Make ppm/pwm input filtering configurable. 2014-07-30 22:02:34 +01:00
Dominic Clifton
596ac71861 Fixing barometer related warnings when compiling without barometer
support.
2014-07-01 18:56:43 +01:00
Dominic Clifton
2413130c0f Prevent bad data being used during early system startup. 2014-06-23 22:08:29 +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
ed3e0769cf Renamed alt_hold_throttle_neutral to alt_hold_deadband for consistency. 2014-06-21 22:40:30 +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
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
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
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
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
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
51eee3d62c Decoupling imu from config - barometer config. 2014-06-06 20:59:59 +01:00
Dominic Clifton
da73be1b2d Start decoupling imu from config. 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
Dominic Clifton
e867af8c4b Correct project name in GPL notices. 2014-06-05 00:47:47 +01:00
Dominic Clifton
d718f5b9d6 Support configuring AUX 5 to 8.
The MSP is changed in a way that might provide some backwards
compatibility.  The first 4 channels are sent/read as before followed by
the next 4 channels.

If I client ignores extra data received it should be backwards
compatible.

Clients can looks for the new capability bit which indicates the MSP
protocol supports AUX 1-8.
2014-06-04 19:50:12 +01:00
Dominic Clifton
0bbcd6570f Updated source files to include the GPL v3 notices. Include a copy of
the GPL v3.
2014-06-04 16:48:23 +01:00
Dominic Clifton
b91538b44d Actually fix the editor mishap properly this time. 2014-06-01 19:36:45 +01:00
Dominic Clifton
3e0370ff09 Updating known issues. 2014-06-01 19:29:38 +01:00
Dominic Clifton
18046013a4 Decouple sticks processing code from main mw loops.
Decouple led ring driver from non-driver code.
2014-06-01 18:36:33 +01:00
Dominic Clifton
fd0b7cdf80 Remove unused vario feature and option. Move warning led code into
statusindicator.c/h
2014-06-01 17:20:01 +01:00
Dominic Clifton
4b437e8e08 Relocate battery code to sensors directory. 2014-06-01 16:58:16 +01:00
Dominic Clifton
3f7960849a Merge remote-tracking branch 'multiwii/master'
Conflicts:
	obj/baseflight.hex
	src/main/io/serial_msp.c
	src/mw.c
	src/mw.h
2014-06-01 16:54:54 +01:00
Dominic Clifton
d19a5e7046 Cleanup project structure. Update unit test Makefile to place object
files in obj/test
2014-05-31 22:43:06 +01:00
Renamed from src/mw.c (Browse further)