From 5e30740c5be370fec9201fb53893fd9cdd1637aa Mon Sep 17 00:00:00 2001 From: Asbelos Date: Thu, 26 Aug 2021 21:49:44 +0100 Subject: [PATCH] fix EXRAIL CALL/RETURN --- RMFT2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RMFT2.cpp b/RMFT2.cpp index 13627bd..af0040b 100644 --- a/RMFT2.cpp +++ b/RMFT2.cpp @@ -440,6 +440,7 @@ void RMFT2::loop2() { if (readSensor(operand)) { // reset timer to half a second and keep waiting waitAfter=millis(); + delayMe(50); return; } if (millis()-waitAfter < 500 ) return; @@ -538,7 +539,7 @@ void RMFT2::loop2() { kill(F("CALL stack"), stackDepth); return; } - callStack[stackDepth++]=progCounter; + callStack[stackDepth++]=progCounter+3; progCounter=locateRouteStart(operand); if (progCounter<0) kill(F("CALL unknown"),operand); return;