1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00
Commit graph

135 commits

Author SHA1 Message Date
Mark Haslinghuis
cffe79e387
[4.5.1] Set next state expected time on per element basis (#13706) (#13713)
Set next state expected time on per element basis (#13706)

* Set next state expected time on per element basis

* Rename osdNextElement to be clearer

Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
2024-06-25 07:51:08 +10:00
Steve Evans
565de1b68b
Use the cached value of useDshotTelemetry to ensure consistent runtime use if dshot_bidir is changed (#13589) 2024-04-28 09:31:50 +10:00
Eike Ahmels
6e62cdf067
set default of spec prearm screen to false if race pro not defined (#13547)
* set default of spec prearm screen to false if race pro not defined

* Simple variant - thanks Ledvinap

---------

Co-authored-by: Eike Ahmels <ea@weslink.de>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2024-04-20 23:19:45 +02:00
ctzsnooze
5457032838
Use PDOP consistently, since it replaces HDOP (#13477) 2024-04-04 09:08:40 +11:00
Steve Evans
dc00d34bfd
Render spec screen over normal OSD (#13460) 2024-03-21 18:59:18 +01:00
Steve Evans
af51e00773
Fix OSD task timing when using MSP (#13388)
Add uartWriteBuf() to improve performance
Optimised transmit buffer space check
Tidy up group duration calculations
Add uartBeginWrite, uartEndWrite and serialWriteBufNoFlush
Remove OSD grouping and check on the fly. Implement multi-pass artificial horizon rendering.
Fix rendering of camera frame
Fix stick overlay background rendering
Fix channel rendering
Fix ESC information rendering
Make Spec Prearm Display deterministic

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-03-11 17:46:06 +00:00
Mark Haslinghuis
2cd24cf02a
Set OSD elements to HD defaults if build includes USE_OSD_HD (#13325)
Make HD the default option if included in build
2024-01-24 23:55:09 +01:00
Steve Evans
17e43e3363
Fix OSD defaults based on SD/HD (#13320)
Fix OSD defaults based on SD/HD and validate changing video_system to/from HD
2024-01-23 00:56:25 +01:00
Mark Haslinghuis
f1cbd83f06
Rename USE_QUICK_OSD_MENU (#13273) 2024-01-08 17:39:51 +11:00
Ivan Efimov
477c9801bc
Changed some defaults for RACE_PRO (#13215)
* Changed some defaults for RACE_PRO

* Update src/main/flight/imu.c

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

* Update src/main/osd/osd.c

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

* Update src/main/flight/failsafe.c

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2023-12-12 01:41:38 +01:00
Ivan Efimov
31c5beaf78
OSD spec prearm screen if defined USE_SPEC_PREARM_SCREEN (#13210)
* OSD spec prearm screen if defined USE_SPEC_PREARM_SCREEN

* osd spec prearm PR suggestions

* OSD_SPEC karatebrot logic suggestion

* Update src/main/osd/osd.c

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

---------

Co-authored-by: Jan Post <Rm2k-Freak@web.de>
2023-12-10 01:50:31 +01:00
Jan Post
5769b3021e
Dshot RPM Telemetry Refactoring (#13012) 2023-12-03 15:16:35 +11:00
Ivan Efimov
dfef3bfb0e
Added throttle flight statistics (#12978)
* Added throttle flight statistics

* Changed rc_stats.c/h license header to a modern one

* rc_stats.c Style fix
2023-08-06 17:32:57 +02:00
Ivan Efimov
9332248742
Adding OSD quick menu (#12977)
* QUICK CMS menu

* Added RPM LIMIT to quick menu

* rpm_limiter csm step = 100

* Renamings + USE_OSD_QUICK_MENU define

* Small fixes

* Style fixes

* tests makefile fix

* Activate quick menu by default, if defined USE_OSD_QUICK_MENU

* Changed .c/.h license headers to a modern one
2023-07-26 08:54:02 +10:00
Schuwi
c1694c2b60
Fix g force calculation (#12892) 2023-06-18 08:45:05 +10:00
SpencerGraffunder
aad197f791
Add GPS Lap Timer (#11856)
* Add gps lap timer

* change timing to GPS time instead of local time

* rebase and minor changes

* implement KarateBrot's suggestions

* follow ledvinap's suggestions, some OSD symbol changes

* move platform.h include to the top

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

* fix osd elements not showing, remove useless block

* cleanup, move pg stuff to pg folder

* cleanup from review

* minor mods to gps lap timer update, add number of laps tracked

* rename time variable

* add const to timeMs

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

* Update licenses, add is_sys_element macro

* update licenses

* round to nearest centisecond

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

---------

Co-authored-by: Jan Post <Rm2k-Freak@web.de>
2023-05-25 02:31:22 +02:00
Steve Evans
445758f3ec
Fix handling of attribute byte (#12701) 2023-04-21 00:15:04 +02:00
Steve Evans
1e3fcbfcee
Add osd_canvas_width/height variables (#12164) 2023-01-10 13:25:22 +11:00
Steve Evans
107d577a90
Fix reset PG behaviour and configurator interactions based on USE_OSD_SD and USE_OSD_HD definitions (#12152) 2023-01-08 20:49:28 +11:00
Steve Evans
a3a21d9233
Ensure OSD elements are on canvas (#12144) 2023-01-06 23:19:42 +01:00
Steve Evans
962a7d0cae
Center ARMED message and stats (#12086) 2022-12-26 22:07:16 +11:00
Steve Evans
28c3f4c7e4
Center logo and CMS display for HD OSD (#12056)
Center logo & CMS display
2022-12-17 03:02:46 +01:00
Steve Evans
c508b6644d
Apply OSD severity (#11996) 2022-11-20 12:24:09 +01:00
Steve Evans
3e51d15559
Add HD OSD support (#11964) 2022-11-15 12:58:14 +11:00
TonyBlit
22c5bf4eb3
Added RSNR to the OSD (#11062)
* Added RNSR to the OSD

* filtering with pt1

* update pgconfig ver

* rssi_smoothness and proper define wrapping

* missing define wrap

* smoothing moved to updateRSSI

* minor comment update

* fixed rx tests

Co-authored-by: Tony Cabello <>
Co-authored-by: J Blackman <blckmn@users.noreply.github.com>
2022-11-10 04:53:15 +01:00
Mark Haslinghuis
0213c263bc Adjust aux channel 2022-10-23 04:06:30 +02:00
Mark Haslinghuis
62e971266f Fix osd_aux_channel range 2022-10-19 12:49:30 +02:00
haslinghuis
7e441b5f4f
Merge pull request #11887 from KarateBrot/styledef
Remove old style definitions
2022-10-16 00:22:02 +02:00
haslinghuis
b84b8c1ca5
Merge pull request #11097 from mathiasvr/stdlib-abs
Use std abs() instead of ABS() macro
2022-10-14 00:37:29 +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
Alexey Stankevich
3984dd9e39 Rebase to master 2022-10-04 22:43:07 +03:00
Jon Mahoney
a2d356dc78 Watt Hours Drawn OSD Element and Post Flight Stat
The Watt hours used element was added per a feature request to give
another way of interpreting the battery usage. It was also added as a
post flight stat to show consumption similar to the mAh post flight
stat. This once again is just giving pilots another option that some may
find useful.
2022-09-19 23:36:23 -04:00
iso9660
0dd6d4d47a Unified all eRPM calculations into one single function
Fixed some review findings

Unified dshot average rpm calculations into one single function

Renamed calcEscRpm to erpmToRpm, and moved function to dshot.c

Removed unused esc_sensor.h header file from dshot.c

Removed esc_sensor.h header from modules that no longer needs it

Average RPM calculated by demmand only when rpm data is updated

Renamed rpm to averageRpm and fixed a bug

Update average rpm when telemetry data is received

Removed blank line

Fixed review findings

Fixed return values for erpmToRpm and getDshotAverageRpm so rpm value doesn't truncate

Restored osd_esc_rmp_alarm setting. This setting is used to set an alarm to notify when rpm  goes down a specified threshold. Rpm can go over 109krpm (1s 26kv motors setup), but a low rpm alarm doesn't have to be set to a so high value so at this time [0-32767] seems an acceptable range

Rebased to master
2022-09-17 00:26:17 +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
howels
04994e5439 Add USE_CRAFTNAME_MSGS to insert additional data into CraftName when osd_craftname_msgs is true 2022-08-04 21:59:49 +01:00
Štěpán Dalecký
f85ebba6a4 Refactoring of IMU and ACC 2022-06-28 18:26:10 +02: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
Hans Christian Olaussen
7cc4c448b7 FIx OSD visual beeper 2022-04-18 14:32:06 +02:00
Steve Evans
07f6bea174 Fix failsafe timings and behaviour to match Failsafe.md 2022-03-30 18:29:21 +01:00
haslinghuis
fc8318f54b
Merge pull request #11359 from alexeystn/fix_visual_beeper
Fix visual beeper
2022-01-30 02:29:42 +01:00
haslinghuis
8701d9141f
Merge pull request #11340 from SteveCEvans/osd_peak_task
Increase number of element groups and use peak hold task estimation for OSD
2022-01-30 02:29:12 +01:00
Steve Evans
cc67b2e87c Naming changes suggested by Hydra 2022-01-28 20:31:47 +00:00
Alexey Stankevich
da0a42aeda Fix visual beeper 2022-01-28 22:35:26 +03:00
Steve Evans
2e8d026b4e Add OSD_STATE_GROUP_ELEMENTS state to osdUpdate() and optimise DMA vs polled MAX7456 SPI access 2022-01-28 00:26:32 +00:00
Dominic Clifton
1c3e562ac5 OSD - Use async screen clear in OSD_STATE_UPDATE_CANVAS. 2022-01-27 16:31:38 +01:00
Steve Evans
28e596a500 Increase number of element groups and use peak hold task estimation for OSD 2022-01-26 22:24:21 +00:00
Dominic Clifton
765afa35b7 OSD - Fix code-style. 2022-01-23 15:31:50 +01:00
Dominic Clifton
023a7e5b00 OSD - Always use specifically named stats refresh phases in. 2022-01-23 15:29:15 +01:00
Dominic Clifton
e0f27197ff OSD - Remove unneeded call to schedulerIgnoreTaskExecTime in stats
refresh.
2022-01-23 15:26:01 +01:00