- stm32h7xx_hal_rcc.c: Prevent signed-unsigned comparison warning
- [USBLIB] Take care of unused parameters
- [LIB] Stop signed-unsigned comparison warning (rcc_ex)
- Modify HAL SPI driver for const-ness to match call from current bus_spi driver
- [LIB] Handle unused in stm32h7xx_hal_flash.c
- UNUSED care for stm32h7xx_hal_rtc_ex.c
- UNUSED care for stm32h7xx_hal_pwr.c
- UNUSED care for stm32h7xx_hal_pcd.c
- UNUSED care for stm32h7xx_hal_flash.c
- UNUSED care for stm32h7xx_hal_adc_ex.c
As described in RM0433 section 49.4.13 "Data packing", STM32H7's SPI data register supports data packing and it is sensitive to actual access width.
The original code used pointer casting to obtain a code to access the register in a desired size.
However, these operation results in strict aliasing warnings (deferencing punned pointer) and are not desirable.
Here, we declare a union that allow access to a 32-bit register in 8, 16 or 32-bit width and cast pointer to the original RXDR and TXDR data registers and then access the portion of the register through an appropriate union member.
XXX FIXME Only handled 16-bit access case, as 32-bit (original declaration) and 8-bit (allowed) cases do not generate warnings, but these should be handled similarly for correctness and consistency of the code.
Broken in e44f75b4a7.
Problem caused by not checking both of the bits after masking.
Prior to this commit the code would incorrectly attempt to use GYRO1
when only GYRO2 was detected resulting in a segfault.
Captures packet quality statistics per motor to provide a platform for troubleshooting and in-flight alarms or warnings.
Continuously monitors and captures packet stats over the past second to be used to determine DSHOT telemetry link quality.
Update the CLI to move the DSHOT telemetry data/stats out of the `status` command and into a dedicated `dshot_telemetry_info` command. Reformatted the motor data to include the invalid packet percentages. Will aid in debugging by identifying ESC's that may be misconfigured (not supplying data), or those with problems generating high invalid packet percentages.
Data can later be used to generate OSD and beeper-based warnings if invalid packet percentages exceed thresholds.
Included a blackbox logging debug mode (`set debug_mode = DSHOT_RPM_ERRORS`) to record the per-motor invalid packet percentages in hundredths of a percent (so 123 is 1.23%).
Will dynamically determine the number of active OSD stats lines that are being displayed (accounting for user selections and #define logic) and maximize the number of stats that can be displayed based on the current video format (13 for NTSC, 16 for PAL).
If the number of stats is equal to or greater than the available display lines, the heading will be suppressed and used instead for an extra stats line.
The entire stats page will be centered vertically based on the screen size determined by the video format.