Fix update order, change genesis to pull pin to ground.

This commit is contained in:
Christian Speckner 2021-04-05 17:53:46 +02:00
parent e6a8281a37
commit 08cd88c084
2 changed files with 3 additions and 3 deletions

View File

@ -41,5 +41,5 @@ void Genesis::updateButtons()
updateMouseButtons(firePressed, buttonCPressed);
setPin(DigitalPin::Six, !getAutoFireState(firePressed));
setPin(AnalogPin::Five, buttonCPressed ? AnalogReadout::disconnect() : AnalogReadout::connectToVcc());
setPin(AnalogPin::Five, buttonCPressed ? AnalogReadout::connectToGround() : AnalogReadout::connectToVcc());
}

View File

@ -71,9 +71,9 @@ void AnalogReadout::update(Connection connection, uInt64 timestamp, ConsoleTimin
}
if (connection != myConnection) {
myConnection = connection;
updateCharge(timestamp);
myConnection = connection;
}
}