diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp index fa8d575..30b1b6d 100644 --- a/EXRAIL2.cpp +++ b/EXRAIL2.cpp @@ -706,7 +706,7 @@ void RMFT2::loop2() { break; case OPCODE_IFRANDOM: // do block on random percentage - skipIf=(int16_t)random(100)>=operand; + skipIf=(int16_t)(micros()%100) >= operand; break; case OPCODE_IFRESERVE: // do block if we successfully RERSERVE @@ -750,7 +750,7 @@ void RMFT2::loop2() { break; case OPCODE_RANDWAIT: - delayMe(random(operand)*100L); + delayMe((micros()%operand) *100L); break; case OPCODE_RED: diff --git a/objdump.bat b/objdump.bat index 94e19e8..26e3233 100644 --- a/objdump.bat +++ b/objdump.bat @@ -2,7 +2,7 @@ ECHO ON FOR /F "delims=" %%i IN ('dir %TMP%\arduino_build_* /b /ad-h /t:c /od') DO SET a=%%i echo Most recent subfolder: %a% >%TMP%\OBJDUMP_%a%.txt SET ELF=%TMP%\%a%\CommandStation-EX.ino.elf - +set PATH="C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\";%PATH% avr-objdump --private=mem-usage %ELF% >>%TMP%\OBJDUMP_%a%.txt ECHO ++++++++++++++++++++++++++++++++++ >>%TMP%\OBJDUMP_%a%.txt avr-objdump -x -C %ELF% | find ".text" | sort /+25 /R >>%TMP%\OBJDUMP_%a%.txt