Function SD_Init() is called as follows:
./main/msc/usbd_storage_sdio.c: if (SD_Init() != 0) {
./main/drivers/sdcard_sdio_baremetal.c: if (SD_Init() != 0) {
./main/drivers/sdcard_sdio_baremetal.c: if (SD_Init() != 0) {
and checks whether return value is != 0, that is != SD_OK.
Previous implementation is working, however, cannot handle proper
SD_Error_t handling. In addition the code was refactored and simplified.
Improve the logic to be table-based and add validation of the rc_rates and expo values. The previous logic only validated the super-rates and the rc_rates can also be out-of-range when changing rates types. The expo values are also checked but currently all the rates types have the same constraints so there's no possibility currently of them being out of range. But this will allow for possible new rates type that have different constraints.
Since version 4.0.0 CLI variables:
* acc_cut_hz,
* accxy_deadband,
* accz_deadband,
* acc_unarmedcal
are removed from settings.c and thus can be also removed
from the CLI documentation page.
Fixes logic errors in #9574
For RACEFLIGHT rates the applicable `case` was missing so the logic defaulted to the BETAFLIGHT rates logic which incorrectly limited the maximum rate value to 100. RACEFLIGHT values range to 255.
For KISS rates the limit was set to 100 but the Configurator constrains to 99.
Changes the blink logic to be OSD task loop based instead of time based.
The previous logic used a 200ms time interval for the blinking which didn't align well with the default 12hz OSD update frequency resulting in the logic periodically missing intervals resulting in an inconsistent blinking.
As the revised logic is now tied to the OSD task iterations the blinking will be consistent. However due to the timing the blink will be slightly faster - 167ms (6hz) vs. the previous 200ms (5hz) intervals. Technically the blinking was 6hz before but stuttered every 5th blink.
Since the OSD task rate can be changed from the default 60hz, the logic will fall back to the time-based implementation for non-default task rates.
I did a test and added a lot of osd elements (basically all osd elements I can add, excluding GPS and ESC elements), and even some have overlapped. In this case, there is no problem at all. TxBufferSize is set to 1024. It is sufficient for normal conditions.