You are on page 1of 1

Functions in this module: InitializeCounter, PostCounter, RunCounter

RunCounter

Switch for Event Type


Event is ES_GADGET_TIMEOUT
If playing is true
If not all columns of display are filled (column < 32)
Post ES_UPDATE_COL event to LEDService with c as parameter
Reset Gadget Timer
Increment column by 1
Else (otherwise, all columns are filled and time is out)
Post ES_ACTIVITY_TIMEOUT to all
Disable Activity Timer
Set playing to false
Endif
Endif
End ES_GADGET_TIMEOUT block

Event is ES_BEGIN
Set Gadget Timer
Set column to 0
Set playing to true
End ES_BEGIN block

Event is ES_ACTIVITY_TIMER
Disable Gadget Timer
Set playing to false
End ES_ACTIVITY_TIMER block
End switch block

You might also like