If it’s bigger now, it won’t be if you put all of them in the same big array and skip to each group
with an outer loop around that.
Code:
Event_OT var byte[8] ‘ or however many there are
Event_OT_Day var Event_OT[0] ‘create alias to keep those names used elsewhere
Event_OT_AllThoseOtherThings var Event_OT[1] ‘create alias
…
…
index var byte ‘ this is re-useable for all of them
if Event1_OT[0] >7 then
for index = 0 to 4
Event_OT[index] = 0
next index
ENDIF
You could check it isn’t cheaper to check for 0.
It might not be now, but an earlier PBP, it would be cheaper.
Code:
'if Event_Penalty_Sec <1
if Event_Penalty_Sec =0
if your program uses the watchdog timer, there will be some buried in all of that.
You should get away with only one for that entire slab,
and sprinkle any others only where needed
definitely if there are any nops in code they can be replaced with them.
Bookmarks