don't start flasher if already started

This commit is contained in:
Mikayla Fischler 2023-07-09 23:24:41 -04:00
parent 96c4444184
commit bf7a316b04
2 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ local flasher = require("graphics.flasher")
local core = {} local core = {}
core.version = "1.0.0" core.version = "1.0.1"
core.flasher = flasher core.flasher = flasher
core.events = events core.events = events

View File

@ -43,9 +43,11 @@ end
-- start/resume the flasher periodic -- start/resume the flasher periodic
function flasher.run() function flasher.run()
if not active then
active = true active = true
callback_250ms() callback_250ms()
end end
end
-- clear all blinking indicators and stop the flasher periodic -- clear all blinking indicators and stop the flasher periodic
function flasher.clear() function flasher.clear()