Index: firmware/App/Services/Download.c =================================================================== diff -u -ra858229eb2ab05404dba3e29c95e2d5f7800efe6 -rfc99f47309c9d96f73a2d4696b42d6d302f334a7 --- firmware/App/Services/Download.c (.../Download.c) (revision a858229eb2ab05404dba3e29c95e2d5f7800efe6) +++ firmware/App/Services/Download.c (.../Download.c) (revision fc99f47309c9d96f73a2d4696b42d6d302f334a7) @@ -80,6 +80,11 @@ return SWUpdateCommandState; } +SW_UPDATE_DESINTATION_T getSWUpdateDestination( void ) +{ + return (SW_UPDATE_DESINTATION_T)SWUpdateRCVStatus.updateDest; +} + void clearSWUpdateCommandState( void ) { SWUpdateCommandState = UPDATE_CMD_IDLE; @@ -235,32 +240,10 @@ if ( SWUpdateRCVStatus.cyberIndex != SW_UPDATE_FINAL_MSG_INDEX ) { - U16 removeThis; - U08 index = 0; - U32 counter; - U08 test[8]; sizeToWrite = SW_UPDATE_FLASH_BUFFER_SIZE; + BOOL done = FALSE; - /*for ( removeThis = 0; removeThis < SW_UPDATE_FLASH_BUFFER_SIZE; ++removeThis ) - { - test[ index ] = SWUpdateRCVStatus.SWUpdateBuffer[removeThis]; - if ( index == 7 ) - { - canTransmit( canREG1, (U32)SW_TEST, test ); // Transmit the FPGA back up to make sure we totally received what we sent - for ( counter = 0; counter < 6000; counter++ ) {} - index = 0; - } - else - { - index += 1; - } - - // TODO this is temporary until the ROTTING is removed from the APP - // SWUpdateRCVStatus.SWUpdateBuffer[ removeThis ] = 0xFF & ( SWUpdateRCVStatus.SWUpdateBuffer[removeThis] - 27 ); - }*/ - // 3192290 - // 1596144 if ( ( 1596144 - REMOVETHEVAR < SW_UPDATE_FLASH_BUFFER_SIZE ) && ( REMOVETHEVAR != 0 ) ) { sizeToWrite = 1596144 - REMOVETHEVAR;