Index: firmware/App/Services/Download.c =================================================================== diff -u -rb887b4a2796de3b26be07619809f8f4146955867 -r24b4c7f4560296765373099ee83597baddc2cf94 --- firmware/App/Services/Download.c (.../Download.c) (revision b887b4a2796de3b26be07619809f8f4146955867) +++ firmware/App/Services/Download.c (.../Download.c) (revision 24b4c7f4560296765373099ee83597baddc2cf94) @@ -59,12 +59,9 @@ static SW_UPDATE_RCV_STATUS_T SWUpdateRCVStatus; ///< Software update receive status. static SW_UPDATE_CMD_STATUS_T SWUpdateCmdStatus; ///< Software update command status. -static U32 fpgaPayloadLengthBytes; ///< FPGA payload length in bytes. static SW_UPDATE_SPECS_T SWUpdateSpecs; ///< Software update specifications. static U32 SWUpdateLastBroadcastTimeMS; ///< Software update last broadcast time stamp in milliseconds. -static U32 REMOVETHEVAR = 0; // TODO remove - // ********** private function prototypes ********** static void handleIncomingCmdMessage( SW_UPDATE_CAN_MAIL_BOX_T mailBox ); @@ -442,11 +439,8 @@ ACK_NACK_STATUS_T ackStatus = NACK; BOOL status = FALSE; - fpgaPayloadLengthBytes = SWUpdateRCVStatus.updatePayloadLen; - REMOVETHEVAR += fpgaPayloadLengthBytes; + status = signalFPGAToWriteToFlash( SWUpdateRCVStatus.SWUpdateBuffer, SWUpdateRCVStatus.updatePayloadLen ); - status = signalFPGAToWriteToFlash( SWUpdateRCVStatus.SWUpdateBuffer, fpgaPayloadLengthBytes ); - if ( TRUE == status ) { // The update payload has been enqueued successfully, clear the raw buffer but keep the receive buffer since the enqueue