mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +03:00
Improve OSD blink logic
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.
This commit is contained in:
parent
3f116fd103
commit
f7d992b2bd
4 changed files with 15 additions and 3 deletions
|
@ -448,7 +448,7 @@ task_t tasks[TASK_COUNT] = {
|
|||
#endif
|
||||
|
||||
#ifdef USE_OSD
|
||||
[TASK_OSD] = DEFINE_TASK("OSD", NULL, NULL, osdUpdate, TASK_PERIOD_HZ(60), TASK_PRIORITY_LOW),
|
||||
[TASK_OSD] = DEFINE_TASK("OSD", NULL, NULL, osdUpdate, TASK_PERIOD_HZ(OSD_TASK_FREQUENCY_DEFAULT), TASK_PRIORITY_LOW),
|
||||
#endif
|
||||
|
||||
#ifdef USE_TELEMETRY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue