From 946ef7ac08f43b783bb8b5e0eacf38d5e5349e9c Mon Sep 17 00:00:00 2001 From: Koen Heltzel Date: Tue, 17 Dec 2013 12:42:28 +0100 Subject: [PATCH 1/2] 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 --- src/pinproc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pinproc.cpp b/src/pinproc.cpp index 20cbc34..3e01757 100644 --- a/src/pinproc.cpp +++ b/src/pinproc.cpp @@ -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) { - driver->state = 1; + driver->state = schedule != 0; driver->timeslots = schedule; driver->waitForFirstTimeSlot = !now; driver->outputDriveTime = cycleSeconds; From 12d065b9b7262c5b2bb3e35c36793d80e7573290 Mon Sep 17 00:00:00 2001 From: Koen Heltzel Date: Tue, 17 Dec 2013 12:54:53 +0100 Subject: [PATCH 2/2] Restored mappedWPCDriverGroupSlowTime timings that were changed & committed by mistake, causing lamps to be dimmer in WPC machines. https://github.com/preble/libpinproc/commit/a9f35706da55b9e72c43970709157961181331ab --- src/PRDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PRDevice.cpp b/src/PRDevice.cpp index 9a6772c..5a93148 100644 --- a/src/PRDevice.cpp +++ b/src/PRDevice.cpp @@ -382,7 +382,7 @@ PRResult PRDevice::DriverLoadMachineTypeDefaults(PRMachineType machineType, uint const bool mappedSternDriverGroupPolarity[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; const int lastWPCCoilDriverGroup = 9; const int lastSternCoilDriverGroup = 7; - const int mappedWPCDriverGroupSlowTime[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0}; + const int mappedWPCDriverGroupSlowTime[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, 400, 400, 400, 400, 400, 400, 400, 0, 0, 0, 0, 0, 0, 0, 0}; const int mappedSternDriverGroupSlowTime[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400}; const int mappedWPCDriverGroupActivateIndex[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0}; const int mappedSternDriverGroupActivateIndex[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7};