Fixes a copy/paste error introduced in #8282.
Only a cosmetic bug that affected the informational blackbox header. Had no effect on RC smoothing operation.
Significantly reduces the time the OSD task spends drawing elements that are completely or mostly static. The larger the element the more time savings are realized. Currently implemented support for:
- Crosshairs
- Artificial Horizon Sidebars
- Craft name
- Display name
- Stick overlay
Since the static portions are only rendered once, the static elements add no processing time to the OSD task. As an example, enabling the above elements prior to these changes results in a total rendering time of 47us. After the enhancements they take only 6us (basically the rendering phase minimum overhead). So effectively 41us are removed from the OSD task.
Opens the possibility to add large mostly static elements with no additional overhead. An example would be a camera framing element that might draw a "box" around most of the screen. Previously this would add significant processing overhead to the OSD task, but now it will have no impact.
In recent releases we have been increasing PID I.
We haven't reduced the antigravity gain value in the same proportion.
Low authority / low P quads can get I wobbles that are apparent on throttling up.
A lower default anti-gravity gain is likely to work alright and be a fraction less likely to cause I wobbles.
The max7456 driver performs a "stall check" looking to see if the device had stopped responding. It does this by reading the VM0 register and comparing it to the in-memory version. Presumably if communication failed because the device isn't responding then the result of the SPI transfer would be an unexpected value. If the incorrect value was returned then it would trigger a reinitialization in the hopes of getting the device to respond.
The problem is that this check was happening on **every** call to `displayDrawScreen` unnecessarily. So in the case of the OSD using the max7456 it would happen every 16.7ms (60hz) which is clearly overkill. The unnecessary register check was adding a fixed ~7us to every iteration of the OSD task (along with potential extra bus contention). So now the "stall test" is only performed once a second.
- Check TX buffer space before calling serialWrite (which
unconditionally manipulates buffer management variables).
- Added available TX buffer space as one of debug variables.
- Use blackboxWrite() instead of serialWrite in blackboxWriteString().