Commit Graph

1279 Commits

Author SHA1 Message Date
Dominic Clifton f166ca3516 Allow inflight adjustment of yaw rate. 2014-10-24 22:01:31 +01:00
Dominic Clifton 9ddbb4ed9d Allow inflight adjustment of rc_expo. 2014-10-24 21:58:30 +01:00
Dominic Clifton 81e3425326 Allow inflight adjustment of pitch/roll rate. 2014-10-24 21:52:12 +01:00
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
Dominic Clifton b2db6b3b80 Beep when adjustments are made. (very short = adjust downwards, short =
adjust upwards).
2014-10-24 18:48:55 +01:00
Dominic Clifton a92b148557 update some comment typos in sensors/acceleration.c 2014-10-24 18:35:59 +01:00
Dominic Clifton a2a9443045 Seperate adjustment configuration from adjustment state. Rename 'step'
parameter to 'delta' applying the adjustment.  Configure adjustment
states based on adjustment configuration for AUX3 and AUX4.
2014-10-24 15:46:07 +01:00
Dominic Clifton 45d9678a39 Use adjustment index rather than function to track state. 2014-10-24 15:10:28 +01:00
Dominic Clifton e21f0667c5 Update adjustmentConfig to include the adjustment timeout. 2014-10-24 14:58:41 +01:00
Dominic Clifton 02c93f1c1a Fix rc_controls_unittest to use midrc. 2014-10-24 14:57:46 +01:00
Dominic Clifton b0b83b31db Make the adjustment controls more sensitive by using a smaller 3POS
switch deadzone.
2014-10-22 23:20:59 +01:00
Dominic Clifton 6d7035819f First cut of allowing a 3POS switch on AUX3 to change rc rate.
rcRate is decreased when low, increased when HIGH and no change when the
switch is in the middle.

The rcRate ticks up/down at 0.01 every 500ms if the switch is left on.

If using a momentary switch and if you can toggle the switch between
middle and low or middle and high more frequently than 500ms then the
rate will be increased accordingly.  Similar to how a keyboard repeat
behaves.
2014-10-22 23:10:40 +01:00
Dominic Clifton fd32ad6fcb Use correct buffer size variable when checking for softserial waiting
bytes.  Fixes #127.
2014-10-21 13:41:51 +01:00
Dominic Clifton cbd1817f6c Workaround for HoTT and softserial. 2014-10-20 23:14:30 +01:00
Dominic Clifton 2d8f65448d Cleanup Softserial/LedStrip timer clash checking. Move definitions of
led strip timer and softserial pwm ports/timers into target specific
files.
2014-10-20 21:44:55 +01:00
Dominic Clifton f9f6b05aac Fix opening softserial ports - missed a #ifdef check. 2014-10-20 20:13:30 +01:00
Dominic Clifton 91c7407806 Cleanup CC3D softserial - it only has enough pins/timers for one port.
PR #124 incorrectly re-used the same timer hardware for the second port
which was bad.
2014-10-20 19:34:10 +01:00
Dominic Clifton b08f51d88c Undo changes from 20c4dae7c2 / hott.c
until a proper fix is found.
2014-10-20 18:54:30 +01:00
Dominic Clifton 729b929933 Merge pull request #124 from Pierre-A/cc3d-updates-1
SoftSerial port for CC3D
2014-10-20 18:29:19 +01:00
Pierre-A 20c4dae7c2 SoftSerial port for CC3D 2014-10-19 11:20:55 +02:00
Dominic Clifton 63236d5a2a Fixed bug where channel mapping was incorrect when using GPS and RX
Parallel PWM on STM32F10X targets. Fixes #80.

The check to see if usart2 should always be done.  The PWM mapping code
decides on a per-target base if possible pwm input channels need to be
skipped due to pin usage clashes.
2014-10-18 18:16:58 +01:00
Dominic Clifton c3c6a90a17 Latest binaries with FrSky telemetry updates and first cut of
MSP_API_VERSION command.
2014-10-18 17:17:33 +01:00
Dominic Clifton b03df441f3 Updating serial port details for Naze board. 2014-10-18 16:40:21 +01:00
Dominic Clifton a3aad91f76 Bump EEPROM version (for #108). 2014-10-18 16:38:40 +01:00
Dominic Clifton e0495343de Updating credits for FrSky telemetry. 2014-10-18 16:03:37 +01:00
Dominic Clifton 8fef02fe8d Updating FrSky telemetry docs to match recent code changes. 2014-10-18 15:58:28 +01:00
Dominic Clifton 1b47d3cbae Clean up pull request #108 from @Airmamaf. 2014-10-18 15:52:04 +01:00
Dominic Clifton df5a61b433 Merge branch 'airmamaf-airmamaf' 2014-10-18 15:07:03 +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 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 4f96e3c20e Disable MPU6500 on EUSTM32F103RC because the driver autodection is not
implemented yet. See #119.
2014-10-17 01:35:46 +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
dongie afb77484ea cleanup hardware revision detection and get rid of checks for hse_value
add spi autodetect functionality, actually check for currently used M25P16 flash chip
2014-10-16 01:16:30 +01:00
Dominic Clifton 38dbe897d9 Reduce RAM usage of mpu6050 initialisation. 2014-10-16 01:10:23 +01:00
Dominic Clifton f5895b762f NAZE32_SP - Enable MPU6500 driver. 2014-10-16 00:57:44 +01:00
Dominic Clifton 8f9a553a9e Use Naze hardware revision when initialising mma845. Cleanup ADXL345
initialisation.
2014-10-16 00:56:02 +01:00
Dominic Clifton 50391f2c8e Use Naze hardware revision when initialising beeper. Cleanup inverted
beeper configuration.
2014-10-16 00:44:56 +01:00
Dominic Clifton 2ed09b0b2f Use Naze hardware revision when initialising bmp085. Cleanup bmp085
GPIO configuration for all targets.
2014-10-16 00:13:09 +01:00
Dominic Clifton 79917da85a Use Naze hardware revision when initialising mpu6050. The driver is not
not naze specific anymore.
2014-10-15 23:10:18 +01:00
Dominic Clifton cf643b98c8 Use Naze hardware revision when initialising hmc5883. The driver is not
not naze specific anymore.
2014-10-15 22:42:07 +01:00
Dominic Clifton 6162f609ea Use Naze hardware revision when initialising adxl345 - this now allows
the driver to be used by any target with an hse_value of 12Mhz.
2014-10-15 21:16:52 +01:00
Dominic Clifton a4879cc2e3 Use Naze hardware revision when initialising ADC. 2014-10-15 21:14:49 +01:00
Dominic Clifton 8ef70abaa0 NAZE32 - Add hardware revision detection. 2014-10-15 20:59:06 +01:00
Dominic Clifton d3fc10fd83 Mode documentation updates. 2014-10-15 19:26:03 +01:00
Dominic Clifton 697152e69a Ensure that binary file changes are ignored when producing a git diff. 2014-10-15 15:23:59 +01:00
Dominic Clifton 83e22cb5ad Updating readme. 2014-10-15 14:33:27 +01:00