1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00
Commit graph

174 commits

Author SHA1 Message Date
Dominic Clifton
b6a8e20d8c Fix reporting of flight modes broken in 3f0754d
The conversion of the flags to bitmasks meant the mask was being bitshifted instead of 1 or 0.
2014-08-24 21:31:52 +01:00
Dominic Clifton
3f0754d295 Replace global flags with stateFlags, flightModeFlags and armingFlags.
Each flag was previously a whole byte, now all of the flags only take up
4 bytes as they are represented by bit masks.

This is cleaner because the different kind of flags are now separated.

Additionally this changes the behaviour of arming slightly.  When using
a switch to arm the aircraft will not arm unless the switch has been in
the off state once.  This prevents arming if you power the aircraft with
a low throttle and the switch in the on position.
2014-08-24 12:11:30 +01:00
Dominic Clifton
1ea014ae25 Support MSP telemetry on ports marked as TELEMETRY instead of MSP, this
follows the pattern that HoTT and FrSky use.

Previously MSP telemetry was actually output on the MSP port, NOT the
telemetry port.

Baudrate for MSP telemetry currently fixed at 19200.
2014-08-23 01:14:06 +01:00
Dominic Clifton
4604403098 Merge branch 'master' into msp-on-multiple-ports
Conflicts:
	src/main/config/config.c
	src/main/io/serial_msp.c
2014-08-22 22:30:33 +01:00
Dominic Clifton
f51efaa7c0 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.
Conflicts:

	src/main/io/serial_msp.c
2014-08-22 22:05:35 +01:00
Dominic Clifton
71e7feebd9 Move 'boxes' out of ram and into flash - saves quite a bit of ram. 2014-08-22 22:01:04 +01:00
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
11a00e2697 Move 'boxes' out of ram and into flash - saves quite a bit of ram. 2014-08-22 21:05:55 +01:00
Dominic Clifton
349b20186d Comment cleanup 2014-08-18 19:09:12 +01:00
Dominic Clifton
0b353341f8 Limit MSP ports to 2 for normal usage scenarios. 2014-08-14 00:50:17 +01:00
Dominic Clifton
7453e98b3b Update serial and msp code to allow MSP on multiple ports.
Work in progress.  In testing using bluetooth on uart2 and uart1
connected to configurator it was observed that there is corrupted
responses being sent via uart2 - ez-gui shows some garbled data for the
box names.  updates appear sluggish in ez-gui but some correct data is
getting through.

Enabled with:

set serial_port_2_scenario = 8
save
2014-08-14 00:38:42 +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
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
9f1a0fcb4c Cleanup line endings. 2014-07-31 23:53:34 +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
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
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/serial_msp.c (Browse further)