Index: firmware/App/Services/Interrupts.c =================================================================== diff -u -rde5a0d43bdef611d963d11855bc958a8d8899a09 -r31c4bf94671f58375d2e1dbbbb37b37c6949e0c4 --- firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision de5a0d43bdef611d963d11855bc958a8d8899a09) +++ firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision 31c4bf94671f58375d2e1dbbbb37b37c6949e0c4) @@ -24,7 +24,7 @@ #include "AlarmMgmt.h" #include "BloodFlow.h" -#include "Comm.h" +#include "Comm.h" #include "DialInFlow.h" #include "DialOutFlow.h" #include "Interrupts.h" @@ -143,45 +143,45 @@ void canErrorNotification(canBASE_t *node, uint32 notification) { #ifdef DEBUG_ENABLED - // TODO - temporary debug code - remove later char debugStr[ 256 ]; -#endif +#endif + if ( node == canREG1 ) { if ( notification & canLEVEL_PARITY_ERR ) { can1ParityCnt++; #ifdef DEBUG_ENABLED - // TODO - temporary debug code - remove later - sprintf( debugStr, "CAN parity error:%5d \n", can1ParityCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sprintf( debugStr, "CAN parity error:%5d \n", can1ParityCnt ); + sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sendDebugDataToUI( (U08*)debugStr ); #endif } else if ( notification & canLEVEL_BUS_OFF ) { can1BusOffCnt++; #ifdef DEBUG_ENABLED - // TODO - temporary debug code - remove later - sprintf( debugStr, "CAN bus off error:%5d \n", can1BusOffCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sprintf( debugStr, "CAN bus off error:%5d \n", can1BusOffCnt ); + sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sendDebugDataToUI( (U08*)debugStr ); #endif } else if ( notification & canLEVEL_WARNING ) { can1WarningCnt++; #ifdef DEBUG_ENABLED - // TODO - temporary debug code - remove later - sprintf( debugStr, "CAN bus warning:%5d \n", can1WarningCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sprintf( debugStr, "CAN bus warning:%5d \n", can1WarningCnt ); + sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sendDebugDataToUI( (U08*)debugStr ); #endif } else if ( notification & canLEVEL_PASSIVE ) { can1PassiveCnt++; #ifdef DEBUG_ENABLED - // TODO - temporary debug code - remove later - sprintf( debugStr, "CAN passive warning:%5d \n", can1PassiveCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sprintf( debugStr, "CAN passive warning:%5d \n", can1PassiveCnt ); + sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sendDebugDataToUI( (U08*)debugStr ); #endif } else @@ -217,9 +217,9 @@ clearSCI2CommErrors(); // TODO - try to do something to recover (+ max retries = comm fault) #ifdef DEBUG_ENABLED - // TODO - temporary debug code - remove later - sprintf( debugStr, "FPGA UART frame error:%5d \n", sci2FrameErrorCnt ); + sprintf( debugStr, "FPGA UART FR err:%5d \n", sci2FrameErrorCnt ); sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sendDebugDataToUI( (U08*)debugStr ); #endif } if ( ( flags & SCI_OE_INT ) != 0 ) @@ -228,9 +228,9 @@ clearSCI2CommErrors(); // TODO - try to do something to recover (+ max retries = comm fault) #ifdef DEBUG_ENABLED - // TODO - temporary debug code - remove later - sprintf( debugStr, "FPGA UART overrun error:%5d \n", sci2OverrunErrorCnt ); + sprintf( debugStr, "FPGA UART OR err:%5d \n", sci2OverrunErrorCnt ); sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sendDebugDataToUI( (U08*)debugStr ); #endif } } @@ -242,20 +242,18 @@ sci1FrameErrorCnt++; clearSCI1CommErrors(); // TODO - try to do something to recover (+ max retries = comm fault) - - // TODO - temporary debug code - remove later - sprintf( debugStr, "Debug UART frame error:%5d \n", sci1FrameErrorCnt ); + sprintf( debugStr, "Debug UART FR err:%5d\n", sci1FrameErrorCnt ); sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sendDebugDataToUI( (U08*)debugStr ); } if ( ( flags & SCI_OE_INT ) != 0 ) { sci1OverrunErrorCnt++; clearSCI1CommErrors(); // TODO - try to do something to recover (+ max retries = comm fault) - - // TODO - temporary debug code - remove later - sprintf( debugStr, "Debug UART overrun error:%5d \n", sci1OverrunErrorCnt ); + sprintf( debugStr, "Debug UART OR err:%5d\n", sci1OverrunErrorCnt ); sendDebugData( (U08*)debugStr, strlen(debugStr) ); + sendDebugDataToUI( (U08*)debugStr ); } } #endif