diff --git a/APELib/Receiver_sync_first/src/receiver_Sync_First_Proc.s.c b/APELib/Receiver_sync_first/src/receiver_Sync_First_Proc.s.c index 3305ebe..35cc15d 100644 --- a/APELib/Receiver_sync_first/src/receiver_Sync_First_Proc.s.c +++ b/APELib/Receiver_sync_first/src/receiver_Sync_First_Proc.s.c @@ -283,7 +283,7 @@ void Receiver_First_Sync_Proc(receiver_sync2first_sync_t* msg_ptr, uint32_t msg_ WAIT_MPU_STOP; TRACE(TRACE_RECEIVER_SYNC_FIRST_ADDR, 3, 5); //dm_check(1); - maxPosition = receiver_sync_first_temp_dm3_ptr[0]; + maxPosition = 0xffff & receiver_sync_first_temp_dm3_ptr[0]; maxsum = receiver_sync_first_temp_dm3_ptr[1]; LOG_ERROR_S("1 maxPosition:%d maxsum:%d\n",maxPosition, maxsum); @@ -346,10 +346,10 @@ void Receiver_First_Sync_Proc(receiver_sync2first_sync_t* msg_ptr, uint32_t msg_ WAIT_MPU_STOP; TRACE(TRACE_RECEIVER_SYNC_FIRST_ADDR, 3, 7); - LOG_ERROR_S("2 maxPosition:%d maxsum:%d\n",receiver_sync_first_temp_dm3_ptr[0], receiver_sync_first_temp_dm3_ptr[1]); + LOG_ERROR_S("2 maxPosition:%d maxsum:%d\n",0xffff & receiver_sync_first_temp_dm3_ptr[0], receiver_sync_first_temp_dm3_ptr[1]); if(maxsum < receiver_sync_first_temp_dm3_ptr[1]) { - maxPosition = receiver_sync_first_temp_dm3_ptr[0]; + maxPosition = 0xffff & receiver_sync_first_temp_dm3_ptr[0]; maxsum = receiver_sync_first_temp_dm3_ptr[1]; } LOG_ERROR_S("3 maxPosition:%d maxsum:%d\n",maxPosition, maxsum);