mirror of https://github.com/ArduPilot/ardupilot
AP_OSD: decrease blink frequency from 2Hz to 1Hz on MSP DisplayPort
Allows to actually see the blinking on hardware with a slow screen refresh rate
This commit is contained in:
parent
9acfdaaa19
commit
6a459af624
|
@ -55,10 +55,11 @@ void AP_OSD_MSP_DisplayPort::clear(void)
|
|||
// clear remote MSP screen
|
||||
_displayport->msp_displayport_clear_screen();
|
||||
|
||||
// toggle flashing @2Hz
|
||||
// toggle flashing @1Hz
|
||||
const uint32_t now = AP_HAL::millis();
|
||||
if (((now / 500) & 0x01) != _blink_on) {
|
||||
if ((uint32_t(now * 0.004) & 0x01) != _blink_on) {
|
||||
_blink_on = !_blink_on;
|
||||
blink_phase = (blink_phase+1)%4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue