1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

A schedule request with a 0x0 schedule is now converted to a disable command automatically, this fixes unexpected LED flashing in lampshows where schedules can be 0x0.

http://www.pinballcontrollers.com/forum/index.php?topic=251.msg6791#msg6791
http://www.pinballcontrollers.com/forum/index.php?topic=802.msg6783#msg6783
This commit is contained in:
Koen Heltzel
2013-12-17 12:42:28 +01:00
parent ab0739e0dd
commit 946ef7ac08

View File

@@ -313,7 +313,7 @@ void PRDriverStateFuturePulse(PRDriverState *driver, uint8_t milliseconds, uint3
} }
void PRDriverStateSchedule(PRDriverState *driver, uint32_t schedule, uint8_t cycleSeconds, bool_t now) void PRDriverStateSchedule(PRDriverState *driver, uint32_t schedule, uint8_t cycleSeconds, bool_t now)
{ {
driver->state = 1; driver->state = schedule != 0;
driver->timeslots = schedule; driver->timeslots = schedule;
driver->waitForFirstTimeSlot = !now; driver->waitForFirstTimeSlot = !now;
driver->outputDriveTime = cycleSeconds; driver->outputDriveTime = cycleSeconds;