From f30da4bbcab86a0acef8a44590cf5d5bd1785f6d Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 16 Jan 2018 01:34:44 +0100 Subject: [PATCH] babystep synchronisation --- Firmware/temperature.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 2d2d3098..ab60e34e 100644 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -1879,14 +1879,18 @@ ISR(TIMER0_COMPB_vect) if(curTodo>0) { + asm("cli"); babystep(axis,/*fwd*/true); babystepsTodo[axis]--; //less to do next time + asm("sei"); } else if(curTodo<0) { + asm("cli"); babystep(axis,/*fwd*/false); babystepsTodo[axis]++; //less to do next time + asm("sei"); } } #endif //BABYSTEPPING