Merge branch 'master' of https://github.com/mrrwa/NmraDcc
This commit is contained in:
10
NmraDcc.cpp
10
NmraDcc.cpp
@@ -940,10 +940,18 @@ void processServiceModeOperation( DCC_MSG * pDccMsg )
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
void resetServiceModeTimer(uint8_t inServiceMode)
|
void resetServiceModeTimer(uint8_t inServiceMode)
|
||||||
{
|
{
|
||||||
|
if (notifyServiceMode && inServiceMode != DccProcState.inServiceMode)
|
||||||
|
{
|
||||||
|
notifyServiceMode(inServiceMode);
|
||||||
|
}
|
||||||
// Set the Service Mode
|
// Set the Service Mode
|
||||||
DccProcState.inServiceMode = inServiceMode ;
|
DccProcState.inServiceMode = inServiceMode ;
|
||||||
|
|
||||||
DccProcState.LastServiceModeMillis = inServiceMode ? millis() : 0 ;
|
DccProcState.LastServiceModeMillis = inServiceMode ? millis() : 0 ;
|
||||||
|
if (notifyServiceMode && inServiceMode != DccProcState.inServiceMode)
|
||||||
|
{
|
||||||
|
notifyServiceMode(inServiceMode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
@@ -1395,4 +1403,4 @@ uint8_t NmraDcc::process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0 ;
|
return 0 ;
|
||||||
};
|
};
|
||||||
|
@@ -671,6 +671,10 @@ extern void notifyCVResetFactoryDefault(void) __attribute__ ((weak));
|
|||||||
* None
|
* None
|
||||||
*/
|
*/
|
||||||
extern void notifyCVAck(void) __attribute__ ((weak));
|
extern void notifyCVAck(void) __attribute__ ((weak));
|
||||||
|
extern void notifyServiceMode(bool) __attribute__ ((weak));
|
||||||
|
|
||||||
|
// Deprecated, only for backward compatibility with version 1.4.2. Don't use in new designs
|
||||||
|
extern void notifyDccAccState( uint16_t Addr, uint16_t BoardAddr, uint8_t OutputAddr, uint8_t State ) __attribute__ ((weak));
|
||||||
|
|
||||||
// Deprecated, only for backward compatibility with version 1.4.2. Don't use in new designs
|
// Deprecated, only for backward compatibility with version 1.4.2. Don't use in new designs
|
||||||
extern void notifyDccAccState( uint16_t Addr, uint16_t BoardAddr, uint8_t OutputAddr, uint8_t State ) __attribute__ ((weak));
|
extern void notifyDccAccState( uint16_t Addr, uint16_t BoardAddr, uint8_t OutputAddr, uint8_t State ) __attribute__ ((weak));
|
||||||
|
Reference in New Issue
Block a user