1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 21:21:24 +01:00

Deeay long values

This commit is contained in:
Asbelos 2021-08-22 17:01:55 +01:00
parent 60718f5eac
commit b35ce88fdd
2 changed files with 5 additions and 5 deletions

View File

@ -489,15 +489,15 @@ void RMFT2::loop2() {
break; break;
case OPCODE_DELAY: case OPCODE_DELAY:
delayMe(operand*100); delayMe(operand*100L);
break; break;
case OPCODE_DELAYMINS: case OPCODE_DELAYMINS:
delayMe(operand*60*1000); delayMe(operand*60L*1000L);
break; break;
case OPCODE_RANDWAIT: case OPCODE_RANDWAIT:
delayMe((long)random(operand*100)); delayMe(random(operand)*100L);
break; break;
case OPCODE_RED: case OPCODE_RED:

View File

@ -209,9 +209,9 @@ const int StringMacroTracker1=__COUNTER__;
#define AT(sensor_id) OPCODE_AT,V(sensor_id), #define AT(sensor_id) OPCODE_AT,V(sensor_id),
#define CALL(route) OPCODE_CALL,V(route), #define CALL(route) OPCODE_CALL,V(route),
#define CLOSE(id) OPCODE_CLOSE,V(id), #define CLOSE(id) OPCODE_CLOSE,V(id),
#define DELAY(ms) OPCODE_DELAY,V(ms/100), #define DELAY(ms) OPCODE_DELAY,V(ms/100L),
#define DELAYMINS(mindelay) OPCODE_DELAYMINS,V(mindelay), #define DELAYMINS(mindelay) OPCODE_DELAYMINS,V(mindelay),
#define DELAYRANDOM(mindelay,maxdelay) OPCODE_DELAY,V(mindelay/100),OPCODE_RANDWAIT,V((maxdelay-mindelay)/100), #define DELAYRANDOM(mindelay,maxdelay) OPCODE_DELAY,V(mindelay/100L),OPCODE_RANDWAIT,V((maxdelay-mindelay)/100L),
#define ENDIF OPCODE_ENDIF,NOP, #define ENDIF OPCODE_ENDIF,NOP,
#define ESTOP OPCODE_SPEED,V(1), #define ESTOP OPCODE_SPEED,V(1),
#define FOFF(func) OPCODE_FOFF,V(func), #define FOFF(func) OPCODE_FOFF,V(func),