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

Fixed bug where a switch rule driver wasn't getting programmed properly if there was only one driver.

This commit is contained in:
Gerry Stellenberg
2011-02-18 13:52:18 -06:00
parent c53227c90e
commit 3f41e9b4b9

View File

@@ -671,11 +671,11 @@ PRResult PRDevice::SwitchUpdateRule(uint8_t switchNum, PREventType eventType, PR
newRule->notifyHost = rule->notifyHost;
newRule->reloadActive = rule->reloadActive;
newRule->changeOutput = true;
newRule->driver = linkedDrivers[0];
if (totalNumDrivers > 1)
{
newRule->linkActive = true;
newRule->linkIndex = savedRuleIndex;
newRule->driver = linkedDrivers[0];
}
else newRule->linkActive = false;
CreateSwitchUpdateRulesBurst(burst, newRule, drive_outputs_now);