mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-06-29 10:35:24 +02:00
Do not call onRailSyncOnLookup/onRailSyncOffLookup when NULL
This commit is contained in:
parent
97f50910f6
commit
b63703a365
11
EXRAIL2.cpp
11
EXRAIL2.cpp
@ -1359,10 +1359,13 @@ void RMFT2::powerEvent(int16_t track, bool overload) {
|
|||||||
void RMFT2::railsyncEvent(bool on) {
|
void RMFT2::railsyncEvent(bool on) {
|
||||||
if (Diag::CMD)
|
if (Diag::CMD)
|
||||||
DIAG(F("railsyncEvent : %d"), on);
|
DIAG(F("railsyncEvent : %d"), on);
|
||||||
if (on)
|
if (on) {
|
||||||
onRailSyncOnLookup->handleEvent(F("RAILSYNCON"), 0);
|
if (onRailSyncOnLookup)
|
||||||
else
|
onRailSyncOnLookup->handleEvent(F("RAILSYNCON"), 0);
|
||||||
onRailSyncOffLookup->handleEvent(F("RAILSYNCOFF"), 0);
|
} else {
|
||||||
|
if (onRailSyncOffLookup)
|
||||||
|
onRailSyncOffLookup->handleEvent(F("RAILSYNCOFF"), 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// This function is used when setting pins so that a SET or RESET
|
// This function is used when setting pins so that a SET or RESET
|
||||||
|
@ -1 +1 @@
|
|||||||
#define GITHUB_SHA "devel-202504171929Z"
|
#define GITHUB_SHA "devel-202504172219Z"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user