Skip to content

Commit

Permalink
PUI Pin correction
Browse files Browse the repository at this point in the history
  • Loading branch information
innif committed Mar 12, 2019
1 parent e1a4f0e commit 4ff5e37
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
8 changes: 4 additions & 4 deletions IO.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ class IO {
Pin usbRx = Pin( 0, OUTPUT, DIGITAL ); // Computer -> Mega, Computer Kommunikation

// PUI: keys and levers
Key decreasePage = Key( 8, PUI, 0, 500, 200 ); // vorherige Bildschirmseite
Key increasePage = Key( 10, PUI, 0, 500, 200 ); // nächste Bildschirmseite
Key selectPage = Key( 9, PUI, 0, 5000 ); // Seite auswählen
Key decreasePage = Key( 11, PUI, 0, 500, 200 ); // vorherige Bildschirmseite
Key increasePage = Key( 9, PUI, 0, 500, 200 ); // nächste Bildschirmseite
Key selectPage = Key( 10, PUI, 0, 5000 ); // Seite auswählen
Key decreaseMenu = Key( 26, DIGITAL, 0 ); // vorheriger Menüpunkt (misst Drehung des Rotary Encoders)
Key increaseMenu = Key( 28, DIGITAL, 0 ); // nächster Menüpunkt (misst Drehung des Rotary Encoders)
Key selectMenu = Key( 30, DIGITAL, 0, 1000 ); // Menüpunkt auswählen (Knopf des Rotary Encoders)
Key testKick = Key( 11, PUI, 0, 0, 0 ); // Schuss austesten
Key testKick = Key( 8, PUI, 0, 0, 0 ); // Schuss austesten
Key compassCalibration = Key( 12, PUI, 0, 0, 0 ); // Torrichtung kalibrieren
Key animation = Key( 13, PUI, 0 ); // Starte Leucht Animation
Key lineCalibration = Key( 14, PUI, 0, 500 ); // Linienhelligkeit kalibrieren
Expand Down
13 changes: 4 additions & 9 deletions Light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,10 @@ void Light::light() {

if (line.onDemand()) {

// toggle variable
if(io.animation.click()){
io.animationEnabled.set( ! io.animationEnabled.get() );

if(io.animationEnabled.get()){
line.setCooldown(10);
}else{
line.setCooldown(100);
}
if(io.animationEnabled.get()){
line.setCooldown(10);
}else{
line.setCooldown(100);
}

// NO animation part
Expand Down
2 changes: 1 addition & 1 deletion iceberg.19.ino
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void loop() {
EEPROM.write(0, io.headingOffset.left()); // speichere Vorzeichen
EEPROM.write(1, abs(io.headingOffset.get())); // speichere Winkel
}
if (io.animation.click()) { debug(F("animation")); }
if (io.animation.click()) { io.animationEnabled.set( ! io.animationEnabled.get() ); }
if (io.lineCalibration.click()) { BOTTOM_SERIAL.write(42); }
if (io.ballTouchCalibration.click()) { reflexion.calibrate(); }
if (io.start.click()) { io.pause.set(false); }
Expand Down

0 comments on commit 4ff5e37

Please sign in to comment.