Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dshot: check for bad pulses and handle wrap correctly
this ensures we handle timer wrap correctly, fixing bad dshot frames with ArduPilot, and also checks for much too narrow or wide pulses by making variables static this also saves flash and ram. Using REF_F031 as the benchmark we get: current REF_F031: Memory region Used Size Region Size %age Used SRAM: 0 GB 192 B 0.00% RAM: 3760 B 3904 B 96.31% FLASH_VECTAB: 192 B 192 B 100.00% FLASH_VERSION: 16 B 16 B 100.00% FLASH: 23260 B 27408 B 84.87% FILE_NAME: 32 B 32 B 100.00% EEPROM: 0 GB 1 KB 0.00% with this PR: Memory region Used Size Region Size %age Used SRAM: 0 GB 192 B 0.00% RAM: 3704 B 3904 B 94.88% FLASH_VECTAB: 192 B 192 B 100.00% FLASH_VERSION: 16 B 16 B 100.00% FLASH: 23244 B 27408 B 84.81% FILE_NAME: 32 B 32 B 100.00% EEPROM: 0 GB 1 KB 0.00% so we save 54 bytes of ram and 16 bytes of flash, while fixing the wrap issue and adding pulse width checks
- Loading branch information