Enclenchement des clignotants selon 3 positions

This commit is contained in:
=
2021-01-27 14:25:07 +01:00
parent 058362a533
commit b668a01416

View File

@@ -77,7 +77,18 @@ void setup() {
/* Steering wheel module */
// Left blinker
ZenDrive.setBlinkerLeft(digitalRead(LEFT_BLINKER_PIN));
if(digitalRead(LEFT_BLINKER_PIN)){
ZenDrive.setBlinkerLeft(true);
ZenDrive.setBlinkerRight(false);
}
else if(digitalRead(RIGHT_BLINKER_PIN)){
ZenDrive.setBlinkerLeft(false);
ZenDrive.setBlinkerRight(true);
}
else{
ZenDrive.setBlinkerLeft(false);
ZenDrive.setBlinkerRight(false);
}
// Right blinker
ZenDrive.setBlinkerRight(digitalRead(RIGHT_BLINKER_PIN));
// Warning