notifyDccSigState restored
Restore the old callback notifyDccSigState for compatibiltity to version 1.4.2
This commit is contained in:
@@ -1141,6 +1141,10 @@ void execDccProcessor( DCC_MSG * pDccMsg )
|
|||||||
DB_PRINT("eDP: OAddr:%d Extended State:%0X", OutputAddress, state);
|
DB_PRINT("eDP: OAddr:%d Extended State:%0X", OutputAddress, state);
|
||||||
if( notifyDccSigOutputState )
|
if( notifyDccSigOutputState )
|
||||||
notifyDccSigOutputState(OutputAddress, state);
|
notifyDccSigOutputState(OutputAddress, state);
|
||||||
|
|
||||||
|
// old callback ( for compatibility with 1.4.2, not to be used in new designs )
|
||||||
|
if( notifyDccSigState )
|
||||||
|
notifyDccSigState( OutputAddress, TurnoutPairIndex, pDccMsg->Data[2] ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(pDccMsg->Size == 3) // Basic Accessory Decoder Packet Format
|
else if(pDccMsg->Size == 3) // Basic Accessory Decoder Packet Format
|
||||||
@@ -1148,7 +1152,7 @@ void execDccProcessor( DCC_MSG * pDccMsg )
|
|||||||
uint8_t direction = pDccMsg->Data[1] & 0b00000001;
|
uint8_t direction = pDccMsg->Data[1] & 0b00000001;
|
||||||
uint8_t outputPower = (pDccMsg->Data[1] & 0b00001000) >> 3;
|
uint8_t outputPower = (pDccMsg->Data[1] & 0b00001000) >> 3;
|
||||||
|
|
||||||
// for compatibility with 1.4.2
|
// old callback ( for compatibility with 1.4.2, not to be used in new designs )
|
||||||
if ( notifyDccAccState )
|
if ( notifyDccAccState )
|
||||||
notifyDccAccState( OutputAddress, BoardAddress, pDccMsg->Data[1] & 0b00000111, outputPower );
|
notifyDccAccState( OutputAddress, BoardAddress, pDccMsg->Data[1] & 0b00000111, outputPower );
|
||||||
|
|
||||||
|
@@ -687,8 +687,10 @@ extern void notifyCVAck(void) __attribute__ ((weak));
|
|||||||
*/
|
*/
|
||||||
extern void notifyServiceMode(bool) __attribute__ ((weak));
|
extern void notifyServiceMode(bool) __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. These functions may be dropped in future versions
|
||||||
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));
|
||||||
|
extern void notifyDccSigState( uint16_t Addr, uint8_t OutputIndex, uint8_t State) __attribute__ ((weak));
|
||||||
|
|
||||||
#if defined (__cplusplus)
|
#if defined (__cplusplus)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user