fixed call-back function void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) to include the new parameter: DCC_ADDR_TYPE AddrType
This commit is contained in:
@@ -68,7 +68,6 @@ struct QUEUE
|
||||
};
|
||||
QUEUE *ftn_queue = new QUEUE[16];
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -407,7 +406,7 @@ void loop() //****************************************************************
|
||||
}
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
switch(FuncGrp)
|
||||
{
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
|
@@ -68,7 +68,6 @@ struct QUEUE
|
||||
};
|
||||
QUEUE *ftn_queue = new QUEUE[16];
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -407,7 +406,7 @@ void loop() //****************************************************************
|
||||
}
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
switch(FuncGrp)
|
||||
{
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
|
@@ -68,7 +68,6 @@ struct QUEUE
|
||||
};
|
||||
QUEUE *ftn_queue = new QUEUE[16];
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -407,7 +406,7 @@ void loop() //****************************************************************
|
||||
}
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
switch(FuncGrp)
|
||||
{
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
|
@@ -33,7 +33,6 @@ DCC_MSG Packet ;
|
||||
|
||||
#define This_Decoder_Address 17
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -89,7 +88,7 @@ void loop()
|
||||
}
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState)
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState)
|
||||
{
|
||||
switch(FuncGrp)
|
||||
{
|
||||
|
@@ -68,7 +68,6 @@ struct QUEUE
|
||||
};
|
||||
QUEUE *ftn_queue = new QUEUE[16];
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -407,7 +406,7 @@ void loop() //****************************************************************
|
||||
}
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
switch(FuncGrp)
|
||||
{
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
|
@@ -67,7 +67,6 @@ struct QUEUE
|
||||
};
|
||||
QUEUE *ftn_queue = new QUEUE[16];
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -416,7 +415,7 @@ void loop() //****************************************************************
|
||||
}
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, uint8_t FuncNum, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
if (FuncNum==1) { //Function Group 1 F0 F4 F3 F2 F1
|
||||
exec_function( 0, FunctionPin0, (FuncState&0x10)>>4 );
|
||||
exec_function( 1, FunctionPin1, (FuncState&0x01 ));
|
||||
|
@@ -71,7 +71,6 @@ struct QUEUE
|
||||
};
|
||||
QUEUE *ftn_queue = new QUEUE[16];
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -420,7 +419,7 @@ void loop() //****************************************************************
|
||||
}
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
switch(FuncGrp)
|
||||
{
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
|
@@ -85,7 +85,6 @@ struct QUEUE
|
||||
};
|
||||
QUEUE *ftn_queue = new QUEUE[16];
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -470,7 +469,7 @@ void gobwd2(int bcnt,int bcycle) {
|
||||
icnt++;
|
||||
}
|
||||
}
|
||||
extern void notifyDccSpeed( uint16_t Addr, uint8_t Speed, uint8_t ForwardDir, uint8_t MaxSpeed ) {
|
||||
void notifyDccSpeed( uint16_t Addr, uint8_t Speed, uint8_t ForwardDir, uint8_t MaxSpeed ) {
|
||||
if (Function13_value==1) {
|
||||
Motor1Speed = Speed;
|
||||
Motor1ForwardDir = ForwardDir;
|
||||
@@ -482,7 +481,7 @@ extern void notifyDccSpeed( uint16_t Addr, uint8_t Speed, uint8_t ForwardDir, ui
|
||||
Motor2MaxSpeed = MaxSpeed;
|
||||
}
|
||||
}
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
switch(FuncGrp)
|
||||
{
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
@@ -669,4 +668,5 @@ void detach_servo (int servo_num) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -68,7 +68,6 @@ struct QUEUE
|
||||
};
|
||||
QUEUE *ftn_queue = new QUEUE[16];
|
||||
|
||||
extern uint8_t Decoder_Address = This_Decoder_Address;
|
||||
struct CVPair
|
||||
{
|
||||
uint16_t CV;
|
||||
@@ -407,7 +406,7 @@ void loop() //****************************************************************
|
||||
}
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
switch(FuncGrp)
|
||||
{
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
|
@@ -101,7 +101,8 @@ void loop()
|
||||
// You MUST call the NmraDcc.process() method frequently from the Arduino loop() function for correct library operation
|
||||
Dcc.process();
|
||||
}
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
int f_index;
|
||||
switch (FuncGrp) {
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
@@ -145,7 +146,8 @@ void exec_function (int f_index, int FuncState) {
|
||||
Set_LED (f_index,false);
|
||||
}
|
||||
}
|
||||
extern void notifyDccSpeed( uint16_t Addr, uint8_t Speed, uint8_t ForwardDir, uint8_t MaxSpeed ) {
|
||||
|
||||
void notifyDccSpeed( uint16_t Addr, uint8_t Speed, uint8_t ForwardDir, uint8_t MaxSpeed ) {
|
||||
Last_Decoder_direction = Decoder_direction;
|
||||
Decoder_direction = ForwardDir;
|
||||
if ( Decoder_direction==Last_Decoder_direction) return;
|
||||
@@ -196,4 +198,5 @@ void Switch_LED (int Function) {
|
||||
delayMicroseconds (1000.*time_fraction);
|
||||
}
|
||||
led_last_state[Function] = end_state;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -123,7 +123,7 @@ void loop()
|
||||
Dcc.process();
|
||||
}
|
||||
|
||||
extern void notifyDccFunc( uint16_t Addr, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState) {
|
||||
int f_index;
|
||||
switch (FuncGrp) {
|
||||
case FN_0_4: //Function Group 1 F0 F4 F3 F2 F1
|
||||
@@ -172,4 +172,5 @@ void exec_function (int f_index, int FuncState) {
|
||||
Last_Function_State[f_index] = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user