Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed reScale USBDevice
Diff: main.cpp
- Revision:
- 21:dd8d89133b28
- Parent:
- 20:d2c8a78cea31
- Child:
- 22: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;
}