It's been a while, since I've touched this code, so I'm sure I'm doing something wrong.
I put the other code mentioned above, back in place. I now have added a TIMER_EVENT to fnDebug()
case TIMER_EVENT:
fnRead( PortIDInternal, ucInputMessage, ucInputMessage[MSG_CONTENT_LENGTH]); // read the contents
if (ucInputMessage[ 0 ] == E_TIMER_SW_DELAYED_RESET) {
fnResetBoard();
}
break;
and added my own function to trigger the case:static void fnUartDelayResetBoard(void){
uTaskerMonoTimer( TASK_DEBUG, (DELAY_LIMIT)(1*SEC), E_TIMER_SW_DELAYED_RESET );
}
and from fnDoIP() I have:#ifdef USE_PARAMETER_BLOCK // {5}
else {
fnDoFlash(DO_SAVE_PARS, 0); // save the new MAC address
//fnResetBoard(); // reset so that it strats with the new values
//fnDelayResetBoard(); //delay to allow UART to complete, then reset with new values.
fnUartDelayResetBoard();
}
#endif
break;
I do get to the if statement, but the ucInputMessage[0] value is 47, while E_TIMER_SW_DELAYED_RESET is defined as 131.
Why isn't the message what I have set it to?
Aaron