Data_TPMS.c 16.3 KB
Newer Older
1
#include "Application.h"
2 3 4
#include "Data_TPMS\Data_TPMS.h"

_TPMS_Display TPMS;
李俭双's avatar
李俭双 committed
5 6
uint32_t LearnTime_Count = 0;
uint32_t LearnTime_Count1 = 0;
7 8
void Data_TPMS_KL30_Init ( void )
{
李俭双's avatar
李俭双 committed
9 10
    uint8_t TPMS_L[2] = {0,0};
    Data_User_EEPROM_Read(EM_MenuData_TPMS_LEARN, (uint32_t*)TPMS_L, 1u);
11 12
    MenuData.TPMS_Front_Learn = TPMS_L[0];
    MenuData.TPMS_Rear_Learn  = TPMS_L[1];
李俭双's avatar
李俭双 committed
13 14
    //MenuData.TPMS_Front_FirstLearn_Flag = TPMS_L[2];
    //MenuData.TPMS_Rear_FirstLearn_Flag  = TPMS_L[3];
15 16
    TPMS.Front_Press_Value = 0;
    TPMS.Rear_Press_Value  = 0;
李俭双's avatar
李俭双 committed
17

18 19 20
    TPMS.Front_TPMS_Valid  = 0;
    TPMS.Rear_TPMS_Valid   = 0;
    TPMS.TPMS_Warning      = 0;
21
    //TPMS.TPMS_Unit         = Get_Dis_Tpms_Unit();
22 23
    TPMS.TPMS_Front_Learn  = MenuData.TPMS_Front_Learn;
    TPMS.TPMS_Rear_Learn   = MenuData.TPMS_Rear_Learn;
李俭双's avatar
李俭双 committed
24 25
    TPMS.TPMS_Front_FirstLearn_Flag  = MenuData.TPMS_Front_FirstLearn_Flag;
    TPMS.TPMS_Rear_FirstLearn_Flag   = MenuData.TPMS_Rear_FirstLearn_Flag;
26 27

    TPMS.TPMS_LOST = 0;
28 29
    LearnTime_Count = 6001;
    LearnTime_Count1 = 6001;
30 31 32
}
void Data_TPMS_KL15_WAKE_UP_Init ( void )
{
李俭双's avatar
李俭双 committed
33 34
    uint8_t TPMS_L[2] = {0,0};
    Data_User_EEPROM_Read(EM_MenuData_TPMS_LEARN, (uint32_t*)TPMS_L, 1);
35 36
    MenuData.TPMS_Front_Learn = TPMS_L[0];
    MenuData.TPMS_Rear_Learn  = TPMS_L[1];
李俭双's avatar
李俭双 committed
37 38
    //MenuData.TPMS_Front_FirstLearn_Flag = TPMS_L[2];
    //MenuData.TPMS_Rear_FirstLearn_Flag  = TPMS_L[3];
39 40
    TPMS.TPMS_Front_Learn     = MenuData.TPMS_Front_Learn;
    TPMS.TPMS_Rear_Learn      = MenuData.TPMS_Rear_Learn;
李俭双's avatar
李俭双 committed
41 42
    TPMS.TPMS_Front_FirstLearn_Flag  = MenuData.TPMS_Front_FirstLearn_Flag;
    TPMS.TPMS_Rear_FirstLearn_Flag   = MenuData.TPMS_Rear_FirstLearn_Flag;
43 44

    TPMS.TPMS_LOST = 0;
45 46
    LearnTime_Count = 6001;
    LearnTime_Count1 = 6001;
47 48 49 50 51 52
}

void Data_TPMS_Processing_Service ( void )
{
    uint16_t Front_TPMS = 0;
    uint16_t Rear_TPMS  = 0;
李俭双's avatar
李俭双 committed
53 54 55 56 57 58
    uint8_t  TPMS_L[2] = {0,0};
    
    if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST) 
    {
        TPMS.TPMS_Front_Learn = Get_CAN_CH0_ID_341_Sig_Front_LearningStatus();
        TPMS.TPMS_Rear_Learn = Get_CAN_CH0_ID_341_Sig_Rear_LearningStatus();
59
        TPMS.TPMS_LOST = 1;
李俭双's avatar
李俭双 committed
60 61 62 63 64
    }
    else
    {
        TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
        TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn;
65
        TPMS.TPMS_LOST = 0;
李俭双's avatar
李俭双 committed
66 67 68 69 70
    }
       
    
    if(TPMS.TPMS_Front_Learn == 0x0)
    {        
71 72 73
        //if(LearnTime_Count <= 6000)
        //{
        //    LearnTime_Count++;
李俭双's avatar
李俭双 committed
74
            TPMS.TPMS_Front_Learn = Unstudied;
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
            LearnTime_Count = 0;
        //}
        //else
        //{
        //    if(TPMS.TPMS_Front_Timeclean == 1)
        //    {
        //        LearnTime_Count = 0;
        //    }
        //    TPMS.TPMS_Front_Timeclean = 0;  
        //    if ((MenuData.TPMS_Front_Learn != 0x2) && (MenuData.TPMS_Front_Learn != 0x3) ) 
        //    {
        //        if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST) 
        //        {
        //            TPMS.TPMS_Front_Learn = LearningFailure;
        //        }
        //        else
        //        {
        //            TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
        //        }
        //        
        //    }
        //    else
        //    {
        //        TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
        //    }
        //}
李俭双's avatar
李俭双 committed
101 102
    }
    else if(TPMS.TPMS_Front_Learn == 0x1)
103
    { 
104 105 106 107 108
        //if(TPMS.TPMS_Front_Timeclean == 0)
        //{
        //    LearnTime_Count = 0;
        //}
        //TPMS.TPMS_Front_Timeclean = 1;        
李俭双's avatar
李俭双 committed
109 110 111 112 113 114 115 116 117
        if(LearnTime_Count <= 6000)
        {
            LearnTime_Count++;
            TPMS.TPMS_Front_Learn = Learning;
        }
        else
        {
            if ((MenuData.TPMS_Front_Learn != 0x2) && (MenuData.TPMS_Front_Learn != 0x3) ) 
            {
118 119 120 121 122 123 124 125
                if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST) 
                {
                    TPMS.TPMS_Front_Learn = LearningFailure;
                }
                else
                {
                    TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
                }
李俭双's avatar
李俭双 committed
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
            }
            else
            {
                TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
            }
        }
    }
    else if (TPMS.TPMS_Front_Learn == 0x2)
    {
        LearnTime_Count = 0;
        if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
        {
            TPMS.TPMS_Front_Learn = LearningCompletion;
        }
        else
        {
            ;
        }
        
    }
    else if (TPMS.TPMS_Front_Learn == 0x3)
    {
        LearnTime_Count = 0;
        TPMS.TPMS_Front_Learn = LearningFailure;
    }
    else
    {
        LearnTime_Count = 0;
        TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
    }

    if(TPMS.TPMS_Rear_Learn == 0x0)
    {        
159 160 161
        //if(LearnTime_Count1 <= 6000)
        //{
            LearnTime_Count1 = 0;
李俭双's avatar
李俭双 committed
162
            TPMS.TPMS_Rear_Learn = Unstudied;
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
        //}
        //else
        //{
        //    if(TPMS.TPMS_Rear_Timeclean == 1)
        //    {
        //        LearnTime_Count1 = 0;
        //    }
        //    TPMS.TPMS_Rear_Timeclean = 0; 
        //    if ((MenuData.TPMS_Rear_Learn != 0x2) && (MenuData.TPMS_Rear_Learn != 0x3) ) 
        //    {
        //        if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST) 
        //        {
        //            TPMS.TPMS_Rear_Learn = LearningFailure;
        //        }
        //        else
        //        {
        //            TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn;
        //        }
        //    }
        //    else
        //    {
        //        TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn;
        //    }
        //}
李俭双's avatar
李俭双 committed
187 188 189 190 191 192 193 194 195 196
    }
    else if(TPMS.TPMS_Rear_Learn == 0x1)
    {        
        if(LearnTime_Count1 <= 6000)
        {
            LearnTime_Count1++;
            TPMS.TPMS_Rear_Learn = Learning;
        }
        else
        {
197 198 199 200 201
            if(TPMS.TPMS_Rear_Timeclean == 0)
            {
                LearnTime_Count1 = 0;
            }
            TPMS.TPMS_Rear_Timeclean = 1; 
李俭双's avatar
李俭双 committed
202 203
            if ((MenuData.TPMS_Rear_Learn != 0x2) && (MenuData.TPMS_Rear_Learn != 0x3) )
            {
204 205 206 207 208 209 210 211
                if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST) 
                {
                    TPMS.TPMS_Rear_Learn = LearningFailure;
                }
                else
                {
                    TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn;
                }
李俭双's avatar
李俭双 committed
212 213 214
            }
            else
            {
215
                TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn;
李俭双's avatar
李俭双 committed
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
            }
        }
    }
    else if (TPMS.TPMS_Rear_Learn == 0x2)
    {
        LearnTime_Count1 = 0;
        if((Get_CAN_CH0_ID_373_Sig_Rear_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Rear_id() != 0xFFFFFFFF))
        {
            TPMS.TPMS_Rear_Learn = LearningCompletion;
        }
        else
        {
            ;
        }
        
    }
    else if (TPMS.TPMS_Rear_Learn == 0x3)
    {
        LearnTime_Count1 = 0;
        TPMS.TPMS_Rear_Learn = LearningFailure;
    }
    else
    {
        LearnTime_Count1 = 0;
        TPMS.TPMS_Rear_Learn = MenuData.TPMS_Front_Learn;
    }
    

244 245
    if((TPMS.TPMS_Front_Learn != MenuData.TPMS_Front_Learn) || (TPMS.TPMS_Rear_Learn != MenuData.TPMS_Rear_Learn))
    {
李俭双's avatar
李俭双 committed
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
        if(TPMS.TPMS_Front_Learn != MenuData.TPMS_Front_Learn)
        {
            TPMS.TPMS_Front_FirstLearn_Flag = 1;
        }
        if(TPMS.TPMS_Rear_Learn != MenuData.TPMS_Rear_Learn)
        {
            TPMS.TPMS_Rear_FirstLearn_Flag = 1;
        }
         
        if((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3))
        {
            MenuData.TPMS_Front_Learn = TPMS.TPMS_Front_Learn;
        }
        if((TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3))
        {
            MenuData.TPMS_Rear_Learn  = TPMS.TPMS_Rear_Learn;
        }
263 264 265 266 267 268 269 270
        if(((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3)) && (TPMS.TPMS_Front_Learn != MenuData.TPMS_Front_Learn))
        {
            TPMS_L[0] = MenuData.TPMS_Front_Learn;
            TPMS_L[1] = MenuData.TPMS_Rear_Learn;            
            Data_User_EEPROM_Write(EM_MenuData_TPMS_LEARN, (uint32_t*)TPMS_L, 1u); 
            
        }
        if( ((TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3)) && (TPMS.TPMS_Rear_Learn != MenuData.TPMS_Rear_Learn))
李俭双's avatar
李俭双 committed
271 272 273 274 275 276 277
        {
            TPMS_L[0] = MenuData.TPMS_Front_Learn;
            TPMS_L[1] = MenuData.TPMS_Rear_Learn;            
            Data_User_EEPROM_Write(EM_MenuData_TPMS_LEARN, (uint32_t*)TPMS_L, 1u); 
            
        }
        
278
    }
李俭双's avatar
李俭双 committed
279

280
    //TPMS.TPMS_Unit      = Get_Dis_Tpms_Unit();
281 282
    Front_TPMS          = Get_CAN_CH0_ID_341_Sig_Front_Pressure();
    Rear_TPMS           = Get_CAN_CH0_ID_341_Sig_Rear_Pressure();
283

284 285 286 287 288 289 290 291 292 293 294 295 296 297
    if ( Common_Get_IG_Sts() == COMMON_POWER_ON )
    {
        if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) == CAN_SIG_LOST)
        {
            TPMS.Front_TPMS_Valid  = 0;  //信号掉线,显示--
            TPMS.Rear_TPMS_Valid   = 0;  //信号掉线,显示--
            TPMS.Front_Press_Value = 0;
            TPMS.Rear_Press_Value  = 0;
            TPMS.TPMS_Warning      = 0;  //白灯
        }
        else
        {            
            if((Front_TPMS == 0xFF) || (Rear_TPMS == 0xFF))
            {
李俭双's avatar
李俭双 committed
298
                
299 300 301
                if((Front_TPMS == 0xFF) && (Rear_TPMS != 0xFF))
                {
                    TPMS.Front_TPMS_Valid  = 0;
李俭双's avatar
李俭双 committed
302
                    TPMS.Rear_TPMS_Valid   = 1;
303
                    TPMS.Front_Press_Value = 990;
304
                    TPMS.Rear_Press_Value  = Rear_TPMS * 2750;
305
                    TPMS.Rear_Press_Value  /= 102 ;
306
                    if(TPMS.Rear_Press_Value > 9900)
307
                    {
308
                        TPMS.Rear_Press_Value = 9900;
309
                    }
310
                    if(((TPMS.Rear_Press_Value + 50)< 1700) || ((TPMS.Rear_Press_Value + 50) > 2500))
311 312 313 314 315 316 317 318
                    {
                        TPMS.TPMS_Warning = 1;
                    }
                    else
                    {
                        TPMS.TPMS_Warning = 0;
                    }
                }
319
                else if ((Front_TPMS != 0xFF) && (Rear_TPMS == 0xFF))
320
                {
李俭双's avatar
李俭双 committed
321
                    TPMS.Front_TPMS_Valid  = 1;
322
                    TPMS.Rear_TPMS_Valid   = 0;
323
                    TPMS.Rear_Press_Value  = 990;
324
                    TPMS.Front_Press_Value = Front_TPMS *2750 ;
325
                    TPMS.Front_Press_Value  /= 102 ;
326
                    if(TPMS.Front_Press_Value > 9900)
327
                    {
328
                        TPMS.Front_Press_Value = 9900;
329
                    }
330
                    if(((TPMS.Front_Press_Value + 50) < 1700) || ((TPMS.Front_Press_Value + 50) > 2300))
331 332 333 334 335 336 337 338 339 340
                    {
                        TPMS.TPMS_Warning = 1;
                    }
                    else
                    {
                        TPMS.TPMS_Warning = 0;
                    }
                }
                else
                {
341 342
                    TPMS.Front_Press_Value = 9900;
                    TPMS.Rear_Press_Value = 9900;
343
                    TPMS.TPMS_Warning = 0;
344 345 346 347 348 349
                    TPMS.Front_TPMS_Valid  = 0;
                    TPMS.Rear_TPMS_Valid   = 0;
                }
            }
            else
            {
李俭双's avatar
李俭双 committed
350 351
                TPMS.Front_TPMS_Valid  = 1;
                TPMS.Rear_TPMS_Valid   = 1;
352
                TPMS.Front_Press_Value = Front_TPMS * 2750 ;                
353
                TPMS.Front_Press_Value  /= 102 ;
354
                if(TPMS.Front_Press_Value > 9900)
355
                {
356
                    TPMS.Front_Press_Value = 9900;
357 358
                }

359
                TPMS.Rear_Press_Value  = Rear_TPMS * 2750;                
360
                TPMS.Rear_Press_Value  /= 102 ;
361
                if(TPMS.Rear_Press_Value > 9900)
362
                {
363
                    TPMS.Rear_Press_Value = 9900;
364
                }
365
                if (((TPMS.Front_Press_Value + 50) < 1700) || ((TPMS.Front_Press_Value + 50) > 2300) || ((TPMS.Rear_Press_Value + 50) < 1700) || ((TPMS.Rear_Press_Value + 50) > 2500))
366 367 368 369 370 371 372 373 374 375
                {
                    TPMS.TPMS_Warning = 1;
                }
                else
                {
                    TPMS.TPMS_Warning = 0;
                }
            }
            
        }
李俭双's avatar
李俭双 committed
376
        if(TPMS.TPMS_Front_Learn == Unstudied)
377
        {
李俭双's avatar
李俭双 committed
378
            TPMS.TPMS_Front_FirstLearn_Flag = Unstudied;            
379
        }
李俭双's avatar
李俭双 committed
380
        else if(TPMS.TPMS_Front_Learn == Learning)
381
        {
李俭双's avatar
李俭双 committed
382
            TPMS.TPMS_Front_FirstLearn_Flag = Learning;            
383
        }
李俭双's avatar
李俭双 committed
384
        else if(TPMS.TPMS_Front_Learn == LearningCompletion)
385
        {
李俭双's avatar
李俭双 committed
386 387
            TPMS.TPMS_Front_FirstLearn_Flag = LearningCompletion;
            
388
        }
李俭双's avatar
李俭双 committed
389
        else if(TPMS.TPMS_Front_Learn == LearningFailure)
390
        {
李俭双's avatar
李俭双 committed
391
            TPMS.TPMS_Front_FirstLearn_Flag = LearningFailure;
392
            TPMS.Front_Press_Value = 9900;
393 394 395 396 397 398
        }
        else
        {
            ;
        }

李俭双's avatar
李俭双 committed
399
        if(TPMS.TPMS_Rear_Learn == Unstudied)
400
        {
李俭双's avatar
李俭双 committed
401
            TPMS.TPMS_Rear_FirstLearn_Flag = Unstudied;
402
        }
李俭双's avatar
李俭双 committed
403
        else if(TPMS.TPMS_Rear_Learn == Learning)
404
        {
李俭双's avatar
李俭双 committed
405
            TPMS.TPMS_Rear_FirstLearn_Flag = Learning;
406
        }
李俭双's avatar
李俭双 committed
407
        else if(TPMS.TPMS_Rear_Learn == LearningCompletion)
408
        {
李俭双's avatar
李俭双 committed
409 410
            TPMS.TPMS_Rear_FirstLearn_Flag = LearningCompletion;
            
411
        }
李俭双's avatar
李俭双 committed
412
        else if(TPMS.TPMS_Rear_Learn == LearningFailure)
413
        {
李俭双's avatar
李俭双 committed
414
            TPMS.TPMS_Rear_FirstLearn_Flag = LearningFailure;
415
            TPMS.Rear_Press_Value = 9900;
416 417 418 419 420 421
        }
        else
        {
            ;
        }

李俭双's avatar
李俭双 committed
422 423 424 425
        //if ((MenuData.TPMS_Rear_Learn != LearningCompletion) && (MenuData.TPMS_Front_Learn != LearningCompletion))
        //{
        //    TPMS.TPMS_Warning = 0;
        //}
426

427 428 429 430 431 432 433 434 435 436
    }
    else
    {
        TPMS.Front_TPMS_Valid  = 0;
        TPMS.Rear_TPMS_Valid   = 0; 
        TPMS.Front_Press_Value = 0;
        TPMS.Rear_Press_Value  = 0;
        TPMS.TPMS_Warning      = 0; 
    }
}
437
uint32_t Data_Bar_To_Psi (uint32_t bar)
438
{
439 440 441
    uint32_t Bar = 0;
    Bar = bar * 145;
    Bar /= 10;
442
    //Bar += 5;
443 444 445 446
    // bar *= 145;
    // bar /= 10;
    // bar += 5;    
    return Bar;
447
}
448 449

/*指示灯报警信号  0:白色常亮   1:黄色常亮*/
450 451 452 453
uint8_t Get_Led_TPMS_Waring (void)
{
    return TPMS.TPMS_Warning;
}
454

李俭双's avatar
李俭双 committed
455
/*0:无效,常显--  1:有效,按实际胎压数值显示  */
456 457 458 459 460 461 462 463
uint8_t Get_Front_TPMS_Sig_Vaild (void)
{
    return TPMS.Front_TPMS_Valid;
}
uint8_t Get_Rear_TPMS_Sig_Vaild (void)
{
    return TPMS.Rear_TPMS_Valid;
}
464
//10倍
465 466 467
uint16_t Get_Front_TPMS_Sig_Value (void)
{
    uint16_t value = 0;
468 469 470 471 472 473 474 475 476
    //if (TPMS.TPMS_Unit == 1)
    //{
    //    value = (Data_Bar_To_Psi(TPMS.Front_Press_Value) + 500) / 1000;
    //    if(value > 99)
    //    {
    //        value = 99;
    //    }
    //}
    //else
477
    {        
478 479
        value = TPMS.Front_Press_Value + 50;        
        value = value / 100;
480 481 482 483 484 485
    }
    return value;
}
uint16_t Get_Rear_TPMS_Sig_Value (void)
{
    uint16_t value = 0;
486 487 488 489 490 491 492 493 494 495
    //if (TPMS.TPMS_Unit == 1)
    //{
    //    value = (Data_Bar_To_Psi(TPMS.Rear_Press_Value) + 500) / 1000;
    //    if(value > 99)
    //    {
    //        value = 99;
    //    }
    //    
    //}
    //else
496
    {        
497 498
        value = TPMS.Rear_Press_Value + 50;        
        value = value / 100;        
499 500 501 502 503
    }
    return value;    
}
uint16_t Get_Rear_TPMS_TX (void)
{
504
    uint16_t value = 0;
505
    value = Data_Bar_To_Psi(TPMS.Rear_Press_Value) / 100;
506 507 508 509 510
    if(value > 990)
    {
        value = 990;
    }
    return value;
511 512 513
}
uint16_t Get_Front_TPMS_TX (void)
{
514
    uint16_t value = 0;
515
    value = Data_Bar_To_Psi(TPMS.Front_Press_Value) / 100;
516 517 518 519 520
    if(value > 990)
    {
        value = 990;
    }
    return value;
521
}
李俭双's avatar
李俭双 committed
522 523 524 525 526 527 528 529 530 531 532 533

/*前轮胎压学习结果 0-未学习“--”常显  1-学习中“--”闪烁  2-学习成功,正常显示数值  3-学习失败,闪烁显示最大值99*/
uint8_t Get_Front_FirstLearn_Flag (void)
{
    return TPMS.TPMS_Front_FirstLearn_Flag;
}
/*后轮胎压学习结果 0-未学习“--”常显  1-学习中“--”闪烁  2-学习成功,正常显示数值  3-学习失败,闪烁显示最大值99*/
uint8_t Get_Rear_FirstLearn_Flag (void)
{
    return TPMS.TPMS_Rear_FirstLearn_Flag;
}

534 535 536 537 538 539
/*获取0x341是否掉线  0-掉线  “--”闪烁   1-在线  获取学习结果进行显示*/
uint8_t Get_TPMS_CAN_LOST (void)
{
    return TPMS.TPMS_LOST ;
}