1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00
Commit graph

2428 commits

Author SHA1 Message Date
Dominic Clifton
c4680b3b3d More test code cleanup. 2015-09-10 02:06:15 +01:00
Dominic Clifton
0070573420 Fix unit tests - the tests cannot use a common library of production
since when compiling some test code the idea is to stub out production
functionality rather than call production code.
2015-09-10 02:06:14 +01:00
Dominic Clifton
4737f33b19 revert "tests: simplify the build config by building as a library" 2015-09-10 02:06:13 +01:00
Dominic Clifton
76666a3280 Merge pull request #1292 from ProDrone/is1257_rx_suspend_changes_1
RX - Adapted implementation of RX suspend & resume on EEPROM read & write
2015-09-10 00:40:08 +01:00
Dominic Clifton
f7b3914a91 Fixing merge and build broken by
3cf77579ba
2015-09-10 00:22:08 +01:00
Dominic Clifton
45c82741e7 Enable telemetry_inversion by default on STM32F30x targets because the
hardware supports inversion natively.
2015-09-09 21:02:42 +01:00
Dominic Clifton
9d00fb6af4 Merge branch 'acro-external-I2C-baro' of
https://github.com/SteveAmor/cleanflight into
SteveAmor-acro-external-I2C-baro

Conflicts:
	src/main/drivers/barometer_bmp085.c
	src/main/drivers/barometer_bmp085.h
2015-09-09 20:33:02 +01:00
Dominic Clifton
5d5fd81b2e Fix bug where PPM rx stops working on sparky or CC3D when using motor
PWM rate > 500 (brushed motor mode).

Fix is the same as for OneShot since both brushed motors and oneshot use
an 8mhz timer.

Fixes #58
2015-09-09 19:25:08 +01:00
Dominic Clifton
b2f9e603df STM32F3Discovery - correct default sensor alignment, closes #1289
Also updated ChebuzzF3 variant.
2015-09-09 18:48:12 +01:00
ProDrone
5ca5c2d161 Adapted RX suspend & resume on EEPROM read & write
Modified to make mechanism use time instead of counters for call
frequency independency.
Skipping RC samples uses a counter for time independency.

Also LED and beeper patterns were changed by previous implementation.
Corrected with RX supend/resume feedback to failsafe system.
2015-09-07 14:19:12 +02:00
borisbstyle
62b11ec1eb Change some defaults 2015-09-07 10:13:16 +02:00
borisbstyle
febee3fb90 Merge branch 'master' into betaflight
Conflicts:
	src/main/drivers/system.c
	src/main/rx/rx.h
2015-09-07 10:08:34 +02:00
Dominic Clifton
9208b8701a Merge pull request #1255 from ProDrone/pr1233_rxfail_mode_changes_1
Changed behavior of PR #1233 - solves issue #1254
2015-09-05 23:01:11 +01:00
Dominic Clifton
b6c504dc88 Merge pull request #1263 from ProDrone/prevent_arming_when_in_cli
Prevent arming when in CLI mode
2015-09-05 22:55:06 +01:00
Dominic Clifton
0caf8a65ba Merge pull request #852 from ProDrone/Failsafe_features_1
Failsafe - New failsafe functionality (Phase 1)
2015-09-05 22:50:34 +01:00
Dominic Clifton
cb147ec85e Fix CJMCU build, broken by df92691410 2015-09-05 20:34:40 +01:00
Dominic Clifton
564c131db5 Merge pull request #1283 from sppnk/patch-4
Fixing servo command parsing of "rate" field
2015-09-05 18:53:33 +01:00
Dominic Clifton
df05d599b5 Merge pull request #1258 from ProDrone/is1257_false_rx_loss_detection_1
Fix false RX loss detection on EEPROM read/write
2015-09-05 18:11:11 +01:00
Dominic Clifton
28aad588cb Fix vtail mixer defaults. Closes #988
Previously the vtail mixer was a copy of the atail mixer which was
incorrect.

The new defaults cater for frames like the Armattan Morphling Vtail.
2015-09-05 18:03:02 +01:00
Dominic Clifton
df92691410 update dump command to show per-profile servo reverse settings. See
#1140.
2015-09-05 18:01:36 +01:00
borisbstyle
a0ac565ff5 Merge remote-tracking branch 'motolab/motolab-integration' into betaflight 2015-09-05 15:11:38 +02:00
ProDrone
f0681de53d Updates and feature additions to failsafe system.
- Added failsafe flightmode and rc control box.

To make failsafe procedure a separate flight mode and make it possible
to trigger failsafe with an AUX switch.

- Failsafe mode is activated when failsafe is active.

RC link lost is simulated with the failsafe AUX switch.
When NOT armed: failsafe switch to failsafe mode is shown in GUI (mode
tab).

- Activate failsafe mode with AUX switch.

- Prevent arming when failsafe via AUX switch is active (safety issue).

- Make failsafe disarm if motors armed and throttle was LOW (2D & 3D)
for `failsafe_throttle_low_delay` time (__JustDisarmEvent__).

Applied code changes to effectively add pull request: Make failsafe
disarm if motors armed and throttle low #717.

- Use failsafeIsMonitoring() to actually start monitoring.

- Added `failsafe_kill_switch` to code.

When set to 1 (0 is default), the failsafe switch will instantly disarm
(__KillswitchEvent__) instead of executing the landings procedure.
Arming is NOT locked after
this, so the craft could be re-armed if needed.
This is intended for racing quads where damage and danger must be
minimized in case of a pilot error.

- Added `failsafe_throttle_low_delay`, adapted documentation.

Used to adjust the time throttle level must have been LOW
to _only disarm_ instead of _full failsafe procedure_
(__JustDisarmEvent__).

- Updated the failsafe documentation.

- Re-enable arming at end of failsafe procedure.

At the end of a handled failsafe event, that means: auto-landing,
__JustDisarmEvent__ or __KillswitchEvent__, the RX link is monitored for
valid data.
Monitoring is a part of the failsafe handling, which means the craft is
still in failsafe mode while this is done.
Arming is re-enabled (allowed) when there is a valid RX link for more
then XX seconds, where XX depends on the handled event like this:
1. XX = 30 seconds after auto landing.
2. XX = 3 seconds after __JustDisarmEvent__.
3. XX = 0 seconds after __KillswitchEvent__.

NOTE: When armed via an AUX switch, you will have to switch to the
disarmed position at the very end to be able to re-arm.
The failsafe mode will not end until you do.

- __KillswitchEvent__ has now priority over __JustDisarmEvent__

- Apply rxfail values instantly when failsafe switch is ON

- Added missing cases to display.c

Show M when failsafe is monitoring for RX recovery (AND disarming when
armed with a switch).

===

Reworked the code from counter-based to time-based.

- AUX failsafe switch now has identical behavior to RX loss.

- Added RX failure and RX recovery timing.

- __KillswitchEvent__ skips RX failure detection delay (direct disarm).

===

[UNIT TESTS]

Adapted failsafe related unittests from counter-based to time-based

- Added failsafeOnValidDataFailed() to some tests

- Removed duplicate test setup from rc_controls_unittest.cc

- Removed magic numbers from rx_ranges_unittest.cc and rx_rx_unittest.cc

- Reworked all test-cases for flight_failsafe_unittest.cc
2015-09-04 16:55:40 +02:00
ProDrone
3a13edfdad Fix false RX loss detection on EEPROM read/write
The problem is caused by hardware counters (timekeeping and PPM/PWM
measurement) that keep running while the firmware is frozen. The result
is misinterpretation of received data.

EEPROM read & write now call a suspend and resume function to make RX
ignore incoming wrong data during reads/writes (and flush the wrong data
on resume).

Fixes issue #1257

(+1 squashed commit)
- Moved the check for skipSamples to the right place.

As commented by hydra
2015-09-04 16:54:25 +02:00
ProDrone
a46832fd85 Changed behavior of PR #1233 and doc update
Stick channels only have AUTO and HOLD mode.
AUX channels only have SET and HOLD mode.
Added check to parameter in CLI.
Modified rx.md to reflect changes (and more).

+1 squashed commit:

- A cleaner approach for the same functionality

Basically addressing all comments from Hydra
2015-09-04 16:51:19 +02:00
ProDrone
3b9cd37a57 Prevent arming when in CLI mode 2015-09-04 16:46:03 +02:00
Nicholas Sherlock
f7530df974 Fix 1 millisecond backwards time leap in time measured by micros()
This race condition caused periodic flight instability when micros() was
called precisely on a 1000 nanosecond boundary.
2015-09-04 23:44:41 +12:00
borisbstyle
c9c073b71a micros fix // timer bug F3 targets
This solves the twitching issues on F3 targets
2015-09-04 12:28:22 +02:00
sppnk
45d31f2290 Fixing servo command bug
The limits for RATE were bad, so we had a "Parse error" when changing rate values other than 100.
2015-09-03 16:47:00 +02:00
borisbstyle
cb8c56d814 add microsecond delay to interrupt read 2015-09-03 15:22:21 +02:00
borisbstyle
426ccbd307 Watchdog delay timer to 150
Should be enough!

Update Hex files
2015-09-03 15:22:16 +02:00
nathan
80be01e530 bring betaflight up to par with serial1wire-blheli-multiesc 2015-09-02 21:43:42 -07:00
borisbstyle
6d99b58330 Lower watchdog timer for interrupt 2015-09-02 14:28:41 +02:00
borisbstyle
1b18d7aa14 Remove blheli bug workaround 2015-09-02 13:53:08 +02:00
borisbstyle
b457b16227 Merge branch 'betaflight' of https://github.com/borisbstyle/cleanflight into betaflight 2015-09-02 13:13:59 +02:00
4712
f6d99f356c fixed undefined reference to usb1WireInitialize() 2015-09-02 12:45:31 +02:00
borisbstyle
4899c0898d rebase correction 2015-09-02 00:41:12 +02:00
nathan
6e37b352e7 multiesc support for the cc3d 2015-09-02 00:38:39 +02:00
nathan
5be6a0762f serial1wire MSP and multi-esc configuration logic, compatible with BLHeliSuite 14.0.0.3.2 (beta)
mad props to @4712
2015-09-02 00:35:19 +02:00
nathan
291a56d9ca SPRACINGF3 support for serial1wire passthrough 2015-09-02 00:34:28 +02:00
nathan
8f12125c1e serial 1wire passthrough for ESCs with the BlHeli bootloader 2015-09-02 00:34:24 +02:00
nathan
804e2268bd cc3d opbl target -- undef baro to get it to build
without this: region `FLASH' overflowed by 144 bytes
2015-09-02 00:31:51 +02:00
borisbstyle
82e23fd437 rework RC Smoothing 2015-09-02 00:31:46 +02:00
borisbstyle
77effd3b71 Luxfloat Level Mode (rcCommand scaled to max_angle_inclination) 2015-09-02 00:31:00 +02:00
borisbstyle
9febb8cacd New Betaflight Defaults
Still good idea to get full 1kh sampling by disabling acc on naze boards
2015-09-02 00:30:58 +02:00
borisbstyle
bb12ad8646 Yaw pterm_cut_hz (derived from pterm_cut_hz) 2015-09-02 00:30:57 +02:00
borisbstyle
7a6fbc1702 original dT back
update hex
2015-09-02 00:30:56 +02:00
borisbstyle
bb4b5526cc Correction in watchdog // old dT
restore old dT
2015-09-02 00:30:53 +02:00
borisbstyle
5390cdc804 Selectable BARO (set baro_hardware)
Disabling baro will boost performance on FULL boards
2015-09-02 00:30:51 +02:00
borisbstyle
00ae128e3d constdT for gyro fliter
dTGyro
2015-09-02 00:30:49 +02:00
borisbstyle
41895bc1af New Clli params RC Smoothing and sync_gyro_to_loop 2015-09-02 00:30:46 +02:00