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

19050 commits

Author SHA1 Message Date
Ivan Efimov
ef81595f1d
Separate autopilot multirotor from autopilot wing - dummy files for wing (#14108)
* separate autopilot multirotor from autopilot wing - dummy files for wing

* fix for lisence header for new files

* filling empty PG structures with uint8_t dummy
2024-12-30 22:36:33 +01:00
Leo Garcia
2a50634f67
update serTcpOpen declaration to fix compile errors (#14113)
update serTcpopen declaration to fix compile errors
2024-12-29 07:41:32 +11:00
Jay Blackman
31bd403446
Adding support for UART0 (#14094) 2024-12-28 16:55:15 +11:00
Jay Blackman
01d862f803
PICO changes (#14105)
* PICO changes
* Spelling corrected in API v2
* Corrected as per @ledvinap - granted will be generated in future.
* As per @tstibor
* Correction and comment as per @ledvinap
2024-12-26 14:53:27 +11:00
Mark Haslinghuis
59e308ae56
Position hold depends on GPS (#14101) 2024-12-25 16:39:04 +11:00
Jay Blackman
b826ce3df9
Ditching default target for make in favour of make all (#14099) 2024-12-24 00:21:34 +01:00
jpmreece
d22d8405c2
LED Dimmer (#13776)
* LED Dimmer

Build with EXTRA_FLAGS=-DUSE_LED_STRIP

Tested on SpeedyBeeF7V3

Added adjrange to update the ledstrip_brightness variable. This allows for easy changing of LEDs without having to connect to the configurator.

* Added Unit Tests, Space to Tab

Added unit tests into rx_controls_unittest.cc. The LED brightness is returned as 50 for testing purposes.

Changed tabs in ledstrip.c & .h and rc_adjustments.c to 4 spaces for coding standards.

* Update src/main/fc/rc_adjustments.h

Missed a tab in rc_adjustments.h

Co-authored-by: nerdCopter <56646290+nerdCopter@users.noreply.github.com>

* Update src/main/fc/rc_adjustments.c

Removal of empty line

Co-authored-by: nerdCopter <56646290+nerdCopter@users.noreply.github.com>

* Update rc_adjustments.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/io/ledstrip.c

* Update src/main/io/ledstrip.h

* Update src/test/unit/rc_controls_unittest.cc

---------

Co-authored-by: nerdCopter <56646290+nerdCopter@users.noreply.github.com>
Co-authored-by: Jay Blackman <blckmn@users.noreply.github.com>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2024-12-23 21:28:43 +01:00
Thomas Stibor
00bcbdd897
Fix typo in Makefile for populating configuration targets (#14100) 2024-12-23 07:29:11 +11:00
Petr Ledvina
ac82d8b998
Refactoring of PR 13050 - support for custom OSD messages from external device (#14097) 2024-12-22 15:44:08 +11:00
Mark Haslinghuis
cab60b6594
Add RANGEFINDER and OPTICALFLOW MT build option (#14042) 2024-12-21 08:34:01 +11:00
Mark Haslinghuis
7f6475d391
STM32H5 timer definitions (#13685) 2024-12-21 08:20:09 +11:00
ahmedsalah52
d244239f39
opticalflow mt sensor added (#14038)
* opticalflow mt sensor added

* set the processedFlow to raw when no rotation

* use sin and cos approximations

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/sensors/opticalflow.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactoring

* not needed anymore

* update

* Update src/main/sensors/opticalflow.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/sensors/opticalflow.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/drivers/rangefinder/rangefinder_lidarmt.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* update

* rm prototype

* clean up

* Update src/main/drivers/opticalflow/opticalflow.h

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/drivers/opticalflow/opticalflow.h

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* update flip_y

* Update src/main/drivers/opticalflow/opticalflow.h

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/drivers/rangefinder/rangefinder_lidarmt.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/drivers/rangefinder/rangefinder_lidarmt.h

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/sensors/opticalflow.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/sensors/opticalflow.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/sensors/opticalflow.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* rm casting

* update op rotation

---------

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2024-12-21 05:47:36 +11:00
Petr Ledvina
2f21754a69
Improve serial_post.h (#14096) 2024-12-21 05:01:00 +11:00
Jay Blackman
7dec49ce42
Corrected missed USE_ACC logic and some minor cleanup (#14093) 2024-12-20 15:22:22 +01:00
nerdCopter
f27da4ed8d
./src/utils/ trim trailing whitestpaces (#14082) 2024-12-20 17:15:41 +11:00
Steve Evans
b890220197
Don't handle non-MSP characters on VTX MSP port (#14091)
* Don't handle non-MSP characters on VTX MSP port

* Remove check for CLI active on VTX MSP port as it can no longer be enabled

* Only include check for MSP display port if USE_MSP_DISPLAYPORT is defined
2024-12-18 22:37:18 +00:00
Steve Evans
5dc5a8e973
Adjust info/warning status (#14088) 2024-12-16 20:55:23 +01:00
Mark Haslinghuis
aab21384f6
Update cloud build defines (#14080)
Update build_info
2024-12-10 23:38:18 +01:00
Petr Ledvina
0f84c5285d
MAKE - improvement (#14079)
* MAKE - improvement

- specify SDK file for each target pair on linux and macosx
- verify checksum before unpacking downloaded file (curl ignores server
   certificate)
- infer ARM_SDK_DIR from SDK file name
- detect installed SDK, checking that it is newer than downloaded
   file (.installed file in SDK dir)
- fix unzip on windows (doubly nested SDK directory was created)

* MAKE - fix .zip handling

* MAKE - unintended space on windows
2024-12-10 22:35:34 +01:00
nerdCopter
17cef3bba0
PreArm allow Re-Arm (without resetting PreArm AUX) (#14013)
* added prearm_until_first_arm setting

* Update src/main/cli/settings.c

space removed

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* increased PG revision

* prearm_allow_rearm

* Update src/main/fc/rc_controls.c

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

---------

Co-authored-by: sprv <sprv.nikita@gmail.com>
Co-authored-by: sprv <86803346+niksprv@users.noreply.github.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Jan Post <Rm2k-Freak@web.de>
2024-12-10 13:57:04 +01:00
Mark Haslinghuis
9fc83c665f
Adjust BOX3D boxname (#14078) 2024-12-10 10:54:24 +11:00
Mark Haslinghuis
58e3d2a817
Fix PPM feature (#14072) 2024-12-09 15:58:43 +01:00
Petr Ledvina
663427b303
OSD - fix macro arguments (#14074) 2024-12-09 15:52:30 +01:00
Jay Blackman
8ef734408f
Adding 'size optimised' file list validity check (#14063)
* Adding 'size optimised' file list validity check

* NL at EOF
2024-12-09 15:49:26 +01:00
Mark Haslinghuis
2426f43502
Update external defines for ALT / POS HOLD (#14069)
* Update external defines for ALT / POS HOLD

* Update unit test define
2024-12-08 16:23:38 +01:00
Steve Evans
b5ab83b3bc
AT32 SD card support (#14070) 2024-12-08 07:52:58 +11:00
timmyfpv
896c8ee29b
Support for apple silicon (M-series) chip. (Right version of Arm GNU toolchain) (#14065) 2024-12-07 07:25:39 +11:00
Mark Haslinghuis
4b78aeec51
Fix arming disable flag and OSD warning buffer size (#14057)
* Fix missing arming disable flag

* Add test for array length

* Fix array init && add getter

* armingDisableFlagNames is no longer external

* Update array

* Thanks ledvinap

* Revert designated initializers

* Increase OSD Warnings buffer size

* Remove standard libraries

* Refactor

* Update pos

* Restore comment

* Micro optimize

* Extract condition

* Another optimization

* Use cmpTimeUs (not cmp32)

* Revert STATIC ASSERT string change

* Adjust esc sensor warning

* I like this

* Optimize intended minimum width

* revert Optimize intended minimum width

* Is dshot telemetry and esc telemetry exclusive

* Fix conflict

* OSD - WARNINGS_PREFERRED_SIZE

* OSD - Return NONE for no flag
2024-12-06 15:33:25 +01:00
ctzsnooze
3138141cd1
Position hold for 4.6 and Altitude Hold updates (#13975)
* autopilot naming, function sharing
* initial position hold setup
* get current gps location
* first position hold draft
* basic control scheme
* add debug values for testing
* first working example with smoothed acceleration
* add deadbands
* Re-organise included files and functions thanks Karate
* revise PID gains
* PIDJ distance controller, not velocity based. Remove airmode check
* sanity check notes
* fix pid bug and improve iTerm handling
* calculate PIDs independently for each axis, increas DJ gains
* adjust pids and smoothing; smoothing cutoff to settings
* force iTerm to zero when close to target
* allow earth referencing in alt and pos hold
* stop activation until throttle raised, but not require airmode
use wasThrottleRaised in place of isAirmodeActivated where airmode isn't really needed
* remove unnecessary debug
* block arming if poshold or althold switches are on
* basic sanity check and OSD warning
* allow user to fly without mag only if they reverse the default
* separate alt and pos hold deadbands
if poshold deadband is zero, sticks are ignored
if user tries to enable posHold and it can't work, they get stick with a deadband
* try to prevent position hold if no mag without valid IMU
fixes a bug in the last commit, also
* retaisn iTerm just attenuate the output
* struct for values
* reset position at start when slowed down, retain rotated iTerm back
* resolve bounceback and remove iTerm attenuation
* adjust PID gains to 30
* force unit tests sto work
* tidy up after merge
* Use mpif
* conditionally only do compass check if Mag is defined
* fixe defines and remove const
* comments to explain strange rc multiplier
* fix small omission when refactoring after throttle raised PR
* licence updates, refactoring from review comments
* fix issues when pos hold deadband is set to zero
* A for acceleration element, not J
* compact the posHoldUpdate() function - thanks K
* rename showPosHoldWarning to posHoldFailure
* Use a function in gps.c to initate the posHold activity on new GPS data
* Use autopilotAngle in place of posHoldAngle
* separate function for gpsHeading truth
* use FLIGHT_MODE(POS_HOLD_MODE) in place of isPosHoldRequested
* removed non-required definitions
* fix failure to initiate position hold from error in ifdef
* refactoring from reviews, rename posHoldReset
* move deadbands for pos and alt hold to their config files.
* comment
* fix for blackbox breakup of GPS values
reverts use a function in gps.c to initate the posHold activity on new GPS data
* fix for msp change for posHoldConfig
* try to constrain aggressiveness at start, smaller deadband
* allow greater overshoot at the start for high incoming speed
rename justStarted to isDeceleratingAtStart
* dynamically update smoothing at the start
* retain iTerm when moving sticks, to keep attitude in the wind
* fix unit tests
* finally retain iTerm correctly while moving sticks, but reset at start
* Fix iTerm reset and parameter rotation
* absolute rotation vs incremental rotation, fix spike after resetting target location
* don't rotate D or A, it reverses their sign inappropriately
* Block yaw, allow in CLI, option to apply yaw correction code
* restore debug
* calc D from groundspeed and drift angle
* add back some target based D
* Earth Frame iTerm vector
appears to work :-)
* fix unit test
* lower PID gains, slowly leak iTerm while sticks move
* earth ref Dterm, not from GPS Speed
smoother than using GPS Speed and heading
* stronger PIDs
* adjust debug
* shoehorn the unit tests
* Proper earth referencing, at last
* clean up a bit
* no need to duplicate wrapping done in sin_approx
* add note about PT1 gain on PT2 filters
* avoid unnecessary float conversions
* Remove unnecessary CLI testing params
* update PID gains, stronger tilt angle correction
* improved distance to target. thanks to demvlad
* Terminate start individually on each axis
added comments
* refactoring to avoid code duplication
* implement reviews, reduce PID gains
* upsampling filter at 5Hz
* warn if posHold mode requested but throttle not above airmode activation point
* disable angle feedforward in position hold
* rebase, pass unit test
* sequential PT1's, refactoring from reviews
* PID and filter revision
* bane of my life
* lenient sanity check, message for noMag, possible DA vector limit code
* replace angleTarget in pid.c only when autopilot is active
* rearrange status checks
* fix debug, tidy up EF axis names, add comments about sign and direction
* stop more cleanly, easier sanity check, phases, debugs complete
* extend sanity check distance while sticks move; refactor; comments
* fix instability on hard stop, allow activation after arming but before takeoff
* make altHoldState_t  local, getter to pass unit tests.
* hopefully the last cleanup of this test file
* implement review from PL - thank you!
* restore angle limiting in pid.c , max of 80 degrees allowed in CLI
* fixes after review changes weren't right
* fix braces
* limit max angle to 50 by vector length
* Fix curly brackets, comments and debug mistake
* in autopilot modes, allow up to 85 deg for pos hold
* limit pilot angle in position hold to half the configured position hold angle
* use smaller of angle_limit or half the autopilot limit
* increase alt_hold sensitivity 5x and narrow deadband to 20
* make altitude control 5x stronger with narrower deadband and new name
* add suggestions from recent reviews
* start autopilot gpsStamp at 0
* renaming variables
* reset the upsampling filters when resetting position control
* improved gpsStamp thanks PL
Also cleanup names and notes
* simplify altitude control
* rename to GPS_distances  to GPS_latLongVectors
* alt_hold respect zero deadband, hold when throttle is zero
* remove unused debug
* fix unit test
* re-name variables in alt_hold and update comments
* more flexible limit on target vs current altitude
* updates from reviews, thanks karate
* review changes from PL
* more updates from PL review
* rationalise GPS_latLongVectors
* remove static newGpsData and rescueThrottle
* Thanks, PL, for your review
* Modifications, but has a big twitch when sticks stop
* Re-naming, fix the twitch, minor changes
* remove unnecessary unit test reference
* sanity dist to 10m at full stop, send task interval for upsampling filter
* vector and parameter re-name
Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com>
* small changes from review
Co-Authored-By: Mark Haslinghuis <8344830+haslinghuis@users.noreply.github.com>
Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com>
* comment PL
Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com>
* fix ltm alt_hold flightMode
* NOINLINE some pid.c functions
* Revert "NOINLINE some pid.c functions"
This reverts commit 56a3f7cec2.
* fast_code_pref the wing functions in pid.c
* use fast_code_pref where won't break the build
* apply fast_code_pref correctly
* NOINLINE some pid.c functions
FAST_CODE_PREF for updatePIDAudio
add comment to FAST_CODE_PREF
FIx platform.h unit test issue
Wing functions all FAST_CODE_PREF
* revert FAST_CODE_PREF changes
* Reduce ITCM RAM footprint considerably
* multiple name changes and some refactoring
Thanks, PL
* small editorial change
* refactoring, thanks PL
Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com>
* 64 bytes to check crossing 180 deg longitude
Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com>
* try to fix build error
Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com>
* Revert "try to fix build error"
This reverts commit f926d26021.
* just guessing here
* Revert "just guessing here"
This reverts commit ebc240a325.
* use a null location at initialisation
* Revert "use a null location at initialisation"
This reverts commit b51ae1395d.
* revert more compact initialisation code due to SITL error otherwise
* fix wrapping when 180 lon meridian is crossed
* null location option from PL
* Revert "null location option from PL"
This reverts commit ad40e979bd.
* refactor PosHold start/stop code
* move Alt_Hold and Pos_Hold warnings ahead of Angle, update some comments
* use setTargetLocationByAxis, fix comments
* change from karatebrot review
Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com>
* things still to do
Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com>
* keep warning strings 12 or less characters
Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com>
* a few more
Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com>

---------

Co-authored-by: Jan Post <19867640+KarateBrot@users.noreply.github.com>
Co-authored-by: Mark Haslinghuis <8344830+haslinghuis@users.noreply.github.com>
Co-authored-by: Petr Ledvina <2318015+ledvinap@users.noreply.github.com>
Co-authored-by: Jay Blackman <blckmn@users.noreply.github.com>
2024-12-06 13:04:00 +11:00
Jay Blackman
23605feb79
Adding check for speed optimised source validity (#14055)
* Adding check for speed optimised source validity
* Updated file location
* Common files to all HW
* Inadvertent inclusion
* VPATH reductions
- note simulator directory name change due to clash with MK file.
* Missed these MK files.
* Remove empty string
2024-12-05 07:28:02 +11:00
Viacheslav Zhivetyev
14628b9a4c
Fixed FLIGHT_MODE(PASSTHRU_MODE) not displayed in OSD (#14054)
* fixed FLIGHT_MODE(PASSTHRU_MODE) not displayed in OSD

* PASS instead of MANU
2024-12-03 13:58:24 +11:00
Petr Ledvina
1f4221cba8
Workaround: SERIAL_CHECK_TX is broken on F7 (#14052) 2024-12-01 03:21:28 +11:00
Jan Post
db44e9df9e
Collision Detection (#13010) 2024-12-01 03:20:15 +11:00
Jay Blackman
cfa5f0b2a1
./src/platform stage 3 (#14051)
* Removing more excludes from SITL.

* Ensure platform located files get optimised

* Fix unit test

* Revert file moves
2024-11-28 15:43:25 +01:00
Mark Haslinghuis
4bf2f1294e
Add Winbond W25Q512J support (#14036)
Add W25Q512 (JV) support
2024-11-26 23:44:42 +01:00
Mark Haslinghuis
1c51c6d903
Bump ARM SDK to version 13.3.rel1 (#14039) 2024-11-26 21:53:38 +01:00
Jay Blackman
53d44aa1b1
Adding common source location in ./src/platform (#14044)
* Adding common source location in ./src/platform

To enable the continued clean up of multiple files still in ./src/main/driver (more PRs to follow) that are specifically for AT32, APM32 and STM32

Source will be moved to MCU_COMMON_SRC where it is specifically for that MCU (or variant). The test will be to ensure no files in the MCU_EXCLUDES for SITL.

* Use of +=
2024-11-25 21:16:45 +01:00
Vladimir Demidov
63514c2b54
Added flight IMU pitch, roll, yaw attitudes to blackbox log (#14020)
* added attitude fields desriptions

* the attitude (imu pitch, roll, yaw) added to blackbox log

* Global variable imuAttitudeQuaternion[3] is added to store current normalized imu attitude quaternion

* IMU attitude quaternion added to log instead of Euler angles

* blackbox logging of IMU attitude quaterions is replaced to GYRO group

* Revert "blackbox logging of IMU attitude quaterions is replaced to GYRO group"

This reverts commit a6020ed6b6.

* code refactoring: use quaternion as global variable instead of float[3] array

* USE_ACC apply for attitude log

* quaterion struct data type is changed to union quaternion_t

* resolved issue of Test module

* Code style improvement: removed empty codes row

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Added STATIC_ASSERT check of quaternion components sequence.

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Code style improvement

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Resolved code issue

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* resolved wrong data type name

* STATIC_ASSERT error resolved

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Improved assert condition

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* added ATTITUDE condition for attitude blackbox log

* added blackbox_disable_attitude cli command

* Attitude position changed in blackbox disabling fields list

* resolved issue wrong quaternion log record condition

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-11-25 17:32:58 +01:00
Vladimir Demidov
57d32ea1da
Logging of the S -term values in blackbox for Fixed wings. (#14012)
* The S term values are added to blackbox logging for airplanes

* The axisS log fields are placed into NONZERO_WING_S_n group
2024-11-23 18:08:47 +01:00
Ivan Efimov
e422e42122
trailing spaces after #14010 (#14031) 2024-11-18 17:52:20 +01:00
Ivan Efimov
1c1c78f80f
TPA mode PDS + Wing setpoint attenuation (for wings) (#14010)
* TPA mode PDS + Wing setpoint attenuation

* removed brackets by haslinghuis :)

* Ledvinap's review

---------

Co-authored-by: limonspb <gendalf44@yandex.ru>
2024-11-16 02:07:13 +01:00
nerdCopter
ed6a4a4769
duplicate emptyline removal (#14027)
* trailing space removal

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* deduplicate empty lines

---------

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2024-11-15 23:07:25 +01:00
nerdCopter
493b9bf819
trailing whitespace removal (#14026)
trailing space removal

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-11-15 22:19:13 +01:00
Steve Evans
0de6278433
Driver for CADDX camera GM3 gimbal (#13926)
* Driver for CADDX camera GM3 gimbal

* Update src/main/cli/settings.c

Fix copy-paste error on variable name.

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/io/gimbal_control.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/io/gimbal_control.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/io/gimbal_control.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Only forward gimbal data with good CRC

---------

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-11-12 20:29:56 +01:00
ahmedsalah52
b70e98ed5a
MSP Range finder added (#13980)
* MSP Range Finder added (configured and tested on the MTF-01P Lidar)

* MSP Range Finder added (configured and tested on the MTF-01P Lidar)

* fix the license of the added files from INAV

* Update src/main/drivers/rangefinder/rangefinder_virtual.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Update src/main/msp/msp.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Update src/main/io/rangefinder.h

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Update src/main/msp/msp.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* refactored the code of INAV for the MSP rangefinder, to be extendable to other MSP rangefinder and more specific about the parameters of the supported ones

* Update src/main/drivers/rangefinder/rangefinder_lidarmt.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/drivers/rangefinder/rangefinder_lidarmt.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactored the code for readability

* mt lidar msp address

* us the delay MS from the dev directly

* todo

* MT device type datatype

* refactored the code for readability

* spacing

* refactoring

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactoring

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactoring

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactoring

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactoring

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactoring

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactoring

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactoring

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* after the edits fix

* rm idx

* typo fixed

* i think this shouldn't be here

* spacing

* Update src/main/drivers/rangefinder/rangefinder_lidarmt.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* fix mt models ranges

* remove mt01p model, it doesn't map

* rm "MT01P", it doesn't support map

* rm mt01p, it doesn't support msp

* Update rangefinder_lidarmt.h

* update mt lidar deadzone

* Update rangefinder_lidarmt.c

* Update rangefinder_lidarmt.c

* rm unused variable mtfConnected

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-11-12 08:42:20 +11:00
Steve Evans
778f93f119
Revert restriction of reading across page boundary (#14015) 2024-11-10 14:53:22 +01:00
Jan Post
061ebcebe7
Chainable vector operations (#13996)
* chainable vector ops

* add subtraction

* Reduce register pressure
2024-11-08 20:38:38 +01:00
Ivan Efimov
89f2ec9880
Angle pitch offset (for wings) (#14009)
* angle pitch offset (for wings)

* made angle_pitch_offset int16, and changed direction to follow BF convention

* Update src/main/blackbox/blackbox.c

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

---------

Co-authored-by: Jan Post <Rm2k-Freak@web.de>
2024-11-08 20:15:09 +01:00
Mark Haslinghuis
56a3688d7d
Change default I2C adddress for IST8310 (#13995) 2024-11-08 20:14:33 +01:00
Petr Ledvina
4d697c2ce1
Serial refactor fix (#14007)
* VCP - zero-init USB port in usbVcpOpen

* Serial - serialPortIdentifier_e is signed

* UART - remove unused serialPortCount

* UART - allow compiling spectrum without UART

* UART - minor improvements

closeSerialPort tests for NULL,
no other functional changes
2024-11-06 22:58:10 +01:00