Addition of notifyServceMode call to allow decoders to turn off high current outputs (#14)
* Add notification for entering and leaving service mode to allow the decoder to swithc off high current outputs * Add notification for entering and leaving service mode to allow the decoder to swithc off high current outputs
This commit is contained in:
@@ -927,10 +927,18 @@ void processServiceModeOperation( DCC_MSG * pDccMsg )
|
||||
#endif
|
||||
void resetServiceModeTimer(uint8_t inServiceMode)
|
||||
{
|
||||
if (notifyServiceMode && inServiceMode != DccProcState.inServiceMode)
|
||||
{
|
||||
notifyServiceMode(inServiceMode);
|
||||
}
|
||||
// Set the Service Mode
|
||||
DccProcState.inServiceMode = inServiceMode ;
|
||||
|
||||
DccProcState.LastServiceModeMillis = inServiceMode ? millis() : 0 ;
|
||||
if (notifyServiceMode && inServiceMode != DccProcState.inServiceMode)
|
||||
{
|
||||
notifyServiceMode(inServiceMode);
|
||||
}
|
||||
}
|
||||
|
||||
void clearDccProcState(uint8_t inServiceMode)
|
||||
|
Reference in New Issue
Block a user