turn off locate LED, when disabling

This commit is contained in:
Jonas Leder 2023-01-25 08:02:50 +01:00
commit 3970bd5890
No known key found for this signature in database
GPG key ID: CC3C488E27DFF5CA

View file

@ -89,6 +89,7 @@ void loop()
else if (command == 0x03)
{
locateLedEnabled = value == 0x01;
digitlaWrite(LOCATE_LED_PIN, LOW);
}
else if (command == 0x04)
{
@ -103,7 +104,8 @@ void loop()
{
EEPROM.write(EEPROM_LONG_DELAY, value);
}
if (locateLedEnabled)
if (locateLedEnabled) {
digitalWrite(LOCATE_LED_PIN, millis() % (LOCATE_LED_BLINK_TIME * 2) < LOCATE_LED_BLINK_TIME);
}
}
}