Commit b313ecba authored by 李俭双's avatar 李俭双

🐞 fix:58596 4461. A non-constant expression of 'essentially unsigned' type...

🐞 fix:58596     4461. A non-constant expression of 'essentially unsigned' type (%1s) is being converted to narrower unsigned type, '%2s' on assignment.
parent e18bfba7
...@@ -83,7 +83,7 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[]) ...@@ -83,7 +83,7 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[])
uint16_t Espeed_tx = 0; uint16_t Espeed_tx = 0;
uint16_t TripA_tx = 0; uint16_t TripA_tx = 0;
Espeed_tx = Get_ActualEngineSpeed()/100; Espeed_tx = Get_ActualEngineSpeed()/100;
TripA_tx = Data_Read_Trip(EM_TRIP_A); TripA_tx = (uint16_t)Data_Read_Trip(EM_TRIP_A);
p6EF = (CANMsg6EFUnion *)CopyData; p6EF = (CANMsg6EFUnion *)CopyData;
if ( p6EF != ( void * )0 ) if ( p6EF != ( void * )0 )
{ {
......
...@@ -219,7 +219,7 @@ void Can_Rx_Cak(CanTxRxMsg *Msg) ...@@ -219,7 +219,7 @@ void Can_Rx_Cak(CanTxRxMsg *Msg)
if ((Msg->Id == DIAG_ID_Rx_FUN) || (Msg->Id == DIAG_ID_Rx_PHY)) if ((Msg->Id == DIAG_ID_Rx_FUN) || (Msg->Id == DIAG_ID_Rx_PHY))
{ {
DoCAN_L_Data_Indication(Msg->Id, Msg->DLC, Msg->Data); DoCAN_L_Data_Indication((uint16_t)(Msg->Id), Msg->DLC, Msg->Data);
} }
} }
/** /**
......
...@@ -517,7 +517,7 @@ uint16_t GET_DataCoolantTempValueDisp(void) ...@@ -517,7 +517,7 @@ uint16_t GET_DataCoolantTempValueDisp(void)
} }
uint16_t GET_DataCoolantSegValue(void) uint16_t GET_DataCoolantSegValue(void)
{ {
return (u32ColCurNum)/100; return (uint16_t)((u32ColCurNum)/100);
} }
uint8_t GET_DataCollantTempValueValid(void) uint8_t GET_DataCollantTempValueValid(void)
{ {
......
...@@ -563,8 +563,8 @@ uint16_t Get_Front_TPMS_Sig_Value (void) ...@@ -563,8 +563,8 @@ uint16_t Get_Front_TPMS_Sig_Value (void)
//} //}
//else //else
{ {
value = TPMS.Front_Press_Value + 50; //value = TPMS.Front_Press_Value + 50;
value = value / 100; value = (uint16_t)((TPMS.Front_Press_Value + 50) / 100);
} }
return value; return value;
} }
...@@ -582,15 +582,15 @@ uint16_t Get_Rear_TPMS_Sig_Value (void) ...@@ -582,15 +582,15 @@ uint16_t Get_Rear_TPMS_Sig_Value (void)
//} //}
//else //else
{ {
value = TPMS.Rear_Press_Value + 50; //value = TPMS.Rear_Press_Value + 50;
value = value / 100; value = (uint8_t)((TPMS.Rear_Press_Value + 50) / 100);
} }
return value; return value;
} }
uint16_t Get_Rear_TPMS_TX (void) uint16_t Get_Rear_TPMS_TX (void)
{ {
uint16_t value = 0; uint16_t value = 0;
value = Data_Bar_To_Psi(TPMS.Rear_Press_Value) / 100; value = (uint16_t)(Data_Bar_To_Psi(TPMS.Rear_Press_Value) / 100);
if(value > 990) if(value > 990)
{ {
value = 990; value = 990;
...@@ -600,7 +600,7 @@ uint16_t Get_Rear_TPMS_TX (void) ...@@ -600,7 +600,7 @@ uint16_t Get_Rear_TPMS_TX (void)
uint16_t Get_Front_TPMS_TX (void) uint16_t Get_Front_TPMS_TX (void)
{ {
uint16_t value = 0; uint16_t value = 0;
value = Data_Bar_To_Psi(TPMS.Front_Press_Value) / 100; value = (uint16_t)(Data_Bar_To_Psi(TPMS.Front_Press_Value) / 100);
if(value > 990) if(value > 990)
{ {
value = 990; value = 990;
......
...@@ -70,10 +70,10 @@ void Data_Vehicle_Speed_Processing_Service(void) ...@@ -70,10 +70,10 @@ void Data_Vehicle_Speed_Processing_Service(void)
{ {
uint8_t i; uint8_t i;
uint16_t Delta; uint16_t Delta;
uint32_t VSpeed; uint16_t VSpeed;
uint32_t VSpeedCal; uint32_t VSpeedCal;
uint8_t ESC_VehicleSpeedState; uint8_t ESC_VehicleSpeedState;
uint32_t Vehicle_Speed; uint8_t Vehicle_Speed;
Vehicle_Speed = Get_CAN_CH0_ID_101_Sig_ECU_Vehicle_Speed( ); Vehicle_Speed = Get_CAN_CH0_ID_101_Sig_ECU_Vehicle_Speed( );
ESC_VehicleSpeedState = Get_CAN_CH0_ID_101_Sig_ECU_Vehicle_Speed_State( ); ESC_VehicleSpeedState = Get_CAN_CH0_ID_101_Sig_ECU_Vehicle_Speed_State( );
...@@ -163,13 +163,13 @@ void Data_Vehicle_Speed_Processing_Service(void) ...@@ -163,13 +163,13 @@ void Data_Vehicle_Speed_Processing_Service(void)
if ( (DataVSpeedTarget >= DataVSpeedHysteresis) || (DataVSpeedTarget < DATA_VSPEED_HYSTERESIS) ) if ( (DataVSpeedTarget >= DataVSpeedHysteresis) || (DataVSpeedTarget < DATA_VSPEED_HYSTERESIS) )
{ {
DataVSpeedHysteresis = DataVSpeedTarget; DataVSpeedHysteresis = (uint16_t)DataVSpeedTarget;
} }
else else
{ {
if ( DataVSpeedHysteresis - DataVSpeedTarget >= DATA_VSPEED_HYSTERESIS ) if ( DataVSpeedHysteresis - DataVSpeedTarget >= DATA_VSPEED_HYSTERESIS )
{ {
DataVSpeedHysteresis = DataVSpeedTarget; DataVSpeedHysteresis = (uint16_t)DataVSpeedTarget;
} }
} }
...@@ -444,7 +444,7 @@ uint16_t Get_DispVechileSpeed(void) ...@@ -444,7 +444,7 @@ uint16_t Get_DispVechileSpeed(void)
} }
else /* MILE */ else /* MILE */
{ {
Vspeed = Data_Km_To_Mile(DataVSpeedDisp); Vspeed = (uint16_t)Data_Km_To_Mile(DataVSpeedDisp);
if ( Vspeed >= 1230 ) if ( Vspeed >= 1230 )
{ {
Vspeed = 1230; Vspeed = 1230;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
typedef struct typedef struct
{ {
uint32_t Buffer[30]; uint8_t Buffer[30];
uint8_t Cnt; uint8_t Cnt;
uint8_t time; uint8_t time;
uint16_t ResOpen_ActTimer; uint16_t ResOpen_ActTimer;
......
...@@ -115,7 +115,7 @@ void Fuel_R_Cal(uint8_t deltaTime) ...@@ -115,7 +115,7 @@ void Fuel_R_Cal(uint8_t deltaTime)
{ {
temp32 += FuelData[i]; temp32 += FuelData[i];
} }
FuelR = temp32 / (FUEL_CAL_END - FUEL_CAL_START); FuelR = (uint16_t)(temp32 / (FUEL_CAL_END - FUEL_CAL_START));
FuelDataCount = 0; FuelDataCount = 0;
FuelADCompleteFlg = 1; FuelADCompleteFlg = 1;
} }
......
...@@ -4490,7 +4490,7 @@ uint8_t check_SEG_step = 0; ...@@ -4490,7 +4490,7 @@ uint8_t check_SEG_step = 0;
/*仪表段码扫描函数*/ /*仪表段码扫描函数*/
void Check_SEG_Display(void) void Check_SEG_Display(void)
{ {
uint32_t a; uint8_t a;
uint8_t i = 0; uint8_t i = 0;
a = check_SEG_step / 25u; a = check_SEG_step / 25u;
...@@ -4531,12 +4531,12 @@ void Checkself_SEG_Display(void) ...@@ -4531,12 +4531,12 @@ void Checkself_SEG_Display(void)
{ {
uint16_t Vspeed = 0; uint16_t Vspeed = 0;
uint16_t Espeed = 0; uint16_t Espeed = 0;
uint16_t Fuel = 0; uint8_t Fuel = 0;
uint16_t collant = 0; uint16_t collant = 0;
uint16_t TPMS_dis = 0; uint16_t TPMS_dis = 0;
uint16_t voltage = 0; uint16_t voltage = 0;
uint16_t hour = 0; uint8_t hour = 0;
uint16_t min = 0; uint8_t min = 0;
uint32_t ODO = 0; uint32_t ODO = 0;
uint32_t Mileage = 0; uint32_t Mileage = 0;
// uint32_t i = 0; // uint32_t i = 0;
......
...@@ -558,7 +558,7 @@ uint8_t Get_Dis_Tpms_Unit(void) ...@@ -558,7 +558,7 @@ uint8_t Get_Dis_Tpms_Unit(void)
uint8_t Get_Dis_Tcs_Val(void) uint8_t Get_Dis_Tcs_Val(void)
{ {
return MenuData.Tcs_Val; // 0 off, 1 on return (uint8_t)(MenuData.Tcs_Val); // 0 off, 1 on
} }
uint8_t Get_Tpms_TX_Flag(void) uint8_t Get_Tpms_TX_Flag(void)
{ {
......
...@@ -142,7 +142,7 @@ typedef enum ...@@ -142,7 +142,7 @@ typedef enum
typedef struct typedef struct
{ {
uint16_t u16PinNum; /**< GPIO端口编号(RTE_GPIO_PORTxx_PINyy) */ uint16_t u16PinNum; /**< GPIO端口编号(RTE_GPIO_PORTxx_PINyy) */
uint16_t u16PinMode; /**< GPIO工作模式 */ uint8_t u16PinMode; /**< GPIO工作模式 */
}RTE_GPIO_Config_st_t; }RTE_GPIO_Config_st_t;
/****************************************************************************** /******************************************************************************
......
...@@ -99,7 +99,7 @@ char Uart0_Receive(void) ...@@ -99,7 +99,7 @@ char Uart0_Receive(void)
* @param None * @param None
* @return None * @return None
*****************************************************************************/ *****************************************************************************/
void Uart0_IntSend(uint8_t *tx_buf, uint16_t tx_num) void Uart0_IntSend(uint8_t *tx_buf, uint32_t tx_num)
{ {
pData.data = tx_buf; pData.data = tx_buf;
pData.len = tx_num; pData.len = tx_num;
......
...@@ -18,7 +18,7 @@ int8_t Uart0_Init(uint32_t bound); ...@@ -18,7 +18,7 @@ int8_t Uart0_Init(uint32_t bound);
void Uart0_Send(uint8_t ch); void Uart0_Send(uint8_t ch);
char Uart0_Receive(void); char Uart0_Receive(void);
void Uart0_IntSend(uint8_t *tx_buf, uint16_t tx_num); void Uart0_IntSend(uint8_t *tx_buf, uint32_t tx_num);
void uart0_interrupt_send(void *msg); void uart0_interrupt_send(void *msg);
void uart0_interrupt_receive(void); void uart0_interrupt_receive(void);
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment