Commit Graph

62 Commits

Author SHA1 Message Date
Dominic Clifton 13305dd2e4 Disable mixer configuration on CJMCU to save flash size. 2014-12-21 23:40:48 +00: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
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 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
Kyle Manna c806046181 perms: Remove execute bit on source files
* Remove the execute bit on source files.
* No functional change.
2014-11-26 10:13:29 -06:00
Dominic Clifton 28da97f894 Fix MSP/Telemetry Arm/Disarm problems.
Tested with two MSP ports, one via softserial. Both with telemetry
enabled and without telemetry enabled.
2014-11-08 11:53:01 +00:00
Dominic Clifton 2461973dd6 There was a little more fixed to do when telemetry was not eanbled.
Tested arm/disarm/arm/disarm with telemetry on and off, all working now.

See #155.
2014-11-08 01:11:10 +00:00
Dominic Clifton 903392b883 Updating comment. 2014-11-06 19:52:10 +00:00
Dominic Clifton 59698c5a37 Merge branch 'naze-updates-pb' of github.com:Pierre-A/Cleanflight into Pierre-A-naze-updates-pb 2014-11-06 19:44:39 +00:00
Dominic Clifton db36cfe12e Fix arm/disarm/arm bug when using shared msp/telemetry ports.
All msp ports are now re-initialised when disarming.

Bug wa introduced by c06fd78b83 - see
#144.

Runtime serial port scenario should not have been erased.

Fixes #144 and #155. Cleanup #125.
2014-11-05 20:23:59 +00:00
Pierre-A d545ab545f Remove profanity from comments (issue #43) 2014-11-02 14:53:57 +01:00
Dominic Clifton 0ba2933611 Add MSP_SET_ADJUSTMENT_RANGE and MSP_ADJUSTMENT_RANGES commands. 2014-11-01 10:24:32 +00:00
Dominic Clifton 28f9fa629c Add rate profiles and inflight switching between them. See Profiles and
Inflight Adjustment documentation for details.
2014-10-29 23:36:34 +00:00
Dominic Clifton 8aeee0b5fd Merge branch 'inflight-adjustments' 2014-10-24 23:12:45 +01:00
Dominic Clifton 18abad5dd7 Extract range definition so it can be reused. 2014-10-24 18:57:06 +01:00
Petr Ledvina e179218caf Trivial changes
- use inline functions for gpio (typesafe, no speed penalty)
- fix sortSerialPortFunctions (original was IMO broken)
- allow softserial port on sonar pin when FEATURE_SONAR is not enabled
- minor style changes and comments
2014-10-23 15:08:57 +02:00
Dominic Clifton 50971667d9 Fix a couple of typos in MSP guidelines. 2014-10-17 22:46:07 +01:00
Dominic Clifton 596d798732 Add MSP_API_VERSION command. Added MSP development guidelines. Define
board identifiers for all cleanflight targets.
2014-10-17 22:34:15 +01:00
Dominic Clifton 6f3aa6fb86 Add extra MSP commands to allow settings to be made via a GUI in
addition to setting via the CLI.

Note: MSP_CONFIG from baseflight
bc68d89983d762d35cc1cf5e3fa0c2cf03287b70 will not be supported because
more specific commands exist in cleanflight.

MSP_MISC and MSP_CONFIG are good examples of single responsibility
violations.
2014-10-17 01:33:47 +01:00
Dominic Clifton da51b5c479 Add MPU6500 SPI driver. Move sensor initialisation defines into target
specific headers.
2014-10-14 00:22:54 +01:00
Dominic Clifton 79c2e5648f Add MSP capability bit so clients can detect Cleanflight and use an
appropriate API.  Renumber some cleanflight specific MSP commands,
Cleanflight will use the range 32-63 for new MSP commands.
2014-10-13 22:36:00 +01:00
Dominic Clifton 59c55b4a19 Use permenant id for MSP_SET_MODE_RANGE. 2014-10-13 01:08:41 +01:00
Dominic Clifton c5280cd9d7 Ensure mode flags are correctly generated after the switch to a bitmask
for activated modes.
2014-10-13 00:53:41 +01:00
Dominic Clifton 50ba314116 Fix range check problem for first mode range index. 2014-10-12 23:43:12 +01:00
Dominic Clifton 77e83eef0c Use permenant mode ids in MSP_MODE_RANGES and MSP_SET_MODE_RANGE. 2014-10-12 21:47:39 +01:00
Dominic Clifton 2555858687 Add two new MSP commands to get ALL mode ranges and to set individual
mode ranges.
2014-10-12 21:22:05 +01:00
Dominic Clifton c0fd0c1f33 Replace profile.activate and rcOptions with
profile.modeActivationCondition and rcModeActivationMask.

Implementation of using and setting modeActivationConditions is missing.
2014-10-12 10:40:38 +01:00
Dominic Clifton 3eb8bcb3e5 Merge branch 'feature-sonar-flight-mode-no-baro' of dclifton-github.com:nebbian/cleanflight into nebbian-feature-sonar-flight-mode-no-baro
Fixed tabs, kept old references to VARIO.  Made SONAR mode a new option so that aux settings could be preserved.

Conflicts:
	src/main/config/runtime_config.h
	src/main/flight/altitudehold.h
	src/main/flight/imu.c
	src/main/io/rc_controls.h
	src/main/mw.c
	src/main/sensors/initialisation.c
2014-09-26 13:36:19 +01:00
Dominic Clifton 35280abfed Allow disabling of I2C for targets that do not use it. 2014-09-26 01:32:57 +01:00
Dominic Clifton 545980c14a Move colors from ram to master config. Initialise colors only when
config is reset to defaults.
2014-09-18 22:53:12 +01:00
Dominic Clifton 6ce5736990 Update LED strip code to allow configurable LED strips.
See documentation for details.
2014-09-15 03:15:11 +01:00
Ben Hitchcock 66fce423bb Code allowing the use of sonar without requiring a barometer.
This code has been flight tested on a Naze32 acro, with no barometer onboard.  It also works when the target doesn't have BARO defined.
2014-09-05 11:28:55 +08:00
Dominic Clifton 00a1858faa Cleanup and fix the use of permenant box ids. 2014-08-27 23:59:52 +01:00
Dominic Clifton d15b56f14e Fixing mis-reporting of armed state - missed in b6a8e20. 2014-08-26 21:24:07 +01:00
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