![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Display code
Dependencies: mbed reScale RotaryEncoder RPG Adafruit_ST7735 Adafruit_GFX PinDetect Ee24xx08 mRotaryEncoder
Diff: main.cpp
- Revision:
- 10:dd8d89133b28
- Parent:
- 9:d2c8a78cea31
- Child:
- 11:ce51026d8702
diff -r d2c8a78cea31 -r dd8d89133b28 main.cpp --- a/main.cpp Wed Apr 10 20:22:14 2019 +0000 +++ b/main.cpp Sat Apr 13 20:38:22 2019 +0000 @@ -791,6 +791,11 @@ lastAngle = (int)tempLastAngle; lastAngle = lastAngle - 90; // Not storing signed int, so signed value is 90 less than what was stored to memory. n1Pos = lastAngle; + + if (count == 0){ // if knob is on N1 adjust and ATC changes tools, update enc value) + Enc.Set(n1Pos); // test for ATC following issue! + } + eeprom.write(currentToolAddress, currentToolNo); wait(0.1); tempLastTwitch = 0; @@ -820,6 +825,9 @@ // tft.printf("%d", n1Pos + 145); wait(0.05); dir=0; + + //Enc.Set(n1Pos); // test!! + lastN1Pos = n1Pos; }