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

EXRAIL bugfix, protect RANDWAIT from division by zero. Triggered by DELAYRANDOM(X, X+99) or less diff

This commit is contained in:
Harald Barth 2022-09-05 09:02:35 +02:00
parent 7c4640ad91
commit ad6c1384c9
3 changed files with 3 additions and 3 deletions

View File

@ -750,7 +750,7 @@ void RMFT2::loop2() {
break;
case OPCODE_RANDWAIT:
delayMe((micros()%operand) *100L);
delayMe(operand==0 ? 0 : (micros()%operand) *100L);
break;
case OPCODE_RED:

View File

@ -1 +1 @@
#define GITHUB_SHA "PORTX-HAL-20220830"
#define GITHUB_SHA "PORTX-HAL-20220905"

View File

@ -4,7 +4,7 @@
#include "StringFormatter.h"
#define VERSION "4.2.4 rc1"
#define VERSION "4.2.4 rc2"
// 4.2.4 ESP32 experimental BT support
// More DC configurations possible and lower frequency
// 4.2.3 Bugfix direction when togging between MAIN and DC