Telltales_user.c 57.7 KB
Newer Older
hu's avatar
hu committed
1 2 3 4 5 6 7 8 9 10 11 12

#include "GPIO.h"
#include "Telltales.h"
#include "Telltales_user.h"
#include "CAN_Communication_Matrix.h"
#include "Flash_synchronizer.h"
#include "EOL_Para.h"
#include "Sound_Scheduler.h"
#include "SEG_DISPLAY.h"
#include "Maintenance.h"
#include "Line_in.h"
#include "IS31FL3236.h"
hu's avatar
hu committed
13
#include "Service_TPMS.h"
hu's avatar
hu committed
14
#include "Data_AirPressure.h"
15
#include "Data_CoolantTemperature.h"
hu's avatar
hu committed
16 17
#include "FuelConfig.h"
#include "Data_Fuel_User.h"
hu's avatar
hu committed
18
#include "kwp2000_service.h"
hu's avatar
hu committed
19

hu's avatar
hu committed
20
static uint8_t L12_Air_Sta ;
hu's avatar
hu committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34

TelltaleLRCtrlStruct TelltaleLRCtrl;

const LED_Attribute_st LED_Attribute[LED_Max] =
{
    /*  指示灯索引                             是否自检         外部信号自检       工作电源状态       自检开始时间    自检持续时间       指示灯点亮条件                           指示灯执行函数               */
    {   em_LED_INTER_DIFF_LOCK_T          , NoSelfCheck ,     ExterNalCheck ,  LED_IGN_ON_OFF ,       0u,         3000ul,     LED_INTER_DIFF_LOCK_T_Judgement          , LED_INTER_DIFF_LOCK_T_Execution            },
    {   em_LED_FOUR_MUL_FOUR_T            , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_FOUR_MUL_FOUR_T_Judgement            , LED_FOUR_MUL_FOUR_T_Execution              },
    {   em_LED_EXH_BRAKE_T                , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_EXH_BRAKE_T_Judgement                , LED_EXH_BRAKE_T_Execution                  },
    {   em_LED_QOS_GLOW_T                 ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_QOS_GLOW_T_Judgement                 , LED_QOS_GLOW_T_Execution                   },
    {   em_LED_HI_BEAM_T                  , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_HI_BEAM_T_Judgement                  , LED_HI_BEAM_T_Execution                    },
    {   em_LED_Rr_FOG_LAMP_T              , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_Rr_FOG_LAMP_T_Judgement              , LED_Rr_FOG_LAMP_T_Execution                },
    {   em_LED_MIL_T                      ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_MIL_T_Judgement                      , LED_MIL_T_Execution                        },
    {   em_LED_SVS_T                      ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_SVS_T_Judgement                      , LED_SVS_T_Execution                        },
hu's avatar
hu committed
35
    {   em_LED_H_S_A__T                   , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_H_S_A_T_Judgement                    , LED_H_S_A_T_Execution                     },
hu's avatar
hu committed
36 37 38 39 40 41 42 43 44 45 46
    {   em_LED_RETARDER_T                 ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_RETARDER_T_Judgement                 , LED_RETARDER_T_Execution                   },
    {   em_LED_AUTO_LEVELING_T            , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_AUTO_LEVELING_T_Judgement            , LED_AUTO_LEVELING_T_Execution              },
    {   em_LED_ROWS_L                     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ROWS_L_Judgement                     , LED_ROWS_L_Execution                       },
    {   em_LED_BSM_OFF_L                  , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_BSM_OFF_L_Judgement                  , LED_BSM_OFF_L_Execution                    },
    {   em_LED_AEBS_OFF_L                 , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_AEBS_OFF_L_Judgement                 , LED_AEBS_OFF_L_Execution                   },
    {   em_LED_LDWS_L                     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_LDWS_L_Judgement                     , LED_LDWS_L_Execution                       },
    {   em_LED_SRS_L                      , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_SRS_L_Judgement                      , LED_SRS_L_Execution                        },
    {   em_LED_ENG_OIL_L                  ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ENG_OIL_L_Judgement                  , LED_ENG_OIL_L_Execution                    },
    {   em_LED_CHARG_L                    ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_CHARG_L_Judgement                    , LED_CHARG_L_Execution                      },
    {   em_LED_SEAT_BELT_L                ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_SEAT_BELT_L_Judgement                , LED_SEAT_BELT_L_Execution                  },
    {   em_LED_RR_DIFF_LOCK_L             ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_RR_DIFF_LOCK_L_Judgement             , LED_RR_DIFF_LOCK_L_Execution               },
hu's avatar
hu committed
47
    {   em_LED_TPMS_L                     ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_TPMS_L_Judgement                     , LED_TPMS_L_Execution                       },
hu's avatar
hu committed
48 49 50 51 52 53 54 55
    {   em_LED_ASR_or_EVSC_OFF_L          , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ASR_or_EVSC_OFF_L_Judgement          , LED_ASR_or_EVSC_OFF_L_Execution            },
    {   em_LED_EVSC_L                     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_EVSC_L_Judgement                     , LED_EVSC_L_Execution                       },
    {   em_LED_eco_stop_OFF_L             , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_eco_stop_OFF_L_Judgement             , LED_eco_stop_OFF_L_Execution               },
    {   em_LED_AMT_L                      , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_AMT_L_Judgement                      , LED_AMT_L_Execution                        },
    {   em_LED_WEAR_IND_L                 , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_WEAR_IND_L_Judgement                 , LED_WEAR_IND_L_Execution                   },
    {   em_LED_TRAILER_BRAKE_R            ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_TRAILER_BRAKE_R_Judgement            , LED_TRAILER_BRAKE_R_Execution              },
    {   em_LED_BRAKE_AIR_or_EBS_YELLOW_R  , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_BRAKE_AIR_or_EBS_YELLOW_R_Judgement  , LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution    },
    {   em_LED_ACC_AIR_R                  , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ACC_AIR_R_Judgement                  , LED_ACC_AIR_R_Execution                    },
hu's avatar
hu committed
56
    {   em_LED_ABS_R                      ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ABS_R_Judgement                      , LED_ABS_R_Execution                        },
hu's avatar
hu committed
57 58 59 60 61 62 63
    {   em_LED_PARK_BRAKE_R               ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_PARK_BRAKE_R_Judgement               , LED_PARK_BRAKE_R_Execution                 },
    {   em_LED_BRAKE_AIR_or_EBS_RED_R     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_BRAKE_AIR_or_EBS_RED_R_Judgement     , LED_BRAKE_AIR_or_EBS_RED_R_Execution       },
    {   em_LED_BRAKE_LOCK_R               , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_BRAKE_LOCK_R_Judgement               , LED_BRAKE_LOCK_R_Execution                 },
    {   em_LED_AIR_SUS_R                  ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_AIR_SUS_R_Judgement                  , LED_AIR_SUS_R_Execution                    },
    {   em_LED_TRAILER_ABS_U              ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_TRAILER_ABS_U_Judgement              , LED_TRAILER_ABS_U_Execution                },
    {   em_LED_WORKING_LAMP_U             , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_WORKING_LAMP_U_Judgement             , LED_WORKING_LAMP_U_Execution               },
    {   em_LED_TRAILER_ABS_INFO_U         , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_TRAILER_ABS_INFO_U_Judgement         , LED_TRAILER_ABS_INFO_U_Execution           },
hu's avatar
hu committed
64 65
    {   em_LED_TEMP                       , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_Temp_Judgement                       , LED_Temp_Execution                         },
    {   em_LED_FUEL                       , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_Fuel_Judgement                       , LED_Fuel_Execution                         },
hu's avatar
hu committed
66 67 68 69 70 71 72 73 74 75 76
};

/*must put into 10ms task*/

void Telltales_Left_Right_KL30_Init(void);

void Telltales_Left_Right_KL30_Init(void)
{
    TelltaleLRCtrl.LastRight = 0u;
    TelltaleLRCtrl.LastLeft = 0u;
    TelltaleLRCtrl.Delay = 0u;
hu's avatar
hu committed
77 78

    L12_Air_Sta = 0u;
hu's avatar
hu committed
79
}
hu's avatar
hu committed
80

81 82 83 84 85 86 87
/*************************************

测试用

**************************************/
void Test_LED_AllLight(void)
{
hu's avatar
hu committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 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 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
    COMMON_PowerStatus_t u8IG_st;

    u8IG_st = Common_Get_IG_Sts();

    if (u8IG_st == COMMON_POWER_ON)
    {
        LED_Left_Right_Execution(LED_ON_State);
        LED_INTER_DIFF_LOCK_T_Execution(LED_ON_State);
        LED_FOUR_MUL_FOUR_T_Execution(LED_ON_State);
        LED_EXH_BRAKE_T_Execution(LED_ON_State);
        LED_QOS_GLOW_T_Execution(LED_ON_State);
        LED_HI_BEAM_T_Execution(LED_ON_State);
        LED_Rr_FOG_LAMP_T_Execution(LED_ON_State);
        LED_MIL_T_Execution(LED_ON_State);
        LED_SVS_T_Execution(LED_ON_State);
        LED_H_S_A_T_Execution(LED_ON_State);
        LED_RETARDER_T_Execution(LED_ON_State);
        LED_AUTO_LEVELING_T_Execution(LED_ON_State);
        LED_ROWS_L_Execution(LED_ON_State);
        LED_BSM_OFF_L_Execution(LED_ON_State);
        LED_AEBS_OFF_L_Execution(LED_ON_State);
        LED_LDWS_L_Execution(LED_ON_State);
        LED_SRS_L_Execution(LED_ON_State);
        LED_ENG_OIL_L_Execution(LED_ON_State);
        LED_CHARG_L_Execution(LED_ON_State);
        LED_SEAT_BELT_L_Execution(LED_ON_State);
        LED_RR_DIFF_LOCK_L_Execution(LED_ON_State);
        LED_TPMS_L_Execution(LED_ON_State);
        LED_ASR_or_EVSC_OFF_L_Execution(LED_ON_State);
        LED_EVSC_L_Execution(LED_ON_State);
        LED_eco_stop_OFF_L_Execution(LED_ON_State);
        LED_AMT_L_Execution(LED_ON_State);
        LED_WEAR_IND_L_Execution(LED_ON_State);
        LED_TRAILER_BRAKE_R_Execution(LED_ON_State);
        LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution(LED_ON_State);
        LED_ACC_AIR_R_Execution(LED_ON_State);
        LED_ABS_R_Execution(LED_ON_State);
        LED_PARK_BRAKE_R_Execution(LED_ON_State);
        LED_BRAKE_AIR_or_EBS_RED_R_Execution(LED_ON_State);
        LED_BRAKE_LOCK_R_Execution(LED_ON_State);
        LED_AIR_SUS_R_Execution(LED_ON_State);
        LED_TRAILER_ABS_U_Execution(LED_ON_State);
        LED_WORKING_LAMP_U_Execution(LED_ON_State);
        LED_TRAILER_ABS_INFO_U_Execution(LED_ON_State);
        LED_Temp_Execution(LED_ON_State);
        LED_Fuel_Execution(LED_ON_State);
    }
    else
    {
        LED_Left_Right_Execution(LED_OFF_State);
        LED_INTER_DIFF_LOCK_T_Execution(LED_OFF_State);
        LED_FOUR_MUL_FOUR_T_Execution(LED_OFF_State);
        LED_EXH_BRAKE_T_Execution(LED_OFF_State);
        LED_QOS_GLOW_T_Execution(LED_OFF_State);
        LED_HI_BEAM_T_Execution(LED_OFF_State);
        LED_Rr_FOG_LAMP_T_Execution(LED_OFF_State);
        LED_MIL_T_Execution(LED_OFF_State);
        LED_SVS_T_Execution(LED_OFF_State);
        LED_H_S_A_T_Execution(LED_OFF_State);
        LED_RETARDER_T_Execution(LED_OFF_State);
        LED_AUTO_LEVELING_T_Execution(LED_OFF_State);
        LED_ROWS_L_Execution(LED_OFF_State);
        LED_BSM_OFF_L_Execution(LED_OFF_State);
        LED_AEBS_OFF_L_Execution(LED_OFF_State);
        LED_LDWS_L_Execution(LED_OFF_State);
        LED_SRS_L_Execution(LED_OFF_State);
        LED_ENG_OIL_L_Execution(LED_OFF_State);
        LED_CHARG_L_Execution(LED_OFF_State);
        LED_SEAT_BELT_L_Execution(LED_OFF_State);
        LED_RR_DIFF_LOCK_L_Execution(LED_OFF_State);
        LED_TPMS_L_Execution(LED_OFF_State);
        LED_ASR_or_EVSC_OFF_L_Execution(LED_OFF_State);
        LED_EVSC_L_Execution(LED_OFF_State);
        LED_eco_stop_OFF_L_Execution(LED_OFF_State);
        LED_AMT_L_Execution(LED_OFF_State);
        LED_WEAR_IND_L_Execution(LED_OFF_State);
        LED_TRAILER_BRAKE_R_Execution(LED_OFF_State);
        LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution(LED_OFF_State);
        LED_ACC_AIR_R_Execution(LED_OFF_State);
        LED_ABS_R_Execution(LED_OFF_State);
        LED_PARK_BRAKE_R_Execution(LED_OFF_State);
        LED_BRAKE_AIR_or_EBS_RED_R_Execution(LED_OFF_State);
        LED_BRAKE_LOCK_R_Execution(LED_OFF_State);
        LED_AIR_SUS_R_Execution(LED_OFF_State);
        LED_TRAILER_ABS_U_Execution(LED_OFF_State);
        LED_WORKING_LAMP_U_Execution(LED_OFF_State);
        LED_TRAILER_ABS_INFO_U_Execution(LED_OFF_State);
        LED_Temp_Execution(LED_OFF_State);
        LED_Fuel_Execution(LED_OFF_State);
    }
178 179 180 181 182 183 184 185
}

/*---------------------------------------------------------------------------*/
#define XXXX  0u
#define LED_BRIGHTNESSR 0x3Fu
#define LED_BRIGHTNESSG 0x3Fu
#define LED_BRIGHTNESSY 0x3Fu
#define LED_BRIGHTNESSB 0x3Fu
hu's avatar
hu committed
186
/******************************************************************************
hu's avatar
hu committed
187
  T3 L16 U1 U4 U5无灯   左右转向单独 气压1 气压2 指示灯是背光
188 189 190 191
  R L5 L6 L7 L8 R1 R3 R4 (R2  水温)
  G T0 T2 T4 T10 T11 T13 L13  (T11例外)
  B T7
  Y (T1 T7 R2 R8 U2 燃油)
hu's avatar
hu committed
192
 ******************************************************************************/
hu's avatar
hu committed
193

194

hu's avatar
hu committed
195 196 197 198
/******************************************************************************
  T0 左转向   T13 右转向
  信号接口:
  信号定义:
hu's avatar
hu committed
199
  输出信号:
hu's avatar
hu committed
200
 ******************************************************************************/
hu's avatar
hu committed
201 202 203 204 205 206 207 208 209 210 211 212 213 214
void Telltales_Left_Right_Management_Service(void) /*10ms*/
{
    uint8_t Edge;
    uint8_t RIGHT_ST = 0x00u;
    uint8_t LEFT_ST = 0x00u;

    RIGHT_ST = Line_In_Get_Status(LINE_IN_TURN_R);
    LEFT_ST = Line_In_Get_Status(LINE_IN_TURN_L);

    Edge = 0xffu ;

    if (LEFT_ST == 1u)//左转向
    {
        SEG_LED_TURN_LEFT(7);//左转向断码屏开
215
        IS31_CHIP0_CHANNEL36 = LED_BRIGHTNESSG;
hu's avatar
hu committed
216 217 218 219 220 221
    }
    else
    {
        SEG_LED_TURN_LEFT(0);
        IS31_CHIP0_CHANNEL36 = 0x00u;
    }
222
    if (TelltaleLRCtrl.LastLeft != LEFT_ST)
hu's avatar
hu committed
223 224 225 226 227 228 229 230
    {
        TelltaleLRCtrl.LastLeft = LEFT_ST;
        Edge = LEFT_ST;
    }

    if (RIGHT_ST == 1u)//右转向
    {
        SEG_LED_TURN_RIGHT(7);//右转向断码屏开
231
        IS31_CHIP0_CHANNEL24 = LED_BRIGHTNESSG;
hu's avatar
hu committed
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
    }
    else
    {
        SEG_LED_TURN_RIGHT(0);
        IS31_CHIP0_CHANNEL24 = 0x00u;
    }

    if (TelltaleLRCtrl.LastRight != RIGHT_ST)
    {
        TelltaleLRCtrl.LastRight = RIGHT_ST;
        Edge = RIGHT_ST;
    }

    if (TelltaleLRCtrl.Delay > 0u)
    {
        TelltaleLRCtrl.Delay--;
    }
    else
    {
        if (Edge != 0xFFu)
        {
            if (Edge)
            {
                Sound_Request(SND_TICK, 1u);
            }
            else
            {
                Sound_Request(SND_TOCK, 1u);
            }

            TelltaleLRCtrl.Delay = 10u; /*200ms内不允许重复播放声音*/
        }
        else
        {
            Sound_Delete(SND_TICK);
            Sound_Delete(SND_TOCK);
        }
    }
}

hu's avatar
hu committed
272
void LED_Left_Right_Execution(uint8_t led_status)
hu's avatar
hu committed
273
{
hu's avatar
hu committed
274 275 276 277
    if (led_status == 1u)
    {
        SEG_LED_TURN_LEFT(7);/*左转向断码屏开*/
        IS31_CHIP0_CHANNEL36 = LED_BRIGHTNESSG;
hu's avatar
hu committed
278

hu's avatar
hu committed
279 280 281 282 283 284 285 286 287 288 289
        SEG_LED_TURN_RIGHT(7);/*右转向断码屏开*/
        IS31_CHIP0_CHANNEL24 = LED_BRIGHTNESSG;
    }
    else
    {
        SEG_LED_TURN_LEFT(0);/*左转向断码屏开*/
        IS31_CHIP0_CHANNEL36 = 0u;

        SEG_LED_TURN_RIGHT(0);/*右转向断码屏开*/
        IS31_CHIP0_CHANNEL24 = 0u;
    }
hu's avatar
hu committed
290
}
hu's avatar
hu committed
291

292 293
/******************************************************************************
  T1  INTER DIFF LOCK
hu's avatar
hu committed
294
  信号接口:  B36 HIGH
295
  信号定义:
hu's avatar
hu committed
296
  输出信号:
297
 ******************************************************************************/
hu's avatar
hu committed
298 299 300 301
uint8_t LED_INTER_DIFF_LOCK_T_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
302 303

    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_RR_DIFF_LOCK);
hu's avatar
hu committed
304 305 306 307 308 309 310 311 312 313 314 315

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
316 317
void LED_INTER_DIFF_LOCK_T_Execution(uint8_t led_status)
{
hu's avatar
hu committed
318
    RR_DIFF_LOCK_MCU = led_status;
319 320 321 322 323 324 325 326 327 328 329 330

    if (led_status == 1)
    {
        SEG_LED_INTER_DIFF_LOCK_T(7);
    }
    else
    {
        SEG_LED_INTER_DIFF_LOCK_T(0);
    }
}

/******************************************************************************
hu's avatar
hu committed
331
  T2
332 333
  信号接口:
  信号定义:
hu's avatar
hu committed
334
  输出信号:
335
 ******************************************************************************/
hu's avatar
hu committed
336
uint8_t LED_FOUR_MUL_FOUR_T_Judgement(void)
337 338 339
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
340

hu's avatar
hu committed
341
    m_Condition1 = (uint8_t)XXXX;
342 343 344 345 346 347 348 349 350 351 352 353

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
354
void LED_FOUR_MUL_FOUR_T_Execution(uint8_t led_status)
355
{
hu's avatar
hu committed
356 357
    if (led_status == 1)
    {
358
        IS31_CHIP0_CHANNEL35 = LED_BRIGHTNESSG;
hu's avatar
hu committed
359
        SEG_LED_FOUR_MUL_FOUR_T(7);
360 361 362
    }
    else
    {
hu's avatar
hu committed
363
        IS31_CHIP0_CHANNEL35 = 0x00;
hu's avatar
hu committed
364
        SEG_LED_FOUR_MUL_FOUR_T(0);
365 366 367 368
    }
}

/******************************************************************************
hu's avatar
hu committed
369
  T4 EXH BRAKE
hu's avatar
hu committed
370
  信号接口: 0x18FF2300 Byte:2,bit:2-1==00(B)
371
  信号定义:
hu's avatar
hu committed
372
  输出信号:
373
 ******************************************************************************/
hu's avatar
hu committed
374 375 376 377
uint8_t LED_EXH_BRAKE_T_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
378

hu's avatar
hu committed
379
    m_Condition1 = (uint8_t)Get_ID_18FF2300_Sig_Exh_Lamp();
380

hu's avatar
hu committed
381
    if (m_Condition1 == 0x00u)
hu's avatar
hu committed
382 383 384 385 386 387 388
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }
389

hu's avatar
hu committed
390 391 392 393 394 395
    return u8Result;
}
void LED_EXH_BRAKE_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
396
        IS31_CHIP0_CHANNEL34 = LED_BRIGHTNESSG;
hu's avatar
hu committed
397 398 399 400
        SEG_LED_EXH_BRAKE_T(7);
    }
    else
    {
hu's avatar
hu committed
401
        IS31_CHIP0_CHANNEL34 = 0x00;
hu's avatar
hu committed
402 403 404
        SEG_LED_EXH_BRAKE_T(0);
    }
}
405 406

/******************************************************************************
hu's avatar
hu committed
407
  T5 QOS(GLOW)
hu's avatar
hu committed
408
  信号接口: 0x18FF2300 Byte:2,bit:6-5==01(B)
409
  信号定义:
hu's avatar
hu committed
410
  输出信号:
411
 ******************************************************************************/
hu's avatar
hu committed
412
uint8_t LED_QOS_GLOW_T_Judgement(void)
413 414 415
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
416

hu's avatar
hu committed
417
    m_Condition1 = (uint8_t)Get_ID_18FF2300_Sig_Glow_Lamp();
418 419 420 421 422 423 424 425 426 427 428 429

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
430
void LED_QOS_GLOW_T_Execution(uint8_t led_status)
431
{
hu's avatar
hu committed
432 433
    if (led_status == 1)
    {
434
        IS31_CHIP0_CHANNEL33 = LED_BRIGHTNESSY;
hu's avatar
hu committed
435
        SEG_LED_QOS_GLOW_T(7);
436 437 438
    }
    else
    {
hu's avatar
hu committed
439
        IS31_CHIP0_CHANNEL33 = 0x00;
hu's avatar
hu committed
440
        SEG_LED_QOS_GLOW_T(0);
441 442 443
    }
}
/******************************************************************************
hu's avatar
hu committed
444
  T6 HI BEAM
hu's avatar
hu committed
445
  信号接口: A25  HIGH
446 447 448
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
449
uint8_t LED_HI_BEAM_T_Judgement(void)
hu's avatar
hu committed
450 451 452
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
453

hu's avatar
hu committed
454
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_HI_BEAM);
hu's avatar
hu committed
455 456 457 458 459 460 461 462 463 464 465 466

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
467 468 469 470
void LED_HI_BEAM_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
471
        IS31_CHIP0_CHANNEL32 = LED_BRIGHTNESSY;
hu's avatar
hu committed
472 473 474 475
        SEG_LED_HI_BEAM_T(7);
    }
    else
    {
hu's avatar
hu committed
476
        IS31_CHIP0_CHANNEL32 = 0x00;
hu's avatar
hu committed
477 478 479
        SEG_LED_HI_BEAM_T(0);
    }
}
hu's avatar
hu committed
480

hu's avatar
hu committed
481 482
/******************************************************************************
  T7 Rr FOG LAMP
hu's avatar
hu committed
483
  信号接口: B14 HIGH
hu's avatar
hu committed
484 485 486 487
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Rr_FOG_LAMP_T_Judgement(void)
hu's avatar
hu committed
488 489 490
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
491

hu's avatar
hu committed
492
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_Rr_FOG_LAMP);
hu's avatar
hu committed
493

hu's avatar
hu committed
494
    if (m_Condition1 == 1u)
hu's avatar
hu committed
495 496 497 498 499 500 501 502 503 504
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
505 506 507
void LED_Rr_FOG_LAMP_T_Execution(uint8_t led_status)
{
    T7_LED_OUT = led_status;
hu's avatar
hu committed
508

hu's avatar
hu committed
509 510 511 512 513 514 515 516 517 518 519 520
    if (led_status == 1)
    {
        SEG_LED_Rr_FOG_LAMP_T(7);
    }
    else
    {
        SEG_LED_Rr_FOG_LAMP_T(0);
    }
}

/******************************************************************************
  T8 MIL
hu's avatar
hu committed
521
  信号接口: A31 HIGH
hu's avatar
hu committed
522 523 524 525
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_MIL_T_Judgement(void)
hu's avatar
hu committed
526 527 528
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
529

hu's avatar
hu committed
530
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_MIL);
hu's avatar
hu committed
531 532 533

    if (m_Condition1 == 1u)
    {
hu's avatar
hu committed
534
        u8Result = 1u;
hu's avatar
hu committed
535 536 537
    }
    else
    {
hu's avatar
hu committed
538
        u8Result = 0u;
hu's avatar
hu committed
539 540 541 542
    }

    return u8Result;
}
hu's avatar
hu committed
543 544 545 546
void LED_MIL_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
547
        IS31_CHIP0_CHANNEL31 = LED_BRIGHTNESSY;
hu's avatar
hu committed
548 549 550 551
        SEG_LED_MIL_T(7);
    }
    else
    {
hu's avatar
hu committed
552
        IS31_CHIP0_CHANNEL31 = 0x00;
hu's avatar
hu committed
553 554 555
        SEG_LED_MIL_T(0);
    }
}
hu's avatar
hu committed
556

hu's avatar
hu committed
557 558
/******************************************************************************
  T9 SVS
hu's avatar
hu committed
559
  信号接口: 0x18FED900 Byte:5,bit:8-7==01(B)
hu's avatar
hu committed
560 561 562 563
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_SVS_T_Judgement(void)
hu's avatar
hu committed
564 565 566
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
567

hu's avatar
hu committed
568
    m_Condition1 = (uint8_t)Get_ID_18FED900_Sig_SVS_Lamp_Status();
hu's avatar
hu committed
569 570 571 572 573 574 575 576 577 578 579 580

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
581 582 583 584
void LED_SVS_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
585
        IS31_CHIP0_CHANNEL30 = LED_BRIGHTNESSY;
hu's avatar
hu committed
586 587 588 589
        SEG_LED_SVS_T(7);
    }
    else
    {
hu's avatar
hu committed
590
        IS31_CHIP0_CHANNEL30 = 0x00;
hu's avatar
hu committed
591 592 593
        SEG_LED_SVS_T(0);
    }
}
hu's avatar
hu committed
594

hu's avatar
hu committed
595 596 597 598 599 600 601
/******************************************************************************
  T10 H.S.A
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_H_S_A_T_Judgement(void)
hu's avatar
hu committed
602 603 604
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
605

hu's avatar
hu committed
606
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
607 608 609 610 611

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
612 613 614 615
    else if (m_Condition1 == 2u)
    {
        u8Result = 2u;
    }
hu's avatar
hu committed
616 617 618 619 620 621 622
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
623 624
void LED_H_S_A_T_Execution(uint8_t led_status)
{
625
    if (led_status == 1u)
hu's avatar
hu committed
626
    {
627 628
        IS31_CHIP0_CHANNEL28 = 0x00;  /*绿灯 灭*/
        IS31_CHIP0_CHANNEL29 = LED_BRIGHTNESSY;    /*黄灯 亮*/
hu's avatar
hu committed
629
    }
630
    else if (led_status == 2u)
hu's avatar
hu committed
631
    {
632 633
        IS31_CHIP0_CHANNEL28 = LED_BRIGHTNESSG;    /*绿灯 亮*/
        IS31_CHIP0_CHANNEL29 = 0x00;  /*黄灯 灭*/
hu's avatar
hu committed
634 635 636
    }
    else
    {
hu's avatar
hu committed
637 638
        IS31_CHIP0_CHANNEL28 = 0x00;  /*绿灯 灭*/
        IS31_CHIP0_CHANNEL29 = 0x00;  /*黄灯 灭*/
hu's avatar
hu committed
639
    }
hu's avatar
hu committed
640

hu's avatar
hu committed
641
    if (led_status != 0x00u)
hu's avatar
hu committed
642 643 644 645 646 647 648 649
    {
        SEG_LED_H_S_A_T(7);
    }
    else
    {
        SEG_LED_H_S_A_T(0);
    }
}
hu's avatar
hu committed
650

hu's avatar
hu committed
651 652
/******************************************************************************
  T11 RETARDER
hu's avatar
hu committed
653
  信号接口: 0x18FF5510 Byte:1,bit:1==01(B) 绿    ----  0x18FF5510  Byte1,Bit1 Byte:1,bit:1==10(B)  黄闪
hu's avatar
hu committed
654
  信号定义: 2022-02-09 取消EOL配置条件
hu's avatar
hu committed
655 656 657
  输出信号:
 ******************************************************************************/
uint8_t LED_RETARDER_T_Judgement(void)
hu's avatar
hu committed
658 659 660
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
661 662

    m_Condition1 = (uint8_t)Get_ID_18FF5510_Sig_Intarder_Pilot_Lamp_State();
hu's avatar
hu committed
663

hu's avatar
hu committed
664
    if (m_Condition1 == 2u)
hu's avatar
hu committed
665
    {
hu's avatar
hu committed
666
        u8Result = FLASH_SYNC_1Hz;
hu's avatar
hu committed
667
    }
hu's avatar
hu committed
668
    else if (m_Condition1 == 1u)
hu's avatar
hu committed
669
    {
hu's avatar
hu committed
670
        u8Result = 2u;
hu's avatar
hu committed
671 672 673 674
    }

    return u8Result;
}
675

hu's avatar
hu committed
676 677
void LED_RETARDER_T_Execution(uint8_t led_status)
{
hu's avatar
hu committed
678
    if (led_status == 1u)
hu's avatar
hu committed
679
    {
hu's avatar
hu committed
680 681 682 683 684 685 686 687 688 689 690 691 692
        IS31_CHIP0_CHANNEL27 = 0x00u; /* 绿灯 灭 */
        IS31_CHIP0_CHANNEL26 = 0xFFu;//LED_BRIGHTNESSY; /* 黄灯 亮 闪 */
    }
    else if (led_status == 2u)
    {
        IS31_CHIP0_CHANNEL27 = LED_BRIGHTNESSG; /* 绿灯 亮 */
        IS31_CHIP0_CHANNEL26 = 0x00u; /* 黄灯 灭 */
    }
    else
    {
        IS31_CHIP0_CHANNEL27 = 0x00u; /* 绿灯 灭 */
        IS31_CHIP0_CHANNEL26 = 0x00u; /* 黄灯 灭 */
    }
hu's avatar
hu committed
693

hu's avatar
hu committed
694 695 696
    if (led_status != 0x00u)
    {
        SEG_LED_RETARDER_T(7);
hu's avatar
hu committed
697 698 699 700 701 702 703 704 705 706 707 708 709 710
    }
    else
    {
        SEG_LED_RETARDER_T(0);
    }
}

/******************************************************************************
  T12 AUTO LEVELING
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_AUTO_LEVELING_T_Judgement(void)
hu's avatar
hu committed
711 712 713
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
714

hu's avatar
hu committed
715
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
716 717 718 719 720 721 722 723 724 725 726 727 728

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}

hu's avatar
hu committed
729 730 731 732
void LED_AUTO_LEVELING_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
733
        IS31_CHIP0_CHANNEL25 = LED_BRIGHTNESSY;
hu's avatar
hu committed
734 735 736 737
        SEG_LED_AUTO_LEVELING_T(7);
    }
    else
    {
hu's avatar
hu committed
738
        IS31_CHIP0_CHANNEL25 = 0x00;
hu's avatar
hu committed
739 740 741 742 743
        SEG_LED_AUTO_LEVELING_T(0);
    }
}

/******************************************************************************
hu's avatar
hu committed
744
  L1 ROWS
hu's avatar
hu committed
745 746 747 748
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
749
uint8_t LED_ROWS_L_Judgement(void)
hu's avatar
hu committed
750 751 752
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
753

hu's avatar
hu committed
754
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
755 756 757 758 759 760 761 762 763 764 765 766

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
767
void LED_ROWS_L_Execution(uint8_t led_status)
hu's avatar
hu committed
768
{
hu's avatar
hu committed
769 770
    if (led_status == 1)
    {
771
        IS31_CHIP0_CHANNEL01 = LED_BRIGHTNESSY;
hu's avatar
hu committed
772
        SEG_LED_ROWS_L(7);
hu's avatar
hu committed
773
    }
hu's avatar
hu committed
774
    else
hu's avatar
hu committed
775
    {
hu's avatar
hu committed
776
        IS31_CHIP0_CHANNEL01 = 0x00;
hu's avatar
hu committed
777
        SEG_LED_ROWS_L(0);
hu's avatar
hu committed
778 779 780 781
    }
}

/******************************************************************************
hu's avatar
hu committed
782
  L2 BSM OFF
hu's avatar
hu committed
783 784 785 786
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
787
uint8_t LED_BSM_OFF_L_Judgement(void)
hu's avatar
hu committed
788 789 790
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
791

hu's avatar
hu committed
792
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
793 794 795 796

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
hu's avatar
hu committed
797 798 799 800 801
    }
    else
    {
        u8Result = 0u;
    }
802

hu's avatar
hu committed
803 804
    return u8Result;
}
hu's avatar
hu committed
805
void LED_BSM_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
806
{
hu's avatar
hu committed
807 808
    if (led_status == 1)
    {
809
        IS31_CHIP0_CHANNEL02 = LED_BRIGHTNESSY;
hu's avatar
hu committed
810
        SEG_LED_BSM_OFF_L(7);
hu's avatar
hu committed
811 812 813
    }
    else
    {
hu's avatar
hu committed
814
        IS31_CHIP0_CHANNEL02 = 0x00;
hu's avatar
hu committed
815
        SEG_LED_BSM_OFF_L(0);
hu's avatar
hu committed
816 817 818
    }
}

hu's avatar
hu committed
819
/******************************************************************************
hu's avatar
hu committed
820
  L3 AEBS OFF
hu's avatar
hu committed
821 822 823 824
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
825
uint8_t LED_AEBS_OFF_L_Judgement(void)
hu's avatar
hu committed
826 827 828
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
829 830
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
831 832 833 834 835 836
    uint8_t m_Condition4 = 0u;
    uint8_t m_Condition5 = 0u;
    uint8_t m_Condition6 = 0u;
    uint8_t CanStatus1 = 0u;
    uint8_t CanStatus2 = 0u;
    uint8_t CanStatus3 = 0u;
hu's avatar
hu committed
837

hu's avatar
hu committed
838 839 840 841
    m_Condition1 = (uint8_t)Get_ID_CF02F2A_Sig_Advanced_Emerg_Braking_Sys_Sta();
    m_Condition2 = (uint8_t)Get_ID_CF02FA1_Sig_Advanced_Emerg_Braking_Sys_Sta();
    m_Condition3 = (uint8_t)Get_ID_CF02FA0_Sig_Advanced_Emerg_Braking_Sys_Sta();

hu's avatar
hu committed
842 843 844 845 846 847 848 849
    CanStatus1 = CAN_MSG_Status(ID_CanMsg0CF02F2A_Msg_Count);
    CanStatus2 = CAN_MSG_Status(ID_CanMsg0CF02FA1_Msg_Count);
    CanStatus3 = CAN_MSG_Status(ID_CanMsg0CF02FA0_Msg_Count);

    m_Condition4 = (uint8_t)Get_ID_18FECA2A_Sig_AebsOff();
    m_Condition5 = (uint8_t)Get_ID_18FECAA1_Sig_AebsOff();
    m_Condition6 = (uint8_t)Get_ID_18FECAA0_Sig_AebsOff();

hu's avatar
hu committed
850
    if (K_Line_Set.K_Line_LID28 == 0x01u)
hu's avatar
hu committed
851
    {
hu's avatar
hu committed
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867
        if (
            (m_Condition1 == 0x02u) || (m_Condition2 == 0x02u) || (m_Condition3 == 0x02u) ||
            ((CanStatus1 == CAN_SIG_LOST) && (CanStatus2 == CAN_SIG_LOST) && (CanStatus3 == CAN_SIG_LOST)) ||
            (m_Condition4 == 0x01u) || (m_Condition5 == 0x01u) || (m_Condition6 == 0x01u)
        )
        {
            u8Result = 1u;
        }
        else if ((m_Condition1 == 0x0Eu) || (m_Condition2 == 0x0Eu) || (m_Condition3 == 0x0Eu))
        {
            u8Result = FLASH_SYNC_1Hz;
        }
        else
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
868
    }
hu's avatar
hu committed
869 870 871 872 873 874 875
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
876
void LED_AEBS_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
877
{
hu's avatar
hu committed
878
    if (K_Line_Set.K_Line_LID28 == 0x01u)
hu's avatar
hu committed
879
    {
hu's avatar
hu committed
880 881 882 883 884 885 886 887 888 889
        if (led_status == 1)
        {
            IS31_CHIP0_CHANNEL03 = LED_BRIGHTNESSY;
            SEG_LED_AEBS_OFF_L(7);
        }
        else
        {
            IS31_CHIP0_CHANNEL03 = 0x00;
            SEG_LED_AEBS_OFF_L(0);
        }
hu's avatar
hu committed
890 891 892
    }
    else
    {
hu's avatar
hu committed
893
        IS31_CHIP0_CHANNEL03 = 0x00;
hu's avatar
hu committed
894 895
        SEG_LED_AEBS_OFF_L(0);
    }
hu's avatar
hu committed
896 897
}

hu's avatar
hu committed
898
/******************************************************************************
hu's avatar
hu committed
899
  L4 LDWS
hu's avatar
hu committed
900 901 902 903 904
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_LDWS_L_Judgement(void)
hu's avatar
hu committed
905 906 907 908
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    uint8_t m_Condition2 = 0u;
hu's avatar
hu committed
909 910
    uint8_t CanStatus1 = 0u;
    uint8_t CanStatus2 = 0u;
hu's avatar
hu committed
911

hu's avatar
hu committed
912 913
    m_Condition1 = (uint8_t)Get_ID_18FE5BE8_Sig_Lane_Departure_Warning_Sys_Sta();
    m_Condition2 = (uint8_t)Get_ID_18FECAE8_Sig_Amber_Warning_Lamp_Status();
hu's avatar
hu committed
914

hu's avatar
hu committed
915 916 917
    CanStatus1 = CAN_MSG_Status(ID_CanMsg18FE5BE8_Msg_Count);
    CanStatus2 = CAN_MSG_Status(ID_CanMsg18FECAE8_Msg_Count);

hu's avatar
hu committed
918
    if (K_Line_Set.K_Line_LID27 == 0x01u)
hu's avatar
hu committed
919
    {
hu's avatar
hu committed
920 921 922 923 924 925 926 927 928 929 930 931
        if ((CanStatus1 == CAN_SIG_LOST) || (m_Condition1 == 0x02u) || (m_Condition2 == 0x01u))
        {
            u8Result = 1u;
        }
        else if ((m_Condition1 == 0x00u) || (m_Condition1 == 0x05u) || (m_Condition1 == 0x0Eu))
        {
            u8Result = FLASH_SYNC_1Hz;
        }
        else
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
932 933 934 935 936 937 938 939
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
940
void LED_LDWS_L_Execution(uint8_t led_status)
hu's avatar
hu committed
941
{
hu's avatar
hu committed
942
    if (K_Line_Set.K_Line_LID27 == 0x01u)
hu's avatar
hu committed
943
    {
hu's avatar
hu committed
944 945 946 947 948 949 950 951 952 953
        if (led_status == 1)
        {
            IS31_CHIP0_CHANNEL04 = LED_BRIGHTNESSY;
            SEG_LED_LDWS_L(7);
        }
        else
        {
            IS31_CHIP0_CHANNEL04 = 0x00;
            SEG_LED_LDWS_L(0);
        }
hu's avatar
hu committed
954 955 956
    }
    else
    {
hu's avatar
hu committed
957
        IS31_CHIP0_CHANNEL04 = 0x00;
hu's avatar
hu committed
958
        SEG_LED_LDWS_L(0);
hu's avatar
hu committed
959 960 961
    }
}

hu's avatar
hu committed
962
/******************************************************************************
hu's avatar
hu committed
963
  L5 SRS
hu's avatar
hu committed
964 965 966 967
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
968 969 970 971
uint8_t LED_SRS_L_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
972

hu's avatar
hu committed
973 974 975 976 977 978 979 980 981 982 983 984 985
    m_Condition1 = (uint8_t)XXXX;

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
986 987 988 989
void LED_SRS_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
990
        IS31_CHIP0_CHANNEL20 = LED_BRIGHTNESSR;
hu's avatar
hu committed
991 992 993 994
        SEG_LED_SRS_L(7);
    }
    else
    {
hu's avatar
hu committed
995
        IS31_CHIP0_CHANNEL20 = 0x00;
hu's avatar
hu committed
996 997 998
        SEG_LED_SRS_L(0);
    }
}
hu's avatar
hu committed
999

hu's avatar
hu committed
1000
/******************************************************************************
hu's avatar
hu committed
1001
  L6 ENG OIL
hu's avatar
hu committed
1002
  信号接口: A32 LOW
hu's avatar
hu committed
1003 1004 1005 1006
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_ENG_OIL_L_Judgement(void)
hu's avatar
hu committed
1007 1008 1009
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1010

hu's avatar
hu committed
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_ENG_OIL);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1024 1025 1026 1027
void LED_ENG_OIL_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1028
        IS31_CHIP0_CHANNEL21 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1029 1030 1031 1032
        SEG_LED_ENG_OIL_L(7);
    }
    else
    {
hu's avatar
hu committed
1033
        IS31_CHIP0_CHANNEL21 = 0x00;
hu's avatar
hu committed
1034 1035 1036
        SEG_LED_ENG_OIL_L(0);
    }
}
hu's avatar
hu committed
1037

hu's avatar
hu committed
1038
/******************************************************************************
hu's avatar
hu committed
1039
  L7 CHARG
hu's avatar
hu committed
1040
  信号接口: A34 LOW
hu's avatar
hu committed
1041 1042 1043 1044
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_CHARG_L_Judgement(void)
hu's avatar
hu committed
1045 1046 1047
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1048

hu's avatar
hu committed
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_CHARGE);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1062 1063 1064 1065
void LED_CHARG_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1066
        IS31_CHIP0_CHANNEL22 = LED_BRIGHTNESSB;
hu's avatar
hu committed
1067 1068 1069 1070
        SEG_LED_CHARG_L(7);
    }
    else
    {
hu's avatar
hu committed
1071
        IS31_CHIP0_CHANNEL22 = 0x00;
hu's avatar
hu committed
1072 1073 1074
        SEG_LED_CHARG_L(0);
    }
}
hu's avatar
hu committed
1075

hu's avatar
hu committed
1076
/******************************************************************************
hu's avatar
hu committed
1077
  L8 SEAT BELT
hu's avatar
hu committed
1078
  信号接口: A30 LOW
hu's avatar
hu committed
1079 1080 1081 1082
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_SEAT_BELT_L_Judgement(void)
hu's avatar
hu committed
1083 1084 1085
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1086

hu's avatar
hu committed
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_SEAT_BELT);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1100 1101 1102 1103
void LED_SEAT_BELT_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1104
        IS31_CHIP0_CHANNEL23 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1105 1106 1107 1108
        SEG_LED_SEAT_BELT_L(7);
    }
    else
    {
hu's avatar
hu committed
1109
        IS31_CHIP0_CHANNEL23 = 0x00;
hu's avatar
hu committed
1110 1111 1112 1113
        SEG_LED_SEAT_BELT_L(0);
    }
}
/******************************************************************************
hu's avatar
hu committed
1114
  L9 RR DIFF LOCK
hu's avatar
hu committed
1115 1116 1117 1118 1119
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_RR_DIFF_LOCK_L_Judgement(void)
hu's avatar
hu committed
1120 1121 1122
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1123 1124

    m_Condition1 = XXXX;
hu's avatar
hu committed
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1137 1138 1139 1140
void LED_RR_DIFF_LOCK_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1141
        IS31_CHIP0_CHANNEL16 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1142 1143 1144 1145
        SEG_LED_RR_DIFF_LOCK_L(7);
    }
    else
    {
hu's avatar
hu committed
1146
        IS31_CHIP0_CHANNEL16 = 0x00;
hu's avatar
hu committed
1147 1148 1149
        SEG_LED_RR_DIFF_LOCK_L(0);
    }
}
hu's avatar
hu committed
1150

hu's avatar
hu committed
1151
/******************************************************************************
hu's avatar
hu committed
1152
  L10 TPMS
hu's avatar
hu committed
1153 1154 1155 1156 1157
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_TPMS_L_Judgement(void)
hu's avatar
hu committed
1158 1159
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172
    uint8_t CanStatus1 = 0x00u;
    uint8_t Low_Presure = 0u;
    uint8_t High_Presure = 0u;
    uint8_t High_Temperature = 0u;
    uint8_t No_signal = 0u;
    uint8_t Sensor_fault = 0u;

    Low_Presure = (uint8_t)Get_TPMSLow_Presure_Sta();
    High_Presure = (uint8_t)Get_TPMSHigh_Presure_Sta();
    High_Temperature = (uint8_t)Get_TPMSHigh_Temperature_Sta();
    No_signal = (uint8_t)Get_TPMSNo_signal_Sta();
    Sensor_fault = (uint8_t)Get_TPMSSensor_fault_Sta();
    CanStatus1 = CAN_MSG_Status(ID_CanMsg18011733_Msg_Count);
hu's avatar
hu committed
1173

hu's avatar
hu committed
1174
    if (K_Line_Set.K_Line_LID3E == 0x01u)
hu's avatar
hu committed
1175
    {
hu's avatar
hu committed
1176
        if ((Low_Presure == 1u) || (High_Presure == 1u) || (High_Temperature == 1u))
hu's avatar
hu committed
1177 1178 1179
        {
            u8Result = 1u;
        }
hu's avatar
hu committed
1180
        else if ((No_signal == 1u) || (Sensor_fault == 1u) || (CanStatus1 == CAN_SIG_LOST))
hu's avatar
hu committed
1181 1182 1183 1184 1185 1186 1187
        {
            u8Result = FLASH_SYNC_1Hz;
        }
        else
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
1188 1189 1190 1191 1192 1193 1194 1195
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1196 1197
void LED_TPMS_L_Execution(uint8_t led_status)
{
hu's avatar
hu committed
1198
    if (K_Line_Set.K_Line_LID3E == 0x01u)
hu's avatar
hu committed
1199
    {
hu's avatar
hu committed
1200 1201
        if (led_status == 1)
        {
1202
            IS31_CHIP0_CHANNEL17 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1203 1204 1205 1206
            SEG_LED_TPMS_L(7);
        }
        else
        {
hu's avatar
hu committed
1207
            IS31_CHIP0_CHANNEL17 = 0x00;
hu's avatar
hu committed
1208 1209
            SEG_LED_TPMS_L(0);
        }
hu's avatar
hu committed
1210 1211 1212
    }
    else
    {
hu's avatar
hu committed
1213
        IS31_CHIP0_CHANNEL17 = 0x00u;
hu's avatar
hu committed
1214 1215 1216 1217
        SEG_LED_TPMS_L(0);
    }
}
/******************************************************************************
hu's avatar
hu committed
1218
  L11 ASR/EVSC OFF
hu's avatar
hu committed
1219
  信号接口: 18F0010B Byte:3 Bit:3-4==01(B)
hu's avatar
hu committed
1220 1221
  信号定义:
  输出信号:
hu's avatar
hu committed
1222
  说明:调整依据 SXS-VC66-22_EBS WARNING & INDICATOR (7“LCD)改訂1-1_20211116
hu's avatar
hu committed
1223 1224
 ******************************************************************************/
uint8_t LED_ASR_or_EVSC_OFF_L_Judgement(void)
hu's avatar
hu committed
1225 1226 1227
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1228

hu's avatar
hu committed
1229 1230
    m_Condition1 = (uint8_t)Get_ID_18F0010B_Sig_ASR_Offroad_Switch();

hu's avatar
hu committed
1231
    if (K_Line_Set.K_Line_LID22 == 0x01u)
hu's avatar
hu committed
1232
    {
hu's avatar
hu committed
1233 1234 1235 1236 1237 1238 1239 1240
        if (m_Condition1 == 1u)
        {
            u8Result = 1u;
        }
        else
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
1241 1242 1243 1244 1245 1246 1247 1248
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1249 1250
void LED_ASR_or_EVSC_OFF_L_Execution(uint8_t led_status)
{
hu's avatar
hu committed
1251
    if (K_Line_Set.K_Line_LID22 == 0x01u)
hu's avatar
hu committed
1252
    {
hu's avatar
hu committed
1253 1254
        if (led_status == 1)
        {
1255
            IS31_CHIP0_CHANNEL18 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1256 1257 1258 1259
            SEG_LED_ASR_or_EVSC_OFF_L(7);
        }
        else
        {
hu's avatar
hu committed
1260
            IS31_CHIP0_CHANNEL18 = 0x00;
hu's avatar
hu committed
1261 1262
            SEG_LED_ASR_or_EVSC_OFF_L(0);
        }
hu's avatar
hu committed
1263 1264 1265
    }
    else
    {
hu's avatar
hu committed
1266
        IS31_CHIP0_CHANNEL18 = 0x0u;
hu's avatar
hu committed
1267 1268 1269
        SEG_LED_ASR_or_EVSC_OFF_L(0);
    }
}
hu's avatar
hu committed
1270

hu's avatar
hu committed
1271
/******************************************************************************
hu's avatar
hu committed
1272
  L12 EVSC
hu's avatar
hu committed
1273 1274 1275
  信号接口:
  信号定义:
  输出信号:
hu's avatar
hu committed
1276
  调整依据:SXS-VC66-22_EBS WARNING & INDICATOR (7“LCD)改訂1-1_20211116
hu's avatar
hu committed
1277 1278
 ******************************************************************************/
uint8_t LED_EVSC_L_Judgement(void)
hu's avatar
hu committed
1279 1280
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
1281 1282
    uint8_t CanStatus1 = 0u;
    uint8_t CanStatus2 = 0u;
hu's avatar
hu committed
1283 1284 1285 1286 1287
    uint8_t m_Condition1 = 0u;
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
    uint8_t m_Condition4 = 0u;
    uint8_t m_Condition5 = 0u;
hu's avatar
hu committed
1288 1289
    uint16_t m_Condition6 = 0u;
    uint16_t m_Condition7 = 0u;
1290 1291
    uint8_t m_AirSta1 = 0u;
    uint8_t m_AirSta2 = 0u;
hu's avatar
hu committed
1292

hu's avatar
hu committed
1293 1294 1295
    CanStatus1 = CAN_MSG_Status(ID_CanMsg18FE4F0B_Msg_Count);
    CanStatus2 = CAN_MSG_Status(ID_CanMsg18F0010B_Msg_Count);
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_BRAKE_AIR_EBS); /*A28*/
hu's avatar
hu committed
1296
    m_Condition2 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Red_Warning_Lamp_State(); /*byte6 34*/
hu's avatar
hu committed
1297 1298 1299
    m_Condition3 = (uint8_t)Get_ID_18F0010B_Sig_ATC_or_ASR_Lamp_State();
    m_Condition4 = (uint8_t)Get_ID_18FE4F0B_Sig_VDC_Lamp_State();
    m_Condition5 = (uint8_t)Get_ID_18FE4F0B_Sig_VDC_Fully_operational();
hu's avatar
hu committed
1300 1301
    m_Condition6 = Common_Get_Air1_Data();  /*气压1 1.89以下*/
    m_Condition7 = Common_Get_Air2_Data();  /*气压1 1.89以下*/
1302 1303
    m_AirSta1 = Common_Get_Air1_Valid();
    m_AirSta2 = Common_Get_Air2_Valid();
hu's avatar
hu committed
1304 1305

    /*做个回差,去抖*/
1306
    if (((m_Condition6 < 1890u) && (m_AirSta1 == 1u)) || ((m_Condition7 < 1890u) && (m_AirSta2 == 1u)))
hu's avatar
hu committed
1307
    {
hu's avatar
hu committed
1308
        L12_Air_Sta  = 1u;
hu's avatar
hu committed
1309
    }
1310
    else if (((m_Condition6 >= 1990u) && (m_Condition7 >= 1990u)) || ((m_AirSta1 == 0u) && (m_AirSta2 == 0u)))
hu's avatar
hu committed
1311
    {
hu's avatar
hu committed
1312
        L12_Air_Sta = 0u;
hu's avatar
hu committed
1313
    }
hu's avatar
hu committed
1314 1315

    if (
hu's avatar
hu committed
1316
        (m_Condition1 == 1u) || (Common_Get_L12_Air_Sta() == 1u) ||
hu's avatar
hu committed
1317 1318
        (((m_Condition2 == 1u) || (CanStatus2 == CAN_SIG_LOST)) && (K_Line_Set.K_Line_LID21 == 0x01u)) ||
        (((m_Condition5 == 0u) || (CanStatus1 == CAN_SIG_LOST)) && (K_Line_Set.K_Line_LID22 == 0x01u))
hu's avatar
hu committed
1319
    )
hu's avatar
hu committed
1320
    {
hu's avatar
hu committed
1321
        u8Result = 1u;
hu's avatar
hu committed
1322
    }
hu's avatar
hu committed
1323 1324
    else if (((m_Condition3 == 1u) && (K_Line_Set.K_Line_LID21 == 0x01u)) ||
             ((m_Condition4 == 1u) && (K_Line_Set.K_Line_LID22 == 0x01u)))
hu's avatar
hu committed
1325
    {
hu's avatar
hu committed
1326
        u8Result = FLASH_SYNC_2Hz;
hu's avatar
hu committed
1327
    }
hu's avatar
hu committed
1328 1329 1330 1331 1332 1333 1334
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1335
void LED_EVSC_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1336
{
hu's avatar
hu committed
1337
    if (led_status == 1)
hu's avatar
hu committed
1338
    {
1339
        IS31_CHIP0_CHANNEL19 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1340
        SEG_LED_EVSC_L(7);
hu's avatar
hu committed
1341 1342 1343
    }
    else
    {
hu's avatar
hu committed
1344
        IS31_CHIP0_CHANNEL19 = 0x00;
hu's avatar
hu committed
1345
        SEG_LED_EVSC_L(0);
hu's avatar
hu committed
1346 1347 1348
    }
}

hu's avatar
hu committed
1349
/******************************************************************************
hu's avatar
hu committed
1350
  L13 ECO STOP OFF
hu's avatar
hu committed
1351 1352 1353 1354 1355
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_eco_stop_OFF_L_Judgement(void)
hu's avatar
hu committed
1356 1357 1358
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1359
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1372
void LED_eco_stop_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1373
{
hu's avatar
hu committed
1374
    if (led_status == 1)
hu's avatar
hu committed
1375
    {
1376
        IS31_CHIP0_CHANNEL12 = LED_BRIGHTNESSG;  /* 绿灯 亮 */
hu's avatar
hu committed
1377
        IS31_CHIP0_CHANNEL13 = 0x00u;  /* 黄灯 灭 */
hu's avatar
hu committed
1378
    }
hu's avatar
hu committed
1379
    else if (led_status == 2)
hu's avatar
hu committed
1380
    {
hu's avatar
hu committed
1381
        IS31_CHIP0_CHANNEL12 = 0x00u;  /* 绿灯 灭 */
1382
        IS31_CHIP0_CHANNEL13 = LED_BRIGHTNESSY;  /* 黄灯 亮 */
hu's avatar
hu committed
1383 1384 1385
    }
    else
    {
hu's avatar
hu committed
1386 1387
        IS31_CHIP0_CHANNEL12 = 0x00u;  /* 绿灯 灭 */
        IS31_CHIP0_CHANNEL13 = 0x00u;  /* 黄灯 灭 */
hu's avatar
hu committed
1388 1389
    }

hu's avatar
hu committed
1390
    if ((led_status == 1) || (led_status == 2))
hu's avatar
hu committed
1391
    {
hu's avatar
hu committed
1392
        SEG_LED_eco_stop_OFF_L(7);
hu's avatar
hu committed
1393 1394 1395
    }
    else
    {
hu's avatar
hu committed
1396
        SEG_LED_eco_stop_OFF_L(0);
hu's avatar
hu committed
1397 1398 1399
    }
}

hu's avatar
hu committed
1400
/******************************************************************************
hu's avatar
hu committed
1401
  L14 AMT
hu's avatar
hu committed
1402
  信号接口:  无多包处理 /18EBFF03/18ECFF03  PGN:65226 DM1
hu's avatar
hu committed
1403 1404 1405 1406
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_AMT_L_Judgement(void)
hu's avatar
hu committed
1407 1408 1409 1410 1411
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
1412 1413 1414
    uint8_t m_Condition4 = 0u;
    uint8_t m_Condition5 = 0u;
    uint8_t m_Condition6 = 0u;
hu's avatar
hu committed
1415

hu's avatar
hu committed
1416 1417
    m_Condition1 = (uint8_t)Get_ID_18FECA03_Sig_Amber_Warning_Lamp_Status();
    m_Condition2 = (uint8_t)Get_ID_18FECA03_Sig_Malfunction_indicator_Lamp();
hu's avatar
hu committed
1418

hu's avatar
hu committed
1419
    if (K_Line_Set.K_Line_LID41 == 0x13u)
hu's avatar
hu committed
1420
    {
hu's avatar
hu committed
1421 1422 1423 1424 1425 1426 1427 1428
        if ((m_Condition1 == 1u) || (m_Condition2 == 1u))
        {
            u8Result = 1u;
        }
        else
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
1429 1430 1431 1432 1433 1434 1435 1436
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1437
void LED_AMT_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1438
{
hu's avatar
hu committed
1439
    if (K_Line_Set.K_Line_LID41 == 0x13u)
hu's avatar
hu committed
1440
    {
hu's avatar
hu committed
1441 1442
        if (led_status == 1)
        {
1443
            IS31_CHIP0_CHANNEL14 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1444 1445 1446 1447
            SEG_LED_AMT_L(7);
        }
        else
        {
hu's avatar
hu committed
1448
            IS31_CHIP0_CHANNEL14 = 0x00;
hu's avatar
hu committed
1449 1450
            SEG_LED_AMT_L(0);
        }
hu's avatar
hu committed
1451 1452 1453
    }
    else
    {
hu's avatar
hu committed
1454
        IS31_CHIP0_CHANNEL14 = 0x00u;
hu's avatar
hu committed
1455
        SEG_LED_AMT_L(0);
hu's avatar
hu committed
1456 1457 1458
    }
}

hu's avatar
hu committed
1459
/******************************************************************************
hu's avatar
hu committed
1460
  L15 WEAR IND
hu's avatar
hu committed
1461
  信号接口: B38 0V B40 0V
hu's avatar
hu committed
1462 1463 1464 1465
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_WEAR_IND_L_Judgement(void)
hu's avatar
hu committed
1466 1467 1468
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1469 1470
    uint8_t m_Condition2 = 0u;

hu's avatar
hu committed
1471
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_WEAR_IND);
hu's avatar
hu committed
1472
    m_Condition2 = (uint8_t)Line_In_Get_Status(LINE_IN_WEAR2);
hu's avatar
hu committed
1473

hu's avatar
hu committed
1474
    if ((m_Condition1 == 1u) || (m_Condition2 == 0x01u))
hu's avatar
hu committed
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1485
void LED_WEAR_IND_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1486 1487 1488
{
    if (led_status == 1)
    {
1489
        IS31_CHIP0_CHANNEL15 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1490
        SEG_LED_WEAR_IND_L(7);
hu's avatar
hu committed
1491 1492 1493
    }
    else
    {
hu's avatar
hu committed
1494
        IS31_CHIP0_CHANNEL15 = 0x00;
hu's avatar
hu committed
1495
        SEG_LED_WEAR_IND_L(0);
hu's avatar
hu committed
1496 1497 1498
    }
}

hu's avatar
hu committed
1499
/******************************************************************************
hu's avatar
hu committed
1500
 R1 PARK BRAKE
hu's avatar
hu committed
1501
 信号接口: A23 GND
hu's avatar
hu committed
1502 1503 1504 1505
 信号定义:
 输出信号:
******************************************************************************/
uint8_t LED_PARK_BRAKE_R_Judgement(void)
hu's avatar
hu committed
1506
{
hu's avatar
hu committed
1507 1508
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1509
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_PARK_BRAKE);
hu's avatar
hu committed
1510

hu's avatar
hu committed
1511
    if (m_Condition1 == 1u)
hu's avatar
hu committed
1512
    {
hu's avatar
hu committed
1513
        u8Result = 1u;
hu's avatar
hu committed
1514 1515 1516
    }
    else
    {
hu's avatar
hu committed
1517
        u8Result = 0u;
hu's avatar
hu committed
1518 1519
    }

hu's avatar
hu committed
1520 1521
    return u8Result;
}
hu's avatar
hu committed
1522
void LED_PARK_BRAKE_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1523 1524 1525
{
    if (led_status == 1)
    {
1526
        IS31_CHIP0_CHANNEL08 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1527
        SEG_LED_PARK_BRAKE_R(7);
hu's avatar
hu committed
1528 1529 1530
    }
    else
    {
hu's avatar
hu committed
1531
        IS31_CHIP0_CHANNEL08 = 0x00;
hu's avatar
hu committed
1532
        SEG_LED_PARK_BRAKE_R(0);
hu's avatar
hu committed
1533 1534 1535
    }
}

hu's avatar
hu committed
1536
/******************************************************************************
hu's avatar
hu committed
1537
  R2 BRAKE AIR/EBS
hu's avatar
hu committed
1538 1539 1540 1541
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1542
uint8_t LED_BRAKE_AIR_or_EBS_RED_R_Judgement(void)
hu's avatar
hu committed
1543 1544
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
1545
    uint8_t CanStatus = 0u;
hu's avatar
hu committed
1546
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1547
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
1548

hu's avatar
hu committed
1549 1550 1551
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_BRAKE_AIR_EBS);
    m_Condition3 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Red_Warning_Lamp_State();

hu's avatar
hu committed
1552 1553
    CanStatus = CAN_MSG_Status(ID_CanMsg18F0010B_Msg_Count);

hu's avatar
hu committed
1554
    if ((m_Condition1 == 0x01u) || (Common_Get_L12_Air_Sta() == 0x01u) ||
hu's avatar
hu committed
1555
            ((K_Line_Set.K_Line_LID21 == 0x01u) && ((m_Condition3 == 1u) || (CanStatus == CAN_SIG_LOST))))
hu's avatar
hu committed
1556
    {
hu's avatar
hu committed
1557
        u8Result = 1u;
hu's avatar
hu committed
1558 1559 1560 1561 1562 1563 1564 1565
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1566
void LED_BRAKE_AIR_or_EBS_RED_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1567
{
hu's avatar
hu committed
1568
    BRAKE_AIR_EBS_LED_MCU = led_status;
hu's avatar
hu committed
1569 1570 1571

    if (led_status == 1)
    {
hu's avatar
hu committed
1572
        SEG_LED_BRAKE_AIR_or_EBS_RED_R(7);
hu's avatar
hu committed
1573 1574 1575
    }
    else
    {
hu's avatar
hu committed
1576
        SEG_LED_BRAKE_AIR_or_EBS_RED_R(0);
hu's avatar
hu committed
1577 1578 1579
    }
}

hu's avatar
hu committed
1580
/******************************************************************************
hu's avatar
hu committed
1581
  R3 BRAKE LOCK
hu's avatar
hu committed
1582 1583
  信号接口:
  信号定义:
hu's avatar
hu committed
1584
  输出信号:
hu's avatar
hu committed
1585
 ******************************************************************************/
hu's avatar
hu committed
1586
uint8_t LED_BRAKE_LOCK_R_Judgement(void)
hu's avatar
hu committed
1587 1588 1589
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1590

hu's avatar
hu committed
1591
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1604
void LED_BRAKE_LOCK_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1605
{
hu's avatar
hu committed
1606 1607
    if (led_status == 1)
    {
1608
        IS31_CHIP0_CHANNEL07 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1609
        SEG_LED_BRAKE_LOCK_R(7);
hu's avatar
hu committed
1610 1611 1612
    }
    else
    {
hu's avatar
hu committed
1613
        IS31_CHIP0_CHANNEL07 = 0x00;
hu's avatar
hu committed
1614
        SEG_LED_BRAKE_LOCK_R(0);
hu's avatar
hu committed
1615 1616
    }
}
hu's avatar
hu committed
1617

hu's avatar
hu committed
1618
/******************************************************************************
hu's avatar
hu committed
1619
  R4 AIR SUS
hu's avatar
hu committed
1620 1621 1622 1623
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1624
uint8_t LED_AIR_SUS_R_Judgement(void)
hu's avatar
hu committed
1625 1626 1627
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1628

hu's avatar
hu committed
1629
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_AIR_SUS);
hu's avatar
hu committed
1630

hu's avatar
hu committed
1631
    if (m_Condition1 == 1u)
hu's avatar
hu committed
1632 1633 1634 1635 1636 1637 1638
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }
hu's avatar
hu committed
1639

hu's avatar
hu committed
1640 1641
    return u8Result;
}
hu's avatar
hu committed
1642
void LED_AIR_SUS_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1643
{
hu's avatar
hu committed
1644 1645
    if (led_status == 1)
    {
1646
        IS31_CHIP0_CHANNEL06 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1647
        SEG_LED_AIR_SUS_R(7);
hu's avatar
hu committed
1648 1649 1650
    }
    else
    {
hu's avatar
hu committed
1651
        IS31_CHIP0_CHANNEL06 = 0x00;
hu's avatar
hu committed
1652
        SEG_LED_AIR_SUS_R(0);
hu's avatar
hu committed
1653 1654 1655
    }
}

hu's avatar
hu committed
1656
/******************************************************************************
hu's avatar
hu committed
1657 1658 1659 1660 1661 1662
  R5 TRAILER BRAKE
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_TRAILER_BRAKE_R_Judgement(void)
hu's avatar
hu committed
1663 1664 1665
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1666

hu's avatar
hu committed
1667
    /*m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_TRAILER_BRAKE);*/
hu's avatar
hu committed
1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1680
void LED_TRAILER_BRAKE_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1681 1682 1683
{
    if (led_status == 1)
    {
1684
        IS31_CHIP0_CHANNEL10 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1685
        SEG_LED_TRAILER_BRAKE_R(7);
hu's avatar
hu committed
1686 1687 1688
    }
    else
    {
hu's avatar
hu committed
1689
        IS31_CHIP0_CHANNEL10 = 0x00;
hu's avatar
hu committed
1690
        SEG_LED_TRAILER_BRAKE_R(0);
hu's avatar
hu committed
1691 1692 1693
    }
}

hu's avatar
hu committed
1694
/******************************************************************************
hu's avatar
hu committed
1695
  R6 BRAKE AIR/EBS
hu's avatar
hu committed
1696 1697 1698 1699
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1700
uint8_t LED_BRAKE_AIR_or_EBS_YELLOW_R_Judgement(void)
hu's avatar
hu committed
1701 1702 1703
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1704 1705

    //m_Condition1 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Amber_Warning_State();
hu's avatar
hu committed
1706

hu's avatar
hu committed
1707
    if (m_Condition1 == 1u)
hu's avatar
hu committed
1708
    {
hu's avatar
hu committed
1709
        u8Result = 0u;
hu's avatar
hu committed
1710 1711 1712 1713 1714 1715 1716 1717
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1718
void LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1719
{
hu's avatar
hu committed
1720 1721
    if (led_status == 1)
    {
1722
        IS31_CHIP0_CHANNEL09 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1723
        SEG_LED_BRAKE_AIR_or_EBS_YELLOW_R(7);
hu's avatar
hu committed
1724 1725 1726
    }
    else
    {
hu's avatar
hu committed
1727
        IS31_CHIP0_CHANNEL09 = 0x00;
hu's avatar
hu committed
1728
        SEG_LED_BRAKE_AIR_or_EBS_YELLOW_R(0);
hu's avatar
hu committed
1729 1730 1731
    }
}

hu's avatar
hu committed
1732
/******************************************************************************
hu's avatar
hu committed
1733
  R7  ACC AIR
hu's avatar
hu committed
1734 1735
  信号接口:
  信号定义:
hu's avatar
hu committed
1736
  输出信号: R6_LED_OUT
hu's avatar
hu committed
1737
 ******************************************************************************/
hu's avatar
hu committed
1738
uint8_t LED_ACC_AIR_R_Judgement(void)
hu's avatar
hu committed
1739 1740 1741
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1742

hu's avatar
hu committed
1743
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_ACC_AIR);
hu's avatar
hu committed
1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1756 1757

void LED_ACC_AIR_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1758
{
hu's avatar
hu committed
1759
    R6_LED_OUT = led_status;
hu's avatar
hu committed
1760 1761 1762

    if (led_status == 1)
    {
hu's avatar
hu committed
1763
        SEG_LED_ACC_AIR_R(7);
hu's avatar
hu committed
1764 1765 1766
    }
    else
    {
hu's avatar
hu committed
1767
        SEG_LED_ACC_AIR_R(0);
hu's avatar
hu committed
1768 1769
    }
}
hu's avatar
hu committed
1770
/******************************************************************************
hu's avatar
hu committed
1771
  R8 ABS
hu's avatar
hu committed
1772 1773 1774 1775
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1776
uint8_t LED_ABS_R_Judgement(void)
hu's avatar
hu committed
1777 1778
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
1779
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1780
    uint8_t m_Condition2 = 0u;
hu's avatar
hu committed
1781
    uint8_t CanStatus1 = 0u;
hu's avatar
hu committed
1782

hu's avatar
hu committed
1783 1784
    m_Condition2 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Amber_Warning_State();
    CanStatus1 = CAN_MSG_Status(ID_CanMsg18F0010B_Msg_Count);
hu's avatar
hu committed
1785
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_ABS);
hu's avatar
hu committed
1786

hu's avatar
hu committed
1787 1788
    if ((((CanStatus1 == CAN_SIG_LOST) || (m_Condition2 == 1u)) && (K_Line_Set.K_Line_LID21 == 0x01u)) ||
            (m_Condition1 == 1u) && (K_Line_Set.K_Line_LID21 == 0x03u))
hu's avatar
hu committed
1789
    {
hu's avatar
hu committed
1790
        u8Result = 1u;
hu's avatar
hu committed
1791 1792 1793 1794 1795 1796 1797 1798
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1799
void LED_ABS_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1800
{
hu's avatar
hu committed
1801
    ABS_LED_MCU_OUT = led_status;
hu's avatar
hu committed
1802

hu's avatar
hu committed
1803 1804 1805
    if (led_status == 1)
    {
        SEG_LED_ABS_R(7);
hu's avatar
hu committed
1806 1807 1808
    }
    else
    {
hu's avatar
hu committed
1809
        SEG_LED_ABS_R(0);
hu's avatar
hu committed
1810 1811 1812
    }
}

hu's avatar
hu committed
1813 1814 1815 1816 1817 1818 1819 1820 1821 1822
/******************************************************************************
U2 TRAILER ABS
  信号接口:
  信号定义:
  输出信号:U2_LED_OUT
 ******************************************************************************/
uint8_t LED_TRAILER_ABS_U_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1823

hu's avatar
hu committed
1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_TRAILER_ABS);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}

void LED_TRAILER_ABS_U_Execution(uint8_t led_status)
{
hu's avatar
hu committed
1840
    TRAILER_ABS_LED_MCU_OUT = led_status;
hu's avatar
hu committed
1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861

    if (led_status == 1)
    {
        SEG_LED_TRAILER_ABS_U(7);
    }
    else
    {
        SEG_LED_TRAILER_ABS_U(0);
    }
}

/******************************************************************************
U3 WORKING LAMP
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_WORKING_LAMP_U_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1862

hu's avatar
hu committed
1863 1864 1865 1866 1867 1868 1869 1870 1871 1872
    m_Condition1 = (uint8_t)XXXX;

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }
hu's avatar
hu committed
1873

hu's avatar
hu committed
1874 1875
    return u8Result;
}
hu's avatar
hu committed
1876 1877 1878 1879
void LED_WORKING_LAMP_U_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1880
        IS31_CHIP0_CHANNEL11 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1881 1882 1883 1884
        SEG_LED_WORKING_LAMP_U(7);
    }
    else
    {
hu's avatar
hu committed
1885
        IS31_CHIP0_CHANNEL11 = 0x00;
hu's avatar
hu committed
1886 1887 1888 1889
        SEG_LED_WORKING_LAMP_U(0);
    }
}

hu's avatar
hu committed
1890 1891 1892 1893 1894 1895 1896 1897 1898 1899
/******************************************************************************
U6 TRAILE ABS INFO
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_TRAILER_ABS_INFO_U_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1900

hu's avatar
hu committed
1901 1902
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_TRAILER_ABS_INFO);

hu's avatar
hu committed
1903
    if (m_Condition1 == 0x01u)
hu's avatar
hu committed
1904 1905 1906 1907 1908 1909 1910 1911 1912 1913
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1914 1915 1916 1917
void LED_TRAILER_ABS_INFO_U_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1918
        IS31_CHIP0_CHANNEL05 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1919 1920 1921 1922
        SEG_LED_TRAILER_ABS_INFO_U(7);
    }
    else
    {
hu's avatar
hu committed
1923
        IS31_CHIP0_CHANNEL05 = 0x00;
hu's avatar
hu committed
1924 1925
        SEG_LED_TRAILER_ABS_INFO_U(0);
    }
hu's avatar
hu committed
1926 1927 1928 1929 1930 1931 1932 1933 1934 1935
}

/******************************************************************************
Temp
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Temp_Judgement(void)
{
1936
    static uint8_t u8Result = 0u;
hu's avatar
hu committed
1937 1938
    uint8_t m_Condition1 = 0u;

1939 1940 1941
    m_Condition1 = Coolant_Get_CurSeg();

    if (K_Line_Set.K_Line_LID43 == 0x82u)
hu's avatar
hu committed
1942
    {
1943 1944 1945 1946 1947 1948 1949 1950
        if ((m_Condition1 >= 12u) &&  (Coolant_Get_Valid() == 1u))
        {
            u8Result = 1u;
        }
        else if (m_Condition1 <= 9u)
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
1951 1952 1953 1954 1955 1956 1957 1958 1959 1960
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
void LED_Temp_Execution(uint8_t led_status)
{
1961 1962 1963 1964 1965
    COMMON_PowerStatus_t u8IG_st;

    u8IG_st = Common_Get_IG_Sts();

    if (u8IG_st == COMMON_POWER_ON)
hu's avatar
hu committed
1966
    {
1967 1968 1969 1970 1971
        if ((led_status == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
        {
            //TimerB_PWM_Channel_Duty_Set(TIMERB_2_CH7 , testBG );//水温格白色
            TEMP_R_LED_OUT = 1u ;/*水温红灯*/
            Water_Temp_Led_R_MCU_OUT = 0u;
hu's avatar
hu committed
1972

1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983
            TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯
            Water_Temp_Led_W_MCU_OUT = 1u;
        }
        else
        {
            TEMP_R_LED_OUT = 0u ;/*水温红灯*/
            Water_Temp_Led_R_MCU_OUT = 0u;

            TEMP_W_LED_OUT = 1u ;//水温字符白色指示灯
            Water_Temp_Led_W_MCU_OUT = 1u;
        }
hu's avatar
hu committed
1984 1985 1986 1987 1988 1989
    }
    else
    {
        TEMP_R_LED_OUT = 0u ;/*水温红灯*/
        Water_Temp_Led_R_MCU_OUT = 0u;

1990 1991
        TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯
        Water_Temp_Led_W_MCU_OUT = 0u;
hu's avatar
hu committed
1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003
    }
}

/******************************************************************************
Fuel
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Fuel_Judgement(void)
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
2004 2005 2006
    uint8_t variable_1 = 0x00u;
    uint8_t variable_2 = 0x00u;
    uint16_t variable_5 = 0x00u;
hu's avatar
hu committed
2007

hu's avatar
hu committed
2008 2009 2010 2011 2012
    variable_1 = Fuel_Get_CurSeg();/*格*/
    variable_2 = GetFuelSensorState();/*燃油状态*/
    variable_5 = GetFuelResistance(); /*采集的阻值*/

    if ((variable_1 <= 1 ) && (variable_2 == FuelSensorNormal) && (variable_5 != 65535) && (K_Line_Set.K_Line_LID43 == 0x82u))
hu's avatar
hu committed
2013 2014 2015 2016 2017 2018 2019 2020
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

hu's avatar
hu committed
2021

hu's avatar
hu committed
2022 2023 2024 2025
    return u8Result;
}
void LED_Fuel_Execution(uint8_t led_status)
{
2026
    COMMON_PowerStatus_t u8IG_st;
hu's avatar
hu committed
2027

2028 2029 2030
    u8IG_st = Common_Get_IG_Sts();

    if (u8IG_st == COMMON_POWER_ON)
hu's avatar
hu committed
2031
    {
hu's avatar
hu committed
2032
        if ((led_status == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
2033
        {
hu's avatar
hu committed
2034 2035
            FUEL_LED_Y_MCU = 1u ;
            FUEL_W_LED_OUT = 0u ;
2036 2037 2038
        }
        else
        {
hu's avatar
hu committed
2039 2040
            FUEL_LED_Y_MCU = 0u ;
            FUEL_W_LED_OUT = 1u ;
2041
        }
hu's avatar
hu committed
2042 2043 2044
    }
    else
    {
hu's avatar
hu committed
2045 2046
        FUEL_LED_Y_MCU = 0u ;
        FUEL_W_LED_OUT = 0u ;
hu's avatar
hu committed
2047
    }
hu's avatar
hu committed
2048 2049 2050
}

/******************************************************************************
2051
Common_Get_L12_Air_Sta
hu's avatar
hu committed
2052 2053 2054 2055 2056 2057 2058
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t Common_Get_L12_Air_Sta(void)
{
    return L12_Air_Sta ;
hu's avatar
hu committed
2059
}