1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00
Commit graph

108 commits

Author SHA1 Message Date
ctzsnooze
254da8f460
Altitude hold for 4.6 (#13816) 2024-09-04 20:29:03 +10:00
Mark Haslinghuis
915caae88d
Fix code style (#13429)
Fix GPS arming flag when BOXGPSRESCUE is enabled but procedure is not set to GPS_RECUE
2024-03-11 14:34:18 +01:00
Eike Ahmels
214946bc3f
AT32F435 camera control (#12913)
* [AT32] camera control

* remove comments

* change to mcu specific implementation

* fix includes
2023-07-10 15:54:20 +10:00
Kevin Plaizier
18587e1504
Remove code comments using word retarded (#12592)
Remove comments using word retarded

Correct the comment about gyro_cal_on_first_arm and remove comment about retarded arm.
2023-03-30 08:48:51 +11:00
ctzsnooze
08db8745ed
Remove getRcStickDeflection and areSticksInApModePosition (#12198)
* remove unused areSticksInApModePosition

* remove getRcStickDeflection
2023-03-23 10:08:52 +11:00
ctzsnooze
e957f0dfa6
Improve GPS Rescue Pitch smoothing and disarming (#12343) 2023-03-08 16:10:25 +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
Mathias Rasmussen
9957ceb275 Fix function brace style 2022-10-12 16:31:55 +02:00
ctzsnooze
41b31214d9 simplification, thanks Stepan 2022-06-23 13:41:58 +10:00
ctzsnooze
f7c645bfcd update GPS code 2022-06-13 09:43:52 +10:00
Ivan Efimov
8ff89b5ed0 Change ACC Trim step to 1 (for stick commands) 2022-05-06 23:30:37 -05:00
Steve Evans
fc8640154a Interrupt/DMA driven SX1280 interaction for ELRS 2022-02-28 19:50:36 +00:00
Bruce Luckcuck
19ece68555 Add box mode to disable stick commands
Adds a `STICK COMMAND DISABLE SW` mode used to prevent inadvertant triggering of controls, calibrations, or settings changes. Useful for USB HID mode when using the flight controller as a joystick (and auto-detect doesn't work), in "team" or "relay" racing where multiple quads might be bound to the same transmitter, or just in general if the user wants prevent stick commands.

Will also prevent stick arming when the mode is active (but not stick disarming).
2020-09-15 12:51:19 -04:00
dkustec
60cc80825a Disable stick commands when HID is active and USB is connected
Moved to shared code and cms.c refactoring

Added missing line endings and comments

Passing tests - defines added

Added missing definition

Added check for USE_USB_CDC_HID in cmsUpdate

Code refactoring and condition change

Remove unnecessary include

Disable stick commands when HID is active and USB is connected

cdcDeviceIsMayBeActive refactored

Disable stick commands when HID is active and USB is connected
2020-08-24 15:38:33 +02:00
mikeller
5b58c300b6 Removed unused 'io/motors.h' header file. 2020-06-29 18:49:06 +12:00
mikeller
db4bd1f186 Cleaned up the scheduler. 2020-03-16 08:35:58 +13:00
Dominic Clifton
2fead0aedf Log disarm reason. 2020-01-16 20:16:11 +01:00
mikeller
a045a9c672 Improved compass calibration. 2019-11-19 01:08:44 +13:00
Michael Keller
6ecf864ad9
Disable stick arming by default, require settings change to ena… (#9183)
Disable stick arming by default, require settings change to enable
2019-11-18 14:18:31 +13:00
mikeller
ef556c0f59 Introduced 'baroStartCalibration()' / 'baroSetGroundLevel()' to make barometer code more self contained. 2019-11-17 23:34:10 +13:00
Bruce Luckcuck
7087a5c87b Disable stick arming by default, require settings change to enable
Previously stick arming was assumed to be the case if an arming switch was not configured. This leads to a less safe default state and can lead to beginners thinking that stick arming is the default.

This change adds an `enable_stick_arming` setting which defaults to `OFF`. For stick arming to function the user must actively change this setting. The previous condition about there not being an arming switch configured still applies.
2019-11-16 18:23:01 -05:00
mikeller
a21d0f5d31 Fixed potentially incorrect calculation in ACC calibration if non-default cycle number is used. 2019-11-17 10:58:28 +13:00
mikeller
4a7904695e Moved 'config.[ch]' into the 'config/' directory. 2019-10-28 11:17:25 +13:00
mikeller
4fb58b340e Extend the scope of BOXPARALYZE to cover stick commands, adjustments, and CMS. 2019-05-06 01:28:37 +12:00
mikeller
760a524027 Fixed tests, added crash indication. 2019-04-05 08:39:23 +13:00
mikeller
b5908f5bab Applied 'USE_ACC' consistently. 2019-02-08 09:51:48 +13:00
Michael Keller
d4f71bba63
Merge pull request #7534 from etracer65/optimize_rc_modes_processing
Optimize rc modes activation conditions processing
2019-02-06 15:38:11 +13:00
Bruce Luckcuck
42af168854 Optimize rc modes activation conditions processing
Analyze the rc modes activation conditions and only process configured entries. Previously the entire possible list was processed even though typically only a handful are configured.

Reduces the RX task processing time by about 25% (~44us to ~33us) with an average setup of 3 modes configured (F405, SBUS). Processing time savings will diminish as the user configures more modes. But typically far fewer than the maximum of 20 will be configured.
2019-02-05 16:05:16 -05:00
jflyper
cc0e689bb5 Add USE_ACC conditionals 2019-02-04 20:37:43 +09:00
Bruce Luckcuck
3d671c7134 Use fabsf() instead of ABS() for floats
The ABS() macro doesn't handle -0 floats correctly. Also fabsf() is more efficient.
2019-01-19 14:15:54 -05:00
mikeller
53278c08f8 Fixed PID profile switching. 2018-12-15 22:53:12 +13:00
Bruce Luckcuck
c676ce2f52 Fix initial stick arming when gyro_cal_on_first_arm is used
Previously the initial arming attempt would initiate the gyro calibration but then fail because gyro calibration was underway. The user is confused as they're holding the arming sticks but nothing is happening. This always forced the user to release the arming stick command and then perform a second arming stick command to actually arm.

After the fix the initial arming will proceed as long as the pilot holds the arming stick command through the duration of the gyro calibration (1.25 seconds by default). This seems normal to the user as they're waiting for the motors to start (or at least the arming beeps) before releasing the sticks anyway.
2018-10-15 10:15:07 -04:00
mikeller
0bce8549ee Renamed 'fc/fc_' files to remove the double 'fc'. 2018-08-26 14:07:06 +12:00
mikeller
6de1c32d9d Added shadow copies for CLI and MSP. 2018-08-21 00:36:47 +12:00
mikeller
c99629bbf1 Removed calls to (latching) 'feature()'. 2018-08-21 00:35:55 +12:00
Bruce Luckcuck
1e6e9e719f Add guard time between dshot beacon and arming/disarming
Tries to prevent DSHOT beacon commands from interfering with commands to set the motor direction.

Adds a 2 second delay after disarming before DSHOT beacon commands will be sent. This attempts to prevent the beacon commands from interfering with the motor direction reset that happens after using crash flip mode.

During arming if a DSHOT beacon command has been sent within 2 seconds the arming will be delayed until the 2 seconds have passed. This attempts to prevent interference with the motor direction commands sent at arming.
2018-06-09 18:59:59 -04:00
jflyper
041bfb22c6 Create a pg for rxConfig 2018-05-27 09:13:04 +09:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
Austin
4d3666b77b Fix for minthrottle when feature 3D and PWM enabled (#5102)
* Fix for minthrottle when feature 3d and pwm enabled

* add parameters for min and max 3d output

* bug fix

* remove new parameters from msp

* remove new parameters again

* fixed indentation
2018-03-09 06:44:17 +13:00
Bruce Luckcuck
2610344266 Disable stick command processing while ARMING_DISABLED_RUNAWAY_TAKEOFF is set
Addresses the rare possibility that if runway takeoff triggers and disarms while the pilot has the sticks in some valid stick command configuration. Prevents the stick command from processing until the craft is disarmed and the ARMING_DISABLED_RUNAWAY_TAKEOFF condition is cleared.

For example, if the pilot was mid throttle and went full yaw right and runway takeoff triggered, then camera control would have be entered.
2018-02-24 09:29:19 -05:00
mikeller
232fc4e8de Unified BOX3DDISABLE and BOX3DONASWITCH switches. 2018-02-13 20:02:02 +13:00
Michael Keller
e4b96eb97a
Merge pull request #5073 from wind0r/remove_disarm_kill_switch_disable
remove setting which disallow disarming on throttle above low
2018-02-02 00:50:50 +13:00
Bruce Luckcuck
a32b05c284 Initial implementation of Runaway Takeoff Prevention (anti-taz)
Detects runaway pidSum values on takeoff and auto-disarms to prevent the "Tasmanian Devil" caused by incorrect props, wrong motor order/direction, incorrect flight controller orientation, etc.  After a successful takeoff and normal flight is detected the feature is disabled for the remainder of the battery.
2018-01-31 07:36:16 -05:00
Steffen Windoffer
45a6588eaf remove setting which disallow disarming on throttle above low 2018-01-30 23:48:54 +01:00
Martin Budden
a7544f3b9d Minor ROM size optimisation of rc_controls 2018-01-20 15:17:33 +00:00
mikeller
385623bd9d Converted defines for VTX_COMMON, VTX_CONTROL, VTX_RTC6705, VTX_RTC6705SOFTSPI, VTX_TRAMP, VTX_SMARTAUDIO to use USE_ prefix. 2018-01-09 17:34:34 +13:00
mikeller
b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00