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

115 commits

Author SHA1 Message Date
Mark Haslinghuis
d1eb214332
Fix rcSmoothing warning (#12893) 2023-06-18 01:48:58 +02:00
ctzsnooze
d9775287a2
Keep sending DShot 0 packets between beacon commands (#12544)
* Keep sending DShot zero between beacon commands

And don't wait 100ms between inline commands, which the beacon commands are.

* use cmpTimeUs for time comparisons

* Fixed intervals between DShot beacons

* fix indentnation, thanks KarateBrot
2023-03-21 14:41:45 +01:00
ctzsnooze
4454286165
GPS Rescue Bugfix, add a failsafe debug, refactor stick deflection (#12195)
* simple failsafe debug

* simplify areSticksActive

use getRcDeflectionAbs and fix unitTest

* bugfix to require stick input to re-take control

* small refactor
2023-01-18 02:44:50 +01:00
Jan Post
931c982a3b
Refactor RPM Filter (#11765)
* Refactor RPM Filter

* Refactor RPM Filter parameter group
2022-11-12 20:39:21 +11:00
Jan Post
04a7903756
Fix ATTITUDE task rate (#11975)
Fix attitude task rate in acro mode
2022-11-12 20:38:11 +11:00
ctzsnooze
341d65becf remove gps_required and gps_minimum sats and revert to gps_rescue_min_sats 2022-10-20 21:44:01 +11:00
haslinghuis
7e441b5f4f
Merge pull request #11887 from KarateBrot/styledef
Remove old style definitions
2022-10-16 00:22:02 +02:00
KarateBrot
ddf1d46549 Remove old style definitions 2022-10-13 03:33:54 +02:00
Mathias Rasmussen
61ded491cd Use std abs() instead of ABS() macro
Changes uses of ABS() macro to <stdlib.h> abs() and <math.h> fabsf()
2022-10-12 19:49:03 +02:00
iso9660
ccdccbf8a9 Removed all motors telemetry calculations to avoid extended dshot telemetry overhead
Basic DSHOT telemetry restablished again

Implemented new mechanism to activate EDT. The old mechanism no longer works

Added dshot_edt configuration parameter to enable edt. Parameter is OFF by default

Only send DSHOT edt enable in core.c::tryArm if dshot_edt=ON

Fixed review findings
2022-10-01 09:53:02 +02:00
iso9660
7a5b60e8c1 Fix for old telemetry sent to RPM filter during a re-arming sequence 2022-09-23 06:50:47 +02:00
danmos
21b3fc15b7 Extended Bidir DShot
Extended DSHOT telemetry
Fixed broken unit testing

Rebased to master

Extended DSHOT telemetry

Added DSHOT ESC fail to OSD warnings

Initial extended DSHOT implementation

DSHOT telemetry ranges readjusted

Added shot_telemetry_data to cli

Added DSHOT telemetry warnings

Added extended DSHOT telemetry temperature data to osd elements

Fixed DSHOT telemetry osd warnings

Make cli dshot telemetry types human readable

Fixed ESC temperature OSD element

Added extended dshot telemetry enable command to dshot command queue to enable it in tryArm function.

Fixed broken automated unit testing

Fixed text output for dshot_telemetry_data cli command

Decode extended telemetry only when it has been activated in the ESC

DSHOT extended telemetry is only enabled when an extended telemetry enable frame is being processed

Fixed broken automated unit testing

Update tail's dshot command in queue when running blocking commands, so extended dshot telemetry command responses can be associated to their corresponding extended dshot telemetry enable/disable command request

Added clariffication to dshot_get_telemetry_type_to_decode to explain mechanish used for processing DSHOT_CMD_EXTENDED_TELEMETRY_ENABLE response

Tabs cleanup
Added dshot motor stop fix when writting blocking commands

Added extended DSHOT telemetry to osd warnings
Fixed extended DSHOT telemetry in osd elements

Implemented msp extended dshot telemetry
Optimized osd warnings

Fixed code style

Added max temp to osd stats

Fixed automated unit testing

Fixed broken automated unit testing

Fixed missing extended dshot telemetry voltage and wrong current
Fixed unadverted change in gitignore file

Print esc number besides max esc tempetature in osd stats

issues and some other minor issues

ESC temperature is coded as an uint8 going from 0 to 255. Updated osd config esc_temp_alarm from int8_t to uint8_t to match esc temperature coding

issues and some other minor issues

Enable extended dshot telemetry when no esc sensors avaliable and dshot telemetry is enabled

Arranged dshot.h header and removed unnecessary headers from dshot.c

Updated dshot_telemetry_data cli command output

Fixed dshot_telemetry_data command

motor_output_unittest fixed

Fixed motor number printing in dshot_telemetry_data cli command

fixed motor_output_unittest

Merged dshot_telemetry_data into dshot_telemetry_info cli command

Fixed tabs

Fixed motor_output_unittest

Support extended DSHOT telemetry on DJI FPV

Fixed Compiling fails without USE_ESC_SENSOR and USE_DSHOT_TELEMETRY defines.

Fixed whencompiling without USE_ESC_SENSOR and USE_DSHOT_TELEMETRY

Reworked so code can be compiled with USE_ESC_SENSOR and USE_DSHOT_TELEMETRY separately

Enabling EDT the correct way

Removed unecessary conversions

Changed motorIndex datatype to uint8_t in dshot functions
2022-09-14 20:11:58 +02:00
ctzsnooze
09ee27cd97 Refactor sat count checks and GPS trust code
single minimum GPS satellite setting
single required GPS satellite setting
CLI Baro vs GPS trust user interface
GPS trust refactoring
allow arming with GPS_FIX even if not enough sats
required sats must be present to arm
set required sat count to 8
add blackbox headers
2022-09-07 09:55:35 +10:00
ctzsnooze
b2241b32c3 Refactor Baro to floats, filter at position rate
convert pressure to altitude early
remove median filter
PT2 filtering upsampled to altitude function in position.c - thanks KarateBrot
baro task synced to position task - thanks Steve
PT2 implementation - thanks KarateBrot
ground altitude from filtered altitude
baro cali by average of calibration samples over cal period
adjust vario and smoothing defaults
don't say haveBaroAlt until cal is complete
reduce PIDs since Baro is faster
add baro smoothing values to blackbox header

Co-Authored-By: Jan Post <post@stud.tu-darmstadt.de>
Co-Authored-By: Steve Evans <SteveCEvans@users.noreply.github.com>
2022-09-02 14:38:40 +10:00
blckmn
bc0fc26479 - Adding nightly build at 1am UTC
- Updating cache for tool chain
- Using 10.3 as the build chain, due to bug in 11.2 -> https://bugs.linaro.org/show_bug.cgi?id=5825.
- No inlining to prevent over flow. Perhaps other calls represent better choices.
2022-07-11 17:18:43 +10:00
Štěpán Dalecký
f85ebba6a4 Refactoring of IMU and ACC 2022-06-28 18:26:10 +02:00
ctzsnooze
f7c645bfcd update GPS code 2022-06-13 09:43:52 +10:00
Ivan Efimov
bb33c65f11 Changes in crash flip OSD warnings:
1. Show "ARMED"<new line>"> CRASH FLIP <" when arming in crash flip
2. Show "CRASH FLIP SWITCH" when disarmed, but in crash flip.
3. Hide the disarmed stats screen if "CRASH FLIP SWITCH" is activated.
2022-05-27 02:06:16 -05:00
Steve Evans
1368b221b7 Remove rxFrameReady() 2022-04-17 17:58:10 +01:00
ctzsnooze
fb51f63735 fix for GPS non-return 2022-04-16 17:24:50 +10:00
ctzsnooze
ee024aff0c refactor failsafeActivate, all recovery times the same
Simpler GPS Rescue fix
100ms interval for signalReceived failure
Faster failsafe stick response
Update and confirm unit tests work correctly
Restore invalid flight channel ability to trigger failsafe with individual timers
Set default failsafe stage 1 delay to 1.5 seconds, approximately match previous delay of 1.6s when the user selected 1.0 seconds.
Update failsafe documentation for 4.3
Arming blocked soon after Rx initialisation
Unit test fix for previous commit
Editorial changes and typo fixes
2022-04-13 11:52:56 +10:00
Steve Evans
07f6bea174 Fix failsafe timings and behaviour to match Failsafe.md 2022-03-30 18:29:21 +01:00
Steve Evans
fc8640154a Interrupt/DMA driven SX1280 interaction for ELRS 2022-02-28 19:50:36 +00:00
Štěpán Dalecký
564421ce1c Debug modes cleanup 2021-12-04 18:43:05 +01:00
KarateBrot
8649f1003f Dynamic notch refactoring
+ added new parameter group for Dyn Notch
2021-09-01 12:39:21 +12:00
Steve Evans
25fcacf4c5 Split rx processing into three states to eliminate cycle time jitter
Allow tasks with state machines to control which state determines task duration

Fix unit tests
2021-03-27 23:28:41 +00:00
Alexey Stankevich
2eb787a5ad Do not disable RcAdjustments if paralyze when armed 2021-02-18 00:32:10 +03:00
Alexey Stankevich
c72e7ac568 Fix disabled disarm when Paralyze is activated in armed state 2021-02-17 00:51:28 +03:00
Bruce Luckcuck
9c575d9353 Disable HEADFREE flight mode when GPS Rescue is active
The GPS Rescue flight control model doesn't work in HEADFREE mode.
2020-10-27 23:18:40 -04:00
limonspb
806595a7d4 Total flights stats for OSD 2020-10-25 01:32:51 -05:00
Sam Lane
4c99ad743d Rename FAST_RAM to FAST_DATA 2020-08-23 08:49:26 +01:00
Michael Keller
9ae9b32aad
Merge pull request #9937 from mikeller/refactor_dshot_enabled_checks
Refactored Dshot enabled checks.
2020-07-26 15:30:40 +12:00
Michael Keller
f8f01c9fa3
Merge pull request #10006 from etracer65/crash_flip_first_arming 2020-07-12 14:12:31 +12:00
Bruce Luckcuck
bf232e57d9 Prevent crash flip from setting WAS_EVER_ARMED arming flag
Previously if the first "arming" was in crash-flip mode then the various features that rely on "first arming" logic would be defeated. While arming in crash-flip mode is technically "arming", it shouldn't disable features that rely on the first "real" arming. For example, vtx low-power disarm, GPS fix arming disabled, `BATT < FULL` warning, etc.
2020-07-10 09:20:47 -04:00
Bruce Luckcuck
a545e80894 Ignore GPS arming disabled when arming in crash flip mode
While craft is upside down the GPS receiver may not be able to maintain a fix. As a result the `ARMING_DISABLED_GPS` reason could prevent arming in crash-flip mode preventing the user from flipping back over.
2020-07-10 09:01:22 -04:00
Michael Keller
41fa8754bc
Merge pull request #9633 from mikeller/remove_vbat_pid_compensation
Remove vbat pid compensation
2020-07-06 13:41:27 +12:00
mikeller
5b58c300b6 Removed unused 'io/motors.h' header file. 2020-06-29 18:49:06 +12:00
mikeller
c2812eca8c Refactored Dshot enabled checks. 2020-06-22 10:04:43 +12:00
mikeller
b6689edc26 Removed VBat PID compensation. 2020-06-22 01:12:47 +12:00
Bruce Luckcuck
9ce1e6ddc3 Fix BOOTGRACE arming disabled reset when motor protocol is DISABLED 2020-04-28 09:22:08 -04:00
Bruce Luckcuck
c6c9ba7229 Fix blocking DSHOT commands
Motor and DSHOT refactoring broke blocking DSHOT commands as the check for commands being enabled was not taking into account that "blocking" type commands need to operate only when the motors are not enabled.

Fixes the CLI `dshotprog` command.
2020-04-17 08:29:24 -04:00
mikeller
d1ac12eccd Added 'disabled' motor protocol and made it the default. 2020-04-01 20:33:29 +13:00
Michael Keller
01f0095296
Merge pull request #9590 from mikeller/clean_up_scheduler
Cleaned up the scheduler.
2020-03-16 18:02:36 +13:00
mikeller
db4bd1f186 Cleaned up the scheduler. 2020-03-16 08:35:58 +13:00
Bruce Luckcuck
780da90037 Reduce gyro temperature read rate from 250hz to every 3 seconds
If the gyro supports it, the temperature is read as part of the telemetry task to be supplied in several protocols. There's absolutely no reason to read the gyro temperature at 250hz for this purpose and the temperature shouldn't be changing rapidly anyway. Revise to read a new temperature every 3 seconds which should be more than sufficient.

Has no impact at the moment as no actively used gyro supports temperature reads but may be used in the future.
2020-03-13 10:50:41 -04:00
mikeller
d13e83b91b Cleaned up the RX handler some. 2020-03-10 00:55:52 +13:00
mikeller
dc5671f34c Added protocol level RX frame rate measurement for FrSky FPort. 2020-03-06 09:35:00 +13:00
jflyper
ff16686893 White space tidy 2020-02-17 23:54:57 +13:00
Bruce Luckcuck
ecd9034b07 Fix compiler warnings if USE_BLACKBOX is not defined 2020-02-05 10:59:54 -05:00
Bruce Luckcuck
f584780944 Gyro native rate sampling, filtering, and scheduler restructuring 2020-02-04 18:19:35 -05:00