1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 20:10:18 +03:00
Commit graph

158 commits

Author SHA1 Message Date
Dominic Clifton
a406cb6f96 reorder aux/adjrange commands, commands must be alphabetically sorted
due to the command-lookup code.
2014-10-24 21:30:12 +01:00
Dominic Clifton
066c814a8a Update adjrange command to take an 'adjustment index/slot'. Apply
adjustment ranges to adjustment slots when channel is within range.

example:

```
adjrange 0 0 0 900 1700 0 2
adjrange 1 0 0 1700 2100 1 2
```

explained:

* configure adjrange 0 to use adjustment slot 1 (0) so that when aux1
(0) in the range 900-1700 then do nothing when aux 3 (2) is in any
position.
* configure adjrange 1 to use adjustment slot 1 (0) so that when aux1
(0) in the range 1700-2100 then do use adjustment 1 (rc rate) when aux 3
(2) is in the appropriate position.

Without the entire range of aux1 being defined there is nothing that
would stop aux 3 adjusting the rc rate once aux 1 wasn't in the higher
range. 

There are 4 adjustment slots and 12 adjustment ranges.

Adjustment slots and adjustment ranges can use the same aux channel.

e.g.

`adjrange 2 1 0 900 2100 1 3`

* configure adjrange 2 to use adjustment slot 2 (1) so that when aux4
(3) in the range 900-2100 then use adjustment 1 (rc rate) when aux 4 (3)
is in the appropriate position.
2014-10-24 20:49:00 +01:00
Dominic Clifton
bd39445be8 Add cli command to configure adjustment ranges.
e.g. `adjrange 0 0 1700 2100 1 2`

set adjustment range 0, which applies to aux channel 0 (aux1) when range
is between 1700 and 2100 then apply function 1 (rc rate) to aux channel
2 (aux3)
2014-10-24 19:51:40 +01:00
Dominic Clifton
18abad5dd7 Extract range definition so it can be reused. 2014-10-24 18:57:06 +01:00
Pierre-A
20c4dae7c2 SoftSerial port for CC3D 2014-10-19 11:20:55 +02:00
Dominic Clifton
1b47d3cbae Clean up pull request #108 from @Airmamaf. 2014-10-18 15:52:04 +01:00
Dominic Clifton
1c501272ab Merge branch 'airmamaf' of github.com:airmamaf/cleanflight into airmamaf-airmamaf 2014-10-18 15:06:42 +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
738c807e1d Fix setting of upper limit for mode ranges in cli. 2014-10-12 19:49:31 +01:00
Dominic Clifton
b0eab0cc9e Update the cli AUX command to take range parameters - see docs/Modes.md 2014-10-12 19:32:55 +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
Airmamaf
9b84516344 FrSky telemetry update 2014-10-08 16:28:26 +02:00
Dominic Clifton
107a3425cf Updating unit test to verify expected values with the new maximum
vbatscale value. See #104.
2014-10-07 21:12:04 +01:00
airmamaf
720486a4de Update serial_cli.c
When using a voltage sensor instead of direct connection for voltage monitoring, vbat_scale max limit is too low. It should be raised to a value greater than 200 (250 or more)
2014-10-03 09:15:48 +02: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
6f05a5181b Insert missing space into version message. 2014-09-26 01:03:20 +01:00
Dominic Clifton
c898ca4634 OLED Display - Add two pages: RX info and Welcome.
The RX info page shows channel letters and bar graphs for the first 8
channels.
The Welcome page shows the target and cleanflight git revision.
2014-09-21 05:09:01 +01:00
Dominic Clifton
da485119f7 Update the cli dump command and profile commands so that it shows the
profile being dumped such that it can be copied pasted as commands.
2014-09-20 12:40:19 +01:00
Dominic Clifton
0cde910b75 Fix unused led strip method compiler warnings for CJMCU target. 2014-09-20 12:20:24 +01:00
Dominic Clifton
72eac8048a Allow colors to be configurable via the cli.
color x h,s,v

x = 0-15
h = 0-359
s = 0-255
v = 0-255
2014-09-19 00:08:40 +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
d9d5227af9 Ignore CLI commands that are prefixed with # (comments) 2014-09-18 00:47:43 +01:00
dongie
e51cb447c4 Include version output in cli 'dump'.
Conflicts:
	src/cli.c
2014-09-18 00:47:43 +01:00
Dominic Clifton
0d37bcdf5b Add DISPLAY feature to enable/disable the OLED display. Add ARMED page
which is displayed upon arming.  Resume page cycling when disarmed.
2014-09-16 01:33:15 +01:00
Dominic Clifton
94623289fd Fix building of targets that don't define LED_STRIP. 2014-09-15 03:27:37 +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
Andreas Tacke
275089eca1 Make disarming via AUX switch independent of throttle value configurable
Conflicts:
	src/cli.c
	src/config.c
	src/mw.c
	src/mw.h
2014-09-08 11:02:02 +01:00
Dominic Clifton
2ae62d1977 Add git commit number to cli version command output. 2014-09-04 00:27:28 +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
dc0f461c73 Update serial port handling for boards with only 2 ports. 2014-08-07 23:32:14 +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
8c3a869251 Update CLI so that you can dump all, master or profile settings.
Cleanup '...' strings to reduce binary size.  Change version
information.

With this change it's much more obvious what is and what is not included
in a profile.

Examples:

dump
dump profile
dump master
2014-08-02 12:39:18 +01:00
Dominic Clifton
81cf29be70 Avoid error message appearing incorrectly after showing cli commands. 2014-08-02 12:39:17 +01:00
Dominic Clifton
01643b8621 Re-use existing code to show all matching cli commands for 'get' instead of exact match.
e.g.  'get deadband' will show all varialbles with the word 'deadband' in it.  exact match only required when setting variables.
2014-08-02 10:00:37 +01:00
Ben Hitchcock
35a4aa60f9 Adding 'get' command to the CLI, to view a single variable.
This enables the user to type "get variablename" in the CLI, which then shows the value of that variable (or a message saying "Variable 'variablename' not found").
This is easier for the user when they just want to see a single variable, instead of typing 'dump' and then having to parse a big long list of data.  It is also more intuitive than typing 'set variablename', as this feels unsafe.
2014-08-02 13:59:46 +08:00
luggi
1bf806f54c make the accZ lpf used for althold configurable
set the variable accz_lpf_cutoff to the desired cutoff frequency
this can help to make althold smoother on copters with lots of
vibrations

Conflicts:

	src/cli.c
	src/config.c
	src/imu.c
	src/mw.h
2014-08-01 22:31:22 +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
3d65e4ff96 Changes missed from last commit. 2014-07-31 13:47:46 +01:00
treymarc
9cf90fa230 smallAngle configurable, user can arm/disarm with swith in any
orientation
Conflicts:

	src/cli.c
	src/config.c
	src/imu.c
	src/mw.c
	src/mw.h
2014-07-31 00:25:24 +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
5f16cfb72a CC3D - Support MPU6000 Gyro/Acc and SPI 1/2. 2014-07-17 22:12:21 +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
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
3643c08475 Decoupling imu from config - acc deadband. 2014-06-06 21:37:41 +01:00
Dominic Clifton
f8bdc79a9f Fix CLI bug where incorrect variables would be set when similarly named
variables are used.

Previously the following was broken:

set option = 1
set option_extra = 2

Instead of setting 'option_extra' to two 'option' was set to 2 if
'option' appeared before 'option_extra' in the list of settings.
2014-06-05 09:27:41 +01:00