Commit 87768a6f authored by 李俭双's avatar 李俭双

🐞 fix:更改胎压数据返回值,当单位时PSI时,返回值分辨率为1

parent ebafef50
...@@ -39,7 +39,7 @@ void Data_TPMS_Processing_Service ( void ) ...@@ -39,7 +39,7 @@ void Data_TPMS_Processing_Service ( void )
TPMS.Front_TPMS_Valid = 0; TPMS.Front_TPMS_Valid = 0;
TPMS.Rear_TPMS_Valid = 1; TPMS.Rear_TPMS_Valid = 1;
TPMS.Front_Press_Value = 99; TPMS.Front_Press_Value = 99;
TPMS.Rear_Press_Value *= Rear_TPMS ; TPMS.Rear_Press_Value = Rear_TPMS * 275;
TPMS.Rear_Press_Value /= 10 ; TPMS.Rear_Press_Value /= 10 ;
if(TPMS.Rear_Press_Value > 99) if(TPMS.Rear_Press_Value > 99)
{ {
...@@ -59,7 +59,7 @@ void Data_TPMS_Processing_Service ( void ) ...@@ -59,7 +59,7 @@ void Data_TPMS_Processing_Service ( void )
TPMS.Front_TPMS_Valid = 1; TPMS.Front_TPMS_Valid = 1;
TPMS.Rear_TPMS_Valid = 0; TPMS.Rear_TPMS_Valid = 0;
TPMS.Rear_Press_Value = 99; TPMS.Rear_Press_Value = 99;
TPMS.Front_Press_Value *= Front_TPMS ; TPMS.Front_Press_Value = Front_TPMS *275 ;
TPMS.Front_Press_Value /= 10 ; TPMS.Front_Press_Value /= 10 ;
if(TPMS.Front_Press_Value > 99) if(TPMS.Front_Press_Value > 99)
{ {
...@@ -87,14 +87,14 @@ void Data_TPMS_Processing_Service ( void ) ...@@ -87,14 +87,14 @@ void Data_TPMS_Processing_Service ( void )
{ {
TPMS.Front_TPMS_Valid = 1; TPMS.Front_TPMS_Valid = 1;
TPMS.Rear_TPMS_Valid = 1; TPMS.Rear_TPMS_Valid = 1;
TPMS.Front_Press_Value *= Front_TPMS ; TPMS.Front_Press_Value = Front_TPMS * 275 ;
TPMS.Front_Press_Value /= 10 ; TPMS.Front_Press_Value /= 10 ;
if(TPMS.Front_Press_Value > 99) if(TPMS.Front_Press_Value > 99)
{ {
TPMS.Front_Press_Value = 99; TPMS.Front_Press_Value = 99;
} }
TPMS.Rear_Press_Value *= Rear_TPMS ; TPMS.Rear_Press_Value = Rear_TPMS * 275;
TPMS.Rear_Press_Value /= 10 ; TPMS.Rear_Press_Value /= 10 ;
if(TPMS.Rear_Press_Value > 99) if(TPMS.Rear_Press_Value > 99)
{ {
...@@ -143,12 +143,13 @@ uint8_t Get_Rear_TPMS_Sig_Vaild (void) ...@@ -143,12 +143,13 @@ uint8_t Get_Rear_TPMS_Sig_Vaild (void)
{ {
return TPMS.Rear_TPMS_Valid; return TPMS.Rear_TPMS_Valid;
} }
//10倍
uint16_t Get_Front_TPMS_Sig_Value (void) uint16_t Get_Front_TPMS_Sig_Value (void)
{ {
uint16_t value = 0; uint16_t value = 0;
if (TPMS.TPMS_Unit == 1) if (TPMS.TPMS_Unit == 1)
{ {
value = Data_Bar_To_Psi(TPMS.Front_Press_Value); value = Data_Bar_To_Psi(TPMS.Front_Press_Value) / 10;
if(value > 99) if(value > 99)
{ {
value = 99; value = 99;
...@@ -165,11 +166,12 @@ uint16_t Get_Rear_TPMS_Sig_Value (void) ...@@ -165,11 +166,12 @@ uint16_t Get_Rear_TPMS_Sig_Value (void)
uint16_t value = 0; uint16_t value = 0;
if (TPMS.TPMS_Unit == 1) if (TPMS.TPMS_Unit == 1)
{ {
value = Data_Bar_To_Psi(TPMS.Rear_Press_Value) / 10;
if(value > 99) if(value > 99)
{ {
value = 99; value = 99;
} }
value = Data_Bar_To_Psi(TPMS.Rear_Press_Value);
} }
else else
{ {
......
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