Fixed a bug in the STM libraries to set the write protected bin in the device config for the mass storage SCSI sense code 6 and 10. Previously the `isWriteProtected()` result was only being examined during write attempts and they correctly failed and returned a `NOT_READY` response (we don't support writes for SPIFLASH). Unfortunately since the device was not flagged as write protected on MacOS the operating system would try to write to the device and this would fail causing the operating system to think the device wasn't ready and refuse to mount it.
General fixes:
Ensured that the filesystem appears to be at least 256MB so that the volume will be treated as FAT32 instead of FAT16. A hidden "padding.txt" file is created to represent the extra space.
Fix the directory structure to only create the "btfl_all.bbl" file if there were any logs found. Previously it would always be created and this would lead to directory corruption.
Fix the size calculation for the "btfl_all.bbl" file. Previously it was being set to the total flash size rather than the used space.
Reduce the retraining sample count from 50 to 20. The initial training remains unchanged at 50 samples.
Speeds up the transition to a new detected frame rate and adjusts the filters to new optimal cutoffs quicker. As an example for CRSF: switching from 150hz to 50hz would take approximately 1 second (50 samples @ 20ms). After this change it will take approximately 0.4 seconds.
Home position is deinitialized on disarm at gpsUpdate, so it can't be missed
DistanceFlown is reset inside GPS_calculateDistanceFlown
DistanceFlown was not calculated properly
The DSHOT digital idle value is quite low (4.5%) and is often the cause of support issues as users are unaware that they may have to adjust this based on their motor/ESC requirements - leading to de-syncs and "death rolls" or other flip-outs.
While DSHOT capable ESC's (BLHeli_S & BLHeli32) have faster MCU's and are often capable of smoother low speed idling, 4.5% is still quite low. For comparison the `min_throttle` default is 1070 equating to a 7% idle.
I propose raising the digital idle to 5.5% to reduce occurrences of de-syncs from too low idle speed.
There have been a number of requests for this as it seems to be common for racers to tune these values and adjust the settings as they become more comfortable with a track. Previously the settings could only be adjusted in the CLI and required a computer. Adding them to the CMS makes it easy to adjust in the field.