Remote inc coolant nozzle control program
Dependencies: mbed reScale USBDevice
Dependents: Nozzle_inputs Nozzle_display
Diff: main.cpp
- Revision:
- 14:dd8d89133b28
- Parent:
- 13:d2c8a78cea31
- Child:
- 15: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; }