summaryrefslogtreecommitdiff
path: root/Tonokip_Firmware
diff options
context:
space:
mode:
authorEmanuele Caruso <emanuele.caruso@gmail.com>2011-05-19 02:33:48 +0200
committerEmanuele Caruso <emanuele.caruso@gmail.com>2011-05-19 02:33:48 +0200
commit8060d4da56d0dc3928e787537d7b9e0ad4763d6b (patch)
tree2381787f79ccf7c3606f2fdaa27fa2ec4972dfe2 /Tonokip_Firmware
parentae56481873211746266c2ac93ffa6560f9122efa (diff)
Added possibility to print move time to serial, to help debugging
Diffstat (limited to 'Tonokip_Firmware')
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde7
-rw-r--r--Tonokip_Firmware/configuration.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde
index 308746a..46a6ca9 100644
--- a/Tonokip_Firmware/Tonokip_Firmware.pde
+++ b/Tonokip_Firmware/Tonokip_Firmware.pde
@@ -934,8 +934,13 @@ inline void prepare_move()
Serial.println("");
}
#endif
-
+ #ifdef PRINT_MOVE_TIME
+ unsigned long startmove = micros();
+ #endif
linear_move(x_steps_to_take, y_steps_to_take, z_steps_to_take, e_steps_to_take); // make the move
+ #ifdef PRINT_MOVE_TIME
+ Serial.println(micros()-startmove);
+ #endif
}
void linear_move(unsigned long x_steps_remaining, unsigned long y_steps_remaining, unsigned long z_steps_remaining, unsigned long e_steps_remaining) // make linear move with preset speeds and destinations, see G0 and G1
diff --git a/Tonokip_Firmware/configuration.h b/Tonokip_Firmware/configuration.h
index 35c714a..dc6226e 100644
--- a/Tonokip_Firmware/configuration.h
+++ b/Tonokip_Firmware/configuration.h
@@ -151,6 +151,6 @@ const int Z_MAX_LENGTH = 100;
#define BAUDRATE 115200
-
+//#define PRINT_MOVE_TIME
#endif