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

242 commits

Author SHA1 Message Date
borisbstyle
59e66cfd54 Prevent winding up of Iterm when disarmed 2015-11-13 15:21:04 +01:00
borisbstyle
9028ca71d6 Fix new pid_at_min_throttle feature 2015-10-30 00:20:20 +01:00
borisbstyle
784c5fdbec Add Timer to pidResetErrorGyro
init with zero

pid_at_min_throttle as delay for reset Iterm
2015-10-29 21:39:49 +01:00
borisbstyle
e7ce0193ce Baro Jitter Prevention // Enabled by default 2015-10-29 21:13:12 +01:00
borisbstyle
5d152a5f4f Correct dT declaration 2015-10-23 23:15:44 +02:00
borisbstyle
d076a60eb5 Cleanup // Reorganisation 2015-10-22 17:27:26 +02:00
Konstantin Sharlaimov (DigitalEntity)
5df8ca926c Quaternion-based DCM IMU (original code my S.Madgwick)
Restore binaries from merge
2015-10-22 10:45:36 +02:00
borisbstyle
a31a962467 Move smoothing of rcData to rcCommand 2015-10-20 20:26:35 +02:00
borisbstyle
4b3ba927e9 Merge branch 'master' into betaflight
Conflicts:
	src/main/blackbox/blackbox_io.c
	src/main/drivers/serial_usb_vcp.c
	src/main/flight/imu.c
	src/main/mw.c
	src/main/target/CC3D/target.h
2015-10-12 23:53:43 +02:00
Petr Ledvina
6999cf1742 Simplify #ifdef nesting 2015-10-12 19:58:11 +01:00
Petr Ledvina
dc5a888633 cpm16 / cmp32 functions
used to compare timestamps with correct wrap. A bit more readable that typecasting in code. Only few uses replaced now
2015-10-12 19:58:05 +01:00
borisbstyle
5e87387e16 Code Cleanup // Defaults // Version Rename
No more version numbering. It's confusing.
Betaflight Bee Version
2015-10-09 23:33:00 +02:00
borisbstyle
12c9f65f43 Merge branch 'master' into betaflight
Conflicts:
	Makefile
	docs/Cli.md
	src/main/config/config.c
	src/main/drivers/accgyro_mpu3050.c
	src/main/drivers/accgyro_mpu6050.c
	src/main/drivers/accgyro_mpu6050.h
	src/main/drivers/accgyro_spi_mpu6000.c
	src/main/drivers/accgyro_spi_mpu6000.h
	src/main/drivers/accgyro_spi_mpu6500.c
	src/main/drivers/accgyro_spi_mpu6500.h
	src/main/drivers/barometer_bmp280.c
	src/main/drivers/sensor.h
	src/main/flight/pid.c
	src/main/mw.c
	src/main/rx/rx.c
	src/main/sensors/initialisation.c
	src/main/target/CC3D/target.h
2015-10-07 17:12:54 +02:00
Dominic Clifton
123a4ccfc5 Merge branch 'GTune' of https://github.com/MJ666/cleanflight into
MJ666-Harakiri_PID_update

Conflicts:
	Makefile
	src/main/blackbox/blackbox_fielddefs.h
	src/main/flight/pid.c
	src/main/io/serial_msp.c
	src/main/mw.c
	src/main/target/ALIENWIIF3/target.h
	src/main/target/CC3D/target.h
	src/main/target/NAZE/target.h
	src/main/target/NAZE32PRO/target.h
	src/main/target/SPARKY/target.h
2015-10-06 20:16:37 +01:00
Dominic Clifton
d36da111b2 Delete autotune. 2015-10-06 19:38:02 +01:00
Michael Jakob
e7e297ad53 Modified behavior of G-Tune switch and storing the tuned P values
G-Tune documentation update
G-Tune will only activated and deactivated when armed.
G-Tune should deactivated while the copter is airborne.
Tuned P values will only be stored when G-Tune is enabled while disarmed
and G-Tune was used before.
2015-10-04 18:37:19 +02:00
Michael Jakob
43f5792a61 G-Tune port from Harakiri
Enabled for NAZE, ALIENWWIIF1 and ALIENWIIF3 targets
Implement G-Tune for all PID controllers
The G-Tune tuning results will be save if G-Tune mode will be disabled
during copter is disarmed.
Update PID controller and G-Tune documentation
2015-10-04 18:37:18 +02:00
borisbstyle
4dcd8354da Rx should be processed at least once
This is to prevent an extreme edge case on slow boards to make sure rx
update still occurs
2015-10-01 15:11:04 +02:00
borisbstyle
b523ff1557 imuUpdateAccDelayed unnecessary 2015-10-01 13:49:32 +02:00
Dominic Clifton
36a3ee4e59 Merge branch 'rcFilter' of https://github.com/borisbstyle/cleanflight into borisbstyle-rcFilter 2015-09-29 10:36:41 +01:00
borisbstyle
c944083f73 Merge branch 'master' into betaflight
Conflicts:
	src/main/config/config.c
	src/main/flight/imu.c
2015-09-29 01:03:25 +02:00
Dominic Clifton
779702230f Fix mAhDrawn - one too many / 1000.
Without this commit the mAhDrawn was always 0, now at ~10A draw it ticks
up.

This needs to be verified, but seems to match behaviour of 1.9.x.

Fixes #1353
2015-09-28 01:44:53 +01:00
borisbstyle
f39ca7add6 Minimize latency in Acro modes with acc enabled 2015-09-25 15:23:04 +02:00
borisbstyle
4a492c611a More Jitter Enhancements for Naze target
remove debug

Anti Jitter Enhancements for Naze target

Jitter Optimalisation without emf avoidance
2015-09-24 00:40:42 +02:00
borisbstyle
af6f9de903 Jitter enhancements 2015-09-21 00:19:08 +02:00
borisbstyle
0539abc649 Dterm scaling correction // Code cleanup 2015-09-21 00:19:06 +02:00
borisbstyle
893b45c518 Change defaults // Cleanup debug 2015-09-19 17:39:13 +02:00
borisbstyle
0ea5a99e2b Merge remote-tracking branch 'prodrone/betaflight' into alphaflight 2015-09-19 16:44:11 +02:00
ProDrone
47afa51bd7 Merge branch 'quat_fsm_vfm_clean_yaw_hack_squash' into betaflight
Conflicts:
	src/main/mw.c
	src/main/target/CC3D/target.h
2015-09-19 14:59:47 +02:00
Konstantin Sharlaimov (DigitalEntity)
45a4f11f92 Added #define for imu debug output (+16 squashed commit)
Squashed local commits:

from       : e4265d4a13f63f82d5cf55eea2c091622f96660b
up to (inc): 72416dc74745fa8bae1aded79aa4b9ed0e389076
2015-09-19 14:50:53 +02:00
borisbstyle
0501e5ff91 Code Cleanup
More code cleanup and BUMP EEPROM

Code Cleanup

Fix loop trigger
2015-09-19 01:37:48 +02:00
borisbstyle
49bc46bc37 Static FIR filter 2015-09-19 00:43:50 +02:00
Stephen Willey
266ed02a81 Substitute pt1 filter of gyroADC for 7 Tap FIR filter 2015-09-18 15:23:09 -07:00
borisbstyle
074e389789 Gyro Sync separated by target 2015-09-18 13:50:30 +02:00
borisbstyle
c45d3e1fdd MPU6050 MPU DATA READY // gyro sync activated
MPU6050 gets DATA READY pin based interrupt instad of i2c
SPI targets are still getting interrupt from SPI
2015-09-17 23:59:25 +02:00
borisbstyle
f50bec0700 Gyro_sync without interrupt // Automatic looptime 2015-09-17 00:32:11 +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
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
borisbstyle
426ccbd307 Watchdog delay timer to 150
Should be enough!

Update Hex files
2015-09-03 15:22:16 +02: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
82e23fd437 rework RC Smoothing 2015-09-02 00:31:46 +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
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
borisbstyle
26deeb8ff6 Loop synced to Gyro
Remove double MPU_RA_PWR_MGMT_1

Looptime to Gyro refresh rate

disable 2khz when acc used for F3

Gyro sync code improvement

doc change
2015-09-02 00:30:39 +02:00
borisbstyle
60955fc27d RC Smoothing
fix loopcount

Improve AUX logic // initial factor set to 1

Better Delta approach

FIX AUX CALC

Update refresh rates
2015-09-02 00:30:36 +02:00
borisbstyle
fdcfe71b73 Improve soft filtering function for reuse
Reorder serial.c *_cut_hz parameters

Remove unnecessary dT calculation in luxfloat

Restructured filter

filter.h fix

Luxfloat remove internal dT

Void function for gyro fillter
2015-09-02 00:30:35 +02:00
borisbstyle
ff23cab2a8 Remove Aux filter // more accurate cycleTime // Code cleanup
Change datatypes
2015-09-01 23:41:56 +02:00