mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
better pseudo random
This commit is contained in:
parent
e1ec63464c
commit
d062de2eb8
@ -727,7 +727,7 @@ void RMFT2::loop2() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OPCODE_IFRANDOM: // do block on random percentage
|
case OPCODE_IFRANDOM: // do block on random percentage
|
||||||
skipIf=(int16_t)(micros()%100) >= operand;
|
skipIf=(uint8_t)micros() >= operand * 255/100;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPCODE_IFRESERVE: // do block if we successfully RERSERVE
|
case OPCODE_IFRESERVE: // do block if we successfully RERSERVE
|
||||||
|
Loading…
Reference in New Issue
Block a user