Telltales_user.c 59.9 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"
19
#include "Common_Interface.h"
hu's avatar
hu committed
20

hu's avatar
hu committed
21
static uint8_t L12_Air_Sta ;
hu's avatar
hu committed
22 23 24 25 26 27

TelltaleLRCtrlStruct TelltaleLRCtrl;

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

/*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
78 79

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

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

测试用

**************************************/
void Test_LED_AllLight(void)
{
hu's avatar
hu committed
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
    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);
hu's avatar
hu committed
115
        //LED_RR_DIFF_LOCK_L_Execution(LED_ON_State);
hu's avatar
hu committed
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 178
        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);
    }
179 180 181 182 183 184 185 186
}

/*---------------------------------------------------------------------------*/
#define XXXX  0u
#define LED_BRIGHTNESSR 0x3Fu
#define LED_BRIGHTNESSG 0x3Fu
#define LED_BRIGHTNESSY 0x3Fu
#define LED_BRIGHTNESSB 0x3Fu
187 188 189

#define LED_BRIGHTNESSGBL 0x08u
#define LED_BRIGHTNESSBBL 0x08u
hu's avatar
hu committed
190
/******************************************************************************
hu's avatar
hu committed
191
  T3 L16 U1 U4 U5无灯   左右转向单独 气压1 气压2 指示灯是背光
192 193 194 195
  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
196
 ******************************************************************************/
hu's avatar
hu committed
197

198

hu's avatar
hu committed
199 200 201 202
/******************************************************************************
  T0 左转向   T13 右转向
  信号接口:
  信号定义:
hu's avatar
hu committed
203
  输出信号:
hu's avatar
hu committed
204
 ******************************************************************************/
hu's avatar
hu committed
205 206 207 208 209 210 211 212 213 214 215 216 217 218
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);//左转向断码屏开
219
        IS31_CHIP0_CHANNEL36 = LED_BRIGHTNESSG;
hu's avatar
hu committed
220 221 222 223 224 225
    }
    else
    {
        SEG_LED_TURN_LEFT(0);
        IS31_CHIP0_CHANNEL36 = 0x00u;
    }
226
    if (TelltaleLRCtrl.LastLeft != LEFT_ST)
hu's avatar
hu committed
227 228 229 230 231 232 233 234
    {
        TelltaleLRCtrl.LastLeft = LEFT_ST;
        Edge = LEFT_ST;
    }

    if (RIGHT_ST == 1u)//右转向
    {
        SEG_LED_TURN_RIGHT(7);//右转向断码屏开
235
        IS31_CHIP0_CHANNEL24 = LED_BRIGHTNESSG;
hu's avatar
hu committed
236 237 238 239 240 241 242 243 244 245 246 247 248
    }
    else
    {
        SEG_LED_TURN_RIGHT(0);
        IS31_CHIP0_CHANNEL24 = 0x00u;
    }

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

249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
//    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
274 275
}

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

hu's avatar
hu committed
283 284 285 286 287 288 289 290 291 292 293
        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
294
}
hu's avatar
hu committed
295

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

    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_RR_DIFF_LOCK);
hu's avatar
hu committed
308 309 310 311 312 313 314 315 316 317 318 319

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

    return u8Result;
}
320 321
void LED_INTER_DIFF_LOCK_T_Execution(uint8_t led_status)
{
hu's avatar
hu committed
322
    RR_DIFF_LOCK_MCU = led_status;
323 324 325 326 327 328 329 330 331 332 333 334

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

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

hu's avatar
hu committed
345
    m_Condition1 = (uint8_t)XXXX;
346 347 348 349 350 351 352 353 354 355 356 357

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

    return u8Result;
}
hu's avatar
hu committed
358
void LED_FOUR_MUL_FOUR_T_Execution(uint8_t led_status)
359
{
hu's avatar
hu committed
360 361
    if (led_status == 1)
    {
362 363 364 365 366 367 368 369
        if (Line_In_Get_Status(LINE_IN_ILLUMINATION))
        {
            IS31_CHIP0_CHANNEL35 = LED_BRIGHTNESSGBL;
        }
        else
        {
            IS31_CHIP0_CHANNEL35 = LED_BRIGHTNESSG;
        }
hu's avatar
hu committed
370
        SEG_LED_FOUR_MUL_FOUR_T(7);
371 372 373
    }
    else
    {
hu's avatar
hu committed
374
        IS31_CHIP0_CHANNEL35 = 0x00;
hu's avatar
hu committed
375
        SEG_LED_FOUR_MUL_FOUR_T(0);
376 377 378 379
    }
}

/******************************************************************************
hu's avatar
hu committed
380
  T4 EXH BRAKE
hu's avatar
hu committed
381
  信号接口: 0x18FF2300 Byte:2,bit:2-1==01(B)  功能调整----2022.05.10----
382
  信号定义:
hu's avatar
hu committed
383
  输出信号:
384
 ******************************************************************************/
hu's avatar
hu committed
385 386 387 388
uint8_t LED_EXH_BRAKE_T_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
389

hu's avatar
hu committed
390
    m_Condition1 = (uint8_t)Get_ID_18FF2300_Sig_Exh_Lamp();
391

hu's avatar
hu committed
392 393

    if (m_Condition1 == 0x01u)
hu's avatar
hu committed
394 395 396 397 398 399 400
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }
401

hu's avatar
hu committed
402 403 404 405 406 407
    return u8Result;
}
void LED_EXH_BRAKE_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
408 409 410 411 412 413 414 415
        if (Line_In_Get_Status(LINE_IN_ILLUMINATION))
        {
            IS31_CHIP0_CHANNEL34 = LED_BRIGHTNESSGBL;
        }
        else
        {
            IS31_CHIP0_CHANNEL34 = LED_BRIGHTNESSG;
        }
hu's avatar
hu committed
416 417 418 419
        SEG_LED_EXH_BRAKE_T(7);
    }
    else
    {
hu's avatar
hu committed
420
        IS31_CHIP0_CHANNEL34 = 0x00;
hu's avatar
hu committed
421 422 423
        SEG_LED_EXH_BRAKE_T(0);
    }
}
424 425

/******************************************************************************
hu's avatar
hu committed
426
  T5 QOS(GLOW)
hu's avatar
hu committed
427
  信号接口: 0x18FF2300 Byte:2,bit:6-5==01(B)
428
  信号定义:
hu's avatar
hu committed
429
  输出信号:
430
 ******************************************************************************/
hu's avatar
hu committed
431
uint8_t LED_QOS_GLOW_T_Judgement(void)
432 433 434
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
435

hu's avatar
hu committed
436
    m_Condition1 = (uint8_t)Get_ID_18FF2300_Sig_Glow_Lamp();
437 438 439 440 441 442 443 444 445 446 447 448

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

    return u8Result;
}
hu's avatar
hu committed
449
void LED_QOS_GLOW_T_Execution(uint8_t led_status)
450
{
hu's avatar
hu committed
451 452
    if (led_status == 1)
    {
453
        IS31_CHIP0_CHANNEL33 = LED_BRIGHTNESSY;
hu's avatar
hu committed
454
        SEG_LED_QOS_GLOW_T(7);
455 456 457
    }
    else
    {
hu's avatar
hu committed
458
        IS31_CHIP0_CHANNEL33 = 0x00;
hu's avatar
hu committed
459
        SEG_LED_QOS_GLOW_T(0);
460 461 462
    }
}
/******************************************************************************
hu's avatar
hu committed
463
  T6 HI BEAM
hu's avatar
hu committed
464
  信号接口: A25  HIGH
465 466 467
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
468
uint8_t LED_HI_BEAM_T_Judgement(void)
hu's avatar
hu committed
469 470 471
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
472

hu's avatar
hu committed
473
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_HI_BEAM);
hu's avatar
hu committed
474 475 476 477 478 479 480 481 482 483 484 485

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

    return u8Result;
}
hu's avatar
hu committed
486 487 488 489
void LED_HI_BEAM_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
490 491 492 493 494 495 496 497
        if (Line_In_Get_Status(LINE_IN_ILLUMINATION))
        {
            IS31_CHIP0_CHANNEL32 = LED_BRIGHTNESSBBL;
        }
        else
        {
            IS31_CHIP0_CHANNEL32 = LED_BRIGHTNESSB;
        }
hu's avatar
hu committed
498 499 500 501
        SEG_LED_HI_BEAM_T(7);
    }
    else
    {
hu's avatar
hu committed
502
        IS31_CHIP0_CHANNEL32 = 0x00;
hu's avatar
hu committed
503 504 505
        SEG_LED_HI_BEAM_T(0);
    }
}
hu's avatar
hu committed
506

hu's avatar
hu committed
507 508
/******************************************************************************
  T7 Rr FOG LAMP
hu's avatar
hu committed
509
  信号接口: B14 HIGH
hu's avatar
hu committed
510 511 512 513
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Rr_FOG_LAMP_T_Judgement(void)
hu's avatar
hu committed
514 515 516
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
517

hu's avatar
hu committed
518
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_Rr_FOG_LAMP);
hu's avatar
hu committed
519

hu's avatar
hu committed
520
    if (m_Condition1 == 1u)
hu's avatar
hu committed
521 522 523 524 525 526 527 528 529 530
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
531 532 533
void LED_Rr_FOG_LAMP_T_Execution(uint8_t led_status)
{
    T7_LED_OUT = led_status;
hu's avatar
hu committed
534

hu's avatar
hu committed
535 536 537 538 539 540 541 542 543 544 545 546
    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
547
  信号接口: A31  GND   2022-05-10
hu's avatar
hu committed
548 549 550 551
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_MIL_T_Judgement(void)
hu's avatar
hu committed
552 553 554
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
555

hu's avatar
hu committed
556
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_MIL);
hu's avatar
hu committed
557 558 559

    if (m_Condition1 == 1u)
    {
hu's avatar
hu committed
560
        u8Result = 1u;
hu's avatar
hu committed
561 562 563
    }
    else
    {
hu's avatar
hu committed
564
        u8Result = 0u;
hu's avatar
hu committed
565 566 567 568
    }

    return u8Result;
}
hu's avatar
hu committed
569 570 571 572
void LED_MIL_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
573
        IS31_CHIP0_CHANNEL31 = LED_BRIGHTNESSY;
hu's avatar
hu committed
574 575 576 577
        SEG_LED_MIL_T(7);
    }
    else
    {
hu's avatar
hu committed
578
        IS31_CHIP0_CHANNEL31 = 0x00;
hu's avatar
hu committed
579 580 581
        SEG_LED_MIL_T(0);
    }
}
hu's avatar
hu committed
582

hu's avatar
hu committed
583 584
/******************************************************************************
  T9 SVS
hu's avatar
hu committed
585
  信号接口: 0x18FED900 Byte:5,bit:8-7==01(B)
hu's avatar
hu committed
586 587 588 589
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_SVS_T_Judgement(void)
hu's avatar
hu committed
590 591 592
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
593

hu's avatar
hu committed
594
    m_Condition1 = (uint8_t)Get_ID_18FED900_Sig_SVS_Lamp_Status();
hu's avatar
hu committed
595 596 597 598 599 600 601 602 603 604 605 606

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

    return u8Result;
}
hu's avatar
hu committed
607 608 609 610
void LED_SVS_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
611
        IS31_CHIP0_CHANNEL30 = LED_BRIGHTNESSY;
hu's avatar
hu committed
612 613 614 615
        SEG_LED_SVS_T(7);
    }
    else
    {
hu's avatar
hu committed
616
        IS31_CHIP0_CHANNEL30 = 0x00;
hu's avatar
hu committed
617 618 619
        SEG_LED_SVS_T(0);
    }
}
hu's avatar
hu committed
620

hu's avatar
hu committed
621 622 623 624 625 626 627
/******************************************************************************
  T10 H.S.A
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_H_S_A_T_Judgement(void)
hu's avatar
hu committed
628 629 630
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
631
    uint8_t m_Condition2 = 0u;
632

633
    /*禅道4885*/
hu's avatar
hu committed
634
    m_Condition1 = Get_ID_18FDC40B_Sig_HSAYellow_Sta();
635
    m_Condition2 = Get_ID_18F0010B_Sig_HSAGreen();
hu's avatar
hu committed
636 637 638

    if (m_Condition1 == 1u)
    {
hu's avatar
hu committed
639
        u8Result = 2u;
hu's avatar
hu committed
640
    }
641 642
    else if (m_Condition1 == 2u)
    {
hu's avatar
hu committed
643 644 645 646 647
        u8Result = FLASH_SYNC_2Hz;
    }
    else if (m_Condition2 == 1u)
    {
        u8Result = 3u;
648
    }
hu's avatar
hu committed
649 650 651 652 653 654 655
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
656 657
void LED_H_S_A_T_Execution(uint8_t led_status)
{
658
    if (led_status == 1u)
hu's avatar
hu committed
659
    {
hu's avatar
hu committed
660 661
        IS31_CHIP0_CHANNEL29 = LED_BRIGHTNESSY;  /*黄灯 闪烁*/
        IS31_CHIP0_CHANNEL28 = 0x00u;
hu's avatar
hu committed
662
    }
663
    else if (led_status == 2u)
hu's avatar
hu committed
664 665 666 667 668
    {
        IS31_CHIP0_CHANNEL29 = LED_BRIGHTNESSY;    /*黄灯 亮*/
        IS31_CHIP0_CHANNEL28 = 0x00;  /*绿灯 灭*/
    }
    else if (led_status == 3u)
hu's avatar
hu committed
669
    {
670 671 672 673 674 675 676 677
        if (Line_In_Get_Status(LINE_IN_ILLUMINATION))
        {
            IS31_CHIP0_CHANNEL28 = LED_BRIGHTNESSGBL;    /*绿灯 亮*/
        }
        else
        {
            IS31_CHIP0_CHANNEL28 = LED_BRIGHTNESSG;    /*绿灯 亮*/
        }
hu's avatar
hu committed
678
        IS31_CHIP0_CHANNEL29 = 0x00u;  /*黄灯 灭*/
hu's avatar
hu committed
679 680 681
    }
    else
    {
hu's avatar
hu committed
682 683
        IS31_CHIP0_CHANNEL28 = 0x00;  /*绿灯 灭*/
        IS31_CHIP0_CHANNEL29 = 0x00;  /*黄灯 灭*/
hu's avatar
hu committed
684
    }
hu's avatar
hu committed
685

hu's avatar
hu committed
686
    if (led_status != 0x00u)
hu's avatar
hu committed
687 688 689 690 691 692 693 694
    {
        SEG_LED_H_S_A_T(7);
    }
    else
    {
        SEG_LED_H_S_A_T(0);
    }
}
hu's avatar
hu committed
695

hu's avatar
hu committed
696 697
/******************************************************************************
  T11 RETARDER
hu's avatar
hu committed
698
  信号接口: 0x18FF5510 Byte:1,bit:1==01(B) 绿    ----  0x18FF5510  Byte1,Bit1 Byte:1,bit:1==10(B)  黄闪
hu's avatar
hu committed
699
  信号定义: 2022-02-09 取消EOL配置条件
hu's avatar
hu committed
700 701 702
  输出信号:
 ******************************************************************************/
uint8_t LED_RETARDER_T_Judgement(void)
hu's avatar
hu committed
703 704 705
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
706 707

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

hu's avatar
hu committed
709
    if (m_Condition1 == 2u)
hu's avatar
hu committed
710
    {
hu's avatar
hu committed
711
        u8Result = FLASH_SYNC_1Hz;
hu's avatar
hu committed
712
    }
hu's avatar
hu committed
713
    else if (m_Condition1 == 1u)
hu's avatar
hu committed
714
    {
hu's avatar
hu committed
715
        u8Result = 2u;
hu's avatar
hu committed
716 717 718 719
    }

    return u8Result;
}
720

hu's avatar
hu committed
721 722
void LED_RETARDER_T_Execution(uint8_t led_status)
{
hu's avatar
hu committed
723
    if (led_status == 1u)
hu's avatar
hu committed
724
    {
hu's avatar
hu committed
725 726 727 728 729
        IS31_CHIP0_CHANNEL27 = 0x00u; /* 绿灯 灭 */
        IS31_CHIP0_CHANNEL26 = 0xFFu;//LED_BRIGHTNESSY; /* 黄灯 亮 闪 */
    }
    else if (led_status == 2u)
    {
730 731 732 733 734 735 736 737
        if (Line_In_Get_Status(LINE_IN_ILLUMINATION))
        {
            IS31_CHIP0_CHANNEL27 = LED_BRIGHTNESSGBL; /* 绿灯 亮 */
        }
        else
        {
            IS31_CHIP0_CHANNEL27 = LED_BRIGHTNESSG; /* 绿灯 亮 */
        }
hu's avatar
hu committed
738 739 740 741 742 743 744
        IS31_CHIP0_CHANNEL26 = 0x00u; /* 黄灯 灭 */
    }
    else
    {
        IS31_CHIP0_CHANNEL27 = 0x00u; /* 绿灯 灭 */
        IS31_CHIP0_CHANNEL26 = 0x00u; /* 黄灯 灭 */
    }
hu's avatar
hu committed
745

hu's avatar
hu committed
746 747 748
    if (led_status != 0x00u)
    {
        SEG_LED_RETARDER_T(7);
hu's avatar
hu committed
749 750 751 752 753 754 755 756 757 758 759 760 761 762
    }
    else
    {
        SEG_LED_RETARDER_T(0);
    }
}

/******************************************************************************
  T12 AUTO LEVELING
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_AUTO_LEVELING_T_Judgement(void)
hu's avatar
hu committed
763 764 765
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
766

hu's avatar
hu committed
767
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
768 769 770 771 772 773 774 775 776 777 778 779 780

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

    return u8Result;
}

hu's avatar
hu committed
781 782 783 784
void LED_AUTO_LEVELING_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
785
        IS31_CHIP0_CHANNEL25 = LED_BRIGHTNESSY;
hu's avatar
hu committed
786 787 788 789
        SEG_LED_AUTO_LEVELING_T(7);
    }
    else
    {
hu's avatar
hu committed
790
        IS31_CHIP0_CHANNEL25 = 0x00;
hu's avatar
hu committed
791 792 793 794 795
        SEG_LED_AUTO_LEVELING_T(0);
    }
}

/******************************************************************************
hu's avatar
hu committed
796
  L1 ROWS
hu's avatar
hu committed
797 798 799 800
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
801
uint8_t LED_ROWS_L_Judgement(void)
hu's avatar
hu committed
802 803 804
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
805

hu's avatar
hu committed
806
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
807 808 809 810 811 812 813 814 815 816 817 818

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

    return u8Result;
}
hu's avatar
hu committed
819
void LED_ROWS_L_Execution(uint8_t led_status)
hu's avatar
hu committed
820
{
hu's avatar
hu committed
821 822
    if (led_status == 1)
    {
823
        IS31_CHIP0_CHANNEL01 = LED_BRIGHTNESSY;
hu's avatar
hu committed
824
        SEG_LED_ROWS_L(7);
hu's avatar
hu committed
825
    }
hu's avatar
hu committed
826
    else
hu's avatar
hu committed
827
    {
hu's avatar
hu committed
828
        IS31_CHIP0_CHANNEL01 = 0x00;
hu's avatar
hu committed
829
        SEG_LED_ROWS_L(0);
hu's avatar
hu committed
830 831 832 833
    }
}

/******************************************************************************
hu's avatar
hu committed
834
  L2 BSM OFF
hu's avatar
hu committed
835 836 837 838
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
839
uint8_t LED_BSM_OFF_L_Judgement(void)
hu's avatar
hu committed
840 841 842
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
843

hu's avatar
hu committed
844
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
845 846 847 848

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
hu's avatar
hu committed
849 850 851 852 853
    }
    else
    {
        u8Result = 0u;
    }
854

hu's avatar
hu committed
855 856
    return u8Result;
}
hu's avatar
hu committed
857
void LED_BSM_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
858
{
hu's avatar
hu committed
859 860
    if (led_status == 1)
    {
861
        IS31_CHIP0_CHANNEL02 = LED_BRIGHTNESSY;
hu's avatar
hu committed
862
        SEG_LED_BSM_OFF_L(7);
hu's avatar
hu committed
863 864 865
    }
    else
    {
hu's avatar
hu committed
866
        IS31_CHIP0_CHANNEL02 = 0x00;
hu's avatar
hu committed
867
        SEG_LED_BSM_OFF_L(0);
hu's avatar
hu committed
868 869 870
    }
}

hu's avatar
hu committed
871
/******************************************************************************
hu's avatar
hu committed
872
  L3 AEBS OFF
hu's avatar
hu committed
873 874 875 876
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
877
uint8_t LED_AEBS_OFF_L_Judgement(void)
hu's avatar
hu committed
878 879 880
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
881 882
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
883 884 885 886 887 888
    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
889

hu's avatar
hu committed
890 891 892 893
    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
894 895 896 897 898 899 900 901
    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
902
    if (K_Line_Set.K_Line_LID28 == 0x01u)
hu's avatar
hu committed
903
    {
hu's avatar
hu committed
904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919
        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
920
    }
hu's avatar
hu committed
921 922 923 924 925 926 927
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
928
void LED_AEBS_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
929
{
hu's avatar
hu committed
930
    if (K_Line_Set.K_Line_LID28 == 0x01u)
hu's avatar
hu committed
931
    {
hu's avatar
hu committed
932 933 934 935 936 937 938 939 940 941
        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
942 943 944
    }
    else
    {
hu's avatar
hu committed
945
        IS31_CHIP0_CHANNEL03 = 0x00;
hu's avatar
hu committed
946 947
        SEG_LED_AEBS_OFF_L(0);
    }
hu's avatar
hu committed
948 949
}

hu's avatar
hu committed
950
/******************************************************************************
hu's avatar
hu committed
951
  L4 LDWS
hu's avatar
hu committed
952 953 954 955 956
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_LDWS_L_Judgement(void)
hu's avatar
hu committed
957 958 959 960
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    uint8_t m_Condition2 = 0u;
hu's avatar
hu committed
961 962
    uint8_t CanStatus1 = 0u;
    uint8_t CanStatus2 = 0u;
hu's avatar
hu committed
963

hu's avatar
hu committed
964 965
    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
966

hu's avatar
hu committed
967 968 969
    CanStatus1 = CAN_MSG_Status(ID_CanMsg18FE5BE8_Msg_Count);
    CanStatus2 = CAN_MSG_Status(ID_CanMsg18FECAE8_Msg_Count);

hu's avatar
hu committed
970
    if (K_Line_Set.K_Line_LID27 == 0x01u)
hu's avatar
hu committed
971
    {
hu's avatar
hu committed
972 973 974 975 976 977 978 979 980 981 982 983
        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
984 985 986 987 988 989 990 991
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
992
void LED_LDWS_L_Execution(uint8_t led_status)
hu's avatar
hu committed
993
{
hu's avatar
hu committed
994
    if (K_Line_Set.K_Line_LID27 == 0x01u)
hu's avatar
hu committed
995
    {
hu's avatar
hu committed
996 997 998 999 1000 1001 1002 1003 1004 1005
        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
1006 1007 1008
    }
    else
    {
hu's avatar
hu committed
1009
        IS31_CHIP0_CHANNEL04 = 0x00;
hu's avatar
hu committed
1010
        SEG_LED_LDWS_L(0);
hu's avatar
hu committed
1011 1012 1013
    }
}

hu's avatar
hu committed
1014
/******************************************************************************
hu's avatar
hu committed
1015
  L5 SRS
hu's avatar
hu committed
1016 1017 1018 1019
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1020 1021 1022 1023
uint8_t LED_SRS_L_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1024

hu's avatar
hu committed
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037
    m_Condition1 = (uint8_t)XXXX;

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

    return u8Result;
}
hu's avatar
hu committed
1038 1039 1040 1041
void LED_SRS_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1042
        IS31_CHIP0_CHANNEL20 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1043 1044 1045 1046
        SEG_LED_SRS_L(7);
    }
    else
    {
hu's avatar
hu committed
1047
        IS31_CHIP0_CHANNEL20 = 0x00;
hu's avatar
hu committed
1048 1049 1050
        SEG_LED_SRS_L(0);
    }
}
hu's avatar
hu committed
1051

hu's avatar
hu committed
1052
/******************************************************************************
hu's avatar
hu committed
1053
  L6 ENG OIL
hu's avatar
hu committed
1054
  信号接口: A32 LOW
hu's avatar
hu committed
1055 1056 1057 1058
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_ENG_OIL_L_Judgement(void)
hu's avatar
hu committed
1059 1060 1061
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1062

hu's avatar
hu committed
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075
    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
1076 1077 1078 1079
void LED_ENG_OIL_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1080
        IS31_CHIP0_CHANNEL21 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1081 1082 1083 1084
        SEG_LED_ENG_OIL_L(7);
    }
    else
    {
hu's avatar
hu committed
1085
        IS31_CHIP0_CHANNEL21 = 0x00;
hu's avatar
hu committed
1086 1087 1088
        SEG_LED_ENG_OIL_L(0);
    }
}
hu's avatar
hu committed
1089

hu's avatar
hu committed
1090
/******************************************************************************
hu's avatar
hu committed
1091
  L7 CHARG
hu's avatar
hu committed
1092
  信号接口: A34 LOW
hu's avatar
hu committed
1093 1094 1095 1096
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_CHARG_L_Judgement(void)
hu's avatar
hu committed
1097 1098 1099
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1100

hu's avatar
hu committed
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113
    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
1114 1115 1116 1117
void LED_CHARG_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1118
        IS31_CHIP0_CHANNEL22 = LED_BRIGHTNESSB;
hu's avatar
hu committed
1119 1120 1121 1122
        SEG_LED_CHARG_L(7);
    }
    else
    {
hu's avatar
hu committed
1123
        IS31_CHIP0_CHANNEL22 = 0x00;
hu's avatar
hu committed
1124 1125 1126
        SEG_LED_CHARG_L(0);
    }
}
hu's avatar
hu committed
1127

hu's avatar
hu committed
1128
/******************************************************************************
hu's avatar
hu committed
1129
  L8 SEAT BELT
hu's avatar
hu committed
1130
  信号接口: A30 LOW
hu's avatar
hu committed
1131 1132 1133 1134
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_SEAT_BELT_L_Judgement(void)
hu's avatar
hu committed
1135 1136 1137
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1138

hu's avatar
hu committed
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151
    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
1152 1153 1154 1155
void LED_SEAT_BELT_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1156
        IS31_CHIP0_CHANNEL23 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1157 1158 1159 1160
        SEG_LED_SEAT_BELT_L(7);
    }
    else
    {
hu's avatar
hu committed
1161
        IS31_CHIP0_CHANNEL23 = 0x00;
hu's avatar
hu committed
1162 1163 1164 1165
        SEG_LED_SEAT_BELT_L(0);
    }
}
/******************************************************************************
hu's avatar
hu committed
1166
  L9 RR DIFF LOCK
hu's avatar
hu committed
1167 1168
  信号接口:
  信号定义:
hu's avatar
hu committed
1169
  输出信号: 禅道7048删除
hu's avatar
hu committed
1170 1171
 ******************************************************************************/
uint8_t LED_RR_DIFF_LOCK_L_Judgement(void)
hu's avatar
hu committed
1172 1173 1174
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1175 1176

    m_Condition1 = XXXX;
hu's avatar
hu committed
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188

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

    return u8Result;
}
hu's avatar
hu committed
1189 1190 1191 1192
void LED_RR_DIFF_LOCK_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1193
        IS31_CHIP0_CHANNEL16 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1194 1195 1196 1197
        SEG_LED_RR_DIFF_LOCK_L(7);
    }
    else
    {
hu's avatar
hu committed
1198
        IS31_CHIP0_CHANNEL16 = 0x00;
hu's avatar
hu committed
1199 1200 1201
        SEG_LED_RR_DIFF_LOCK_L(0);
    }
}
hu's avatar
hu committed
1202

hu's avatar
hu committed
1203
/******************************************************************************
hu's avatar
hu committed
1204
  L10 TPMS
hu's avatar
hu committed
1205 1206 1207 1208 1209
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_TPMS_L_Judgement(void)
hu's avatar
hu committed
1210 1211
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224
    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
1225

hu's avatar
hu committed
1226
    if (K_Line_Set.K_Line_LID3E == 0x01u)
hu's avatar
hu committed
1227
    {
hu's avatar
hu committed
1228
        if ((Low_Presure == 1u) || (High_Presure == 1u) || (High_Temperature == 1u))
hu's avatar
hu committed
1229 1230 1231
        {
            u8Result = 1u;
        }
hu's avatar
hu committed
1232
        else if ((No_signal == 1u) || (Sensor_fault == 1u) || (CanStatus1 == CAN_SIG_LOST))
hu's avatar
hu committed
1233 1234 1235 1236 1237 1238 1239
        {
            u8Result = FLASH_SYNC_1Hz;
        }
        else
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
1240 1241 1242 1243 1244 1245 1246 1247
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1248 1249
void LED_TPMS_L_Execution(uint8_t led_status)
{
hu's avatar
hu committed
1250
    if (K_Line_Set.K_Line_LID3E == 0x01u)
hu's avatar
hu committed
1251
    {
hu's avatar
hu committed
1252 1253
        if (led_status == 1)
        {
1254
            IS31_CHIP0_CHANNEL17 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1255 1256 1257 1258
            SEG_LED_TPMS_L(7);
        }
        else
        {
hu's avatar
hu committed
1259
            IS31_CHIP0_CHANNEL17 = 0x00;
hu's avatar
hu committed
1260 1261
            SEG_LED_TPMS_L(0);
        }
hu's avatar
hu committed
1262 1263 1264
    }
    else
    {
hu's avatar
hu committed
1265
        IS31_CHIP0_CHANNEL17 = 0x00u;
hu's avatar
hu committed
1266 1267 1268 1269
        SEG_LED_TPMS_L(0);
    }
}
/******************************************************************************
hu's avatar
hu committed
1270
  L11 ASR/EVSC OFF
hu's avatar
hu committed
1271
  信号接口: 18F0010B Byte:3 Bit:3-4==01(B)
hu's avatar
hu committed
1272 1273
  信号定义:
  输出信号:
hu's avatar
hu committed
1274
  说明:调整依据 SXS-VC66-22_EBS WARNING & INDICATOR (7“LCD)改訂1-1_20211116
hu's avatar
hu committed
1275 1276
 ******************************************************************************/
uint8_t LED_ASR_or_EVSC_OFF_L_Judgement(void)
hu's avatar
hu committed
1277 1278 1279
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1280

hu's avatar
hu committed
1281 1282
    m_Condition1 = (uint8_t)Get_ID_18F0010B_Sig_ASR_Offroad_Switch();

hu's avatar
hu committed
1283
    if (K_Line_Set.K_Line_LID22 == 0x01u)
hu's avatar
hu committed
1284
    {
hu's avatar
hu committed
1285 1286 1287 1288 1289 1290 1291 1292
        if (m_Condition1 == 1u)
        {
            u8Result = 1u;
        }
        else
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
1293 1294 1295 1296 1297 1298 1299 1300
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1301 1302
void LED_ASR_or_EVSC_OFF_L_Execution(uint8_t led_status)
{
hu's avatar
hu committed
1303
    if (K_Line_Set.K_Line_LID22 == 0x01u)
hu's avatar
hu committed
1304
    {
hu's avatar
hu committed
1305 1306
        if (led_status == 1)
        {
1307
            IS31_CHIP0_CHANNEL18 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1308 1309 1310 1311
            SEG_LED_ASR_or_EVSC_OFF_L(7);
        }
        else
        {
hu's avatar
hu committed
1312
            IS31_CHIP0_CHANNEL18 = 0x00;
hu's avatar
hu committed
1313 1314
            SEG_LED_ASR_or_EVSC_OFF_L(0);
        }
hu's avatar
hu committed
1315 1316 1317
    }
    else
    {
hu's avatar
hu committed
1318
        IS31_CHIP0_CHANNEL18 = 0x0u;
hu's avatar
hu committed
1319 1320 1321
        SEG_LED_ASR_or_EVSC_OFF_L(0);
    }
}
hu's avatar
hu committed
1322

hu's avatar
hu committed
1323
/******************************************************************************
hu's avatar
hu committed
1324
  L12 EVSC
hu's avatar
hu committed
1325 1326 1327
  信号接口:
  信号定义:
  输出信号:
hu's avatar
hu committed
1328
  调整依据:SXS-VC66-22_EBS WARNING & INDICATOR (7“LCD)改訂1-1_20211116
hu's avatar
hu committed
1329 1330
 ******************************************************************************/
uint8_t LED_EVSC_L_Judgement(void)
hu's avatar
hu committed
1331 1332
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
1333 1334
    uint8_t CanStatus1 = 0u;
    uint8_t CanStatus2 = 0u;
hu's avatar
hu committed
1335 1336 1337 1338 1339 1340
    uint8_t LineStatus1 = 0u;
    uint8_t CanDataSta1 = 0u;
    uint8_t CanDataSta2 = 0u;
    uint8_t CanDataSta3 = 0u;
    uint8_t CanDataSta4 = 0u;
    uint8_t CanDataSta5 = 0u;
hu's avatar
hu committed
1341 1342
    uint16_t m_Condition6 = 0u;
    uint16_t m_Condition7 = 0u;
1343 1344
    uint8_t m_AirSta1 = 0u;
    uint8_t m_AirSta2 = 0u;
hu's avatar
hu committed
1345

hu's avatar
hu committed
1346 1347
    LineStatus1 = (uint8_t)Line_In_Get_Status(LINE_IN_BRAKE_AIR_EBS); /*A28*/

hu's avatar
hu committed
1348
    CanStatus2 = CAN_MSG_Status(ID_CanMsg18F0010B_Msg_Count);
hu's avatar
hu committed
1349 1350 1351 1352 1353 1354 1355 1356 1357
    CanDataSta2 = (uint8_t)Get_ID_18F0010B_Sig_ASR_Lamp_State(); /*byte1 12*/
    CanDataSta3 = (uint8_t)Get_ID_18F0010B_Sig_ASR_Brake_Control_Active(); /*byte1 34*/
    CanDataSta1 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Red_Warning_Lamp_State(); /*byte6 34*/
    (uint8_t)Get_ID_18F0010B_Sig_EBS_Amber_Warning_State();/*byte6 56*/
    (uint8_t)Get_ID_18F0010B_Sig_ATC_or_ASR_Lamp_State();/*byte6 78*/

    CanStatus1 = CAN_MSG_Status(ID_CanMsg18FE4F0B_Msg_Count);
    CanDataSta5 = (uint8_t)Get_ID_18FE4F0B_Sig_VDC_Lamp_State(); /*byte1 12*/
    CanDataSta4 = (uint8_t)Get_ID_18FE4F0B_Sig_VDC_Fully_operational(); /*byte1 34*/
hu's avatar
hu committed
1358 1359
    m_Condition6 = Common_Get_Air1_Data();  /*气压1 1.89以下*/
    m_Condition7 = Common_Get_Air2_Data();  /*气压1 1.89以下*/
1360 1361
    m_AirSta1 = Common_Get_Air1_Valid();
    m_AirSta2 = Common_Get_Air2_Valid();
hu's avatar
hu committed
1362

1363
    if (((m_Condition6 < 1890u) && (m_AirSta1 == 1u)) || ((m_Condition7 < 1890u) && (m_AirSta2 == 1u)))
hu's avatar
hu committed
1364
    {
hu's avatar
hu committed
1365
        L12_Air_Sta  = 1u;
hu's avatar
hu committed
1366
    }
hu's avatar
hu committed
1367 1368 1369 1370
    else if (((m_Condition6 >= 1990u) && (m_Condition7 >= 1990u)) ||
             ((m_Condition6 >= 1990u) && (m_AirSta2 == 0u)) ||
             ((m_Condition7 >= 1990u) && (m_AirSta1 == 0u)) ||
             ((m_AirSta1 == 0u) && (m_AirSta2 == 0u)))
hu's avatar
hu committed
1371
    {
hu's avatar
hu committed
1372
        L12_Air_Sta = 0u;
hu's avatar
hu committed
1373
    }
hu's avatar
hu committed
1374 1375

    if (
hu's avatar
hu committed
1376 1377 1378
        (LineStatus1 == 1u) || (Common_Get_L12_Air_Sta() == 1u) ||
        (((CanDataSta1 == 1u) || (CanStatus2 == CAN_SIG_LOST)) && (K_Line_Set.K_Line_LID21 == 0x01u)) ||
        (((CanDataSta4 == 0u) || (CanStatus1 == CAN_SIG_LOST)) && (K_Line_Set.K_Line_LID22 == 0x01u))
hu's avatar
hu committed
1379
    )
hu's avatar
hu committed
1380
    {
hu's avatar
hu committed
1381
        u8Result = 1u;
hu's avatar
hu committed
1382
    }
hu's avatar
hu committed
1383 1384
    else if ((((CanDataSta2 == 1u) || (CanDataSta3 == 1u)) && (K_Line_Set.K_Line_LID21 == 0x01u)) ||
             ((CanDataSta5 == 1u) && (K_Line_Set.K_Line_LID22 == 0x01u)))
hu's avatar
hu committed
1385
    {
hu's avatar
hu committed
1386
        u8Result = FLASH_SYNC_2Hz;
hu's avatar
hu committed
1387
    }
hu's avatar
hu committed
1388 1389 1390 1391 1392 1393 1394
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1395
void LED_EVSC_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1396
{
hu's avatar
hu committed
1397
    if (led_status == 1)
hu's avatar
hu committed
1398
    {
1399
        IS31_CHIP0_CHANNEL19 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1400
        SEG_LED_EVSC_L(7);
hu's avatar
hu committed
1401 1402 1403
    }
    else
    {
hu's avatar
hu committed
1404
        IS31_CHIP0_CHANNEL19 = 0x00;
hu's avatar
hu committed
1405
        SEG_LED_EVSC_L(0);
hu's avatar
hu committed
1406 1407 1408
    }
}

hu's avatar
hu committed
1409
/******************************************************************************
hu's avatar
hu committed
1410
  L13 ECO STOP OFF
hu's avatar
hu committed
1411 1412 1413 1414 1415
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_eco_stop_OFF_L_Judgement(void)
hu's avatar
hu committed
1416 1417 1418
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1419
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431

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

    return u8Result;
}
hu's avatar
hu committed
1432
void LED_eco_stop_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1433
{
hu's avatar
hu committed
1434
    if (led_status == 1)
hu's avatar
hu committed
1435
    {
1436 1437 1438 1439 1440 1441 1442 1443
        if (Line_In_Get_Status(LINE_IN_ILLUMINATION))
        {
            IS31_CHIP0_CHANNEL12 = LED_BRIGHTNESSGBL;  /* 绿灯 亮 */
        }
        else
        {
            IS31_CHIP0_CHANNEL12 = LED_BRIGHTNESSG;  /* 绿灯 亮 */
        }
hu's avatar
hu committed
1444
        IS31_CHIP0_CHANNEL13 = 0x00u;  /* 黄灯 灭 */
hu's avatar
hu committed
1445
    }
hu's avatar
hu committed
1446
    else if (led_status == 2)
hu's avatar
hu committed
1447
    {
hu's avatar
hu committed
1448
        IS31_CHIP0_CHANNEL12 = 0x00u;  /* 绿灯 灭 */
1449
        IS31_CHIP0_CHANNEL13 = LED_BRIGHTNESSY;  /* 黄灯 亮 */
hu's avatar
hu committed
1450 1451 1452
    }
    else
    {
hu's avatar
hu committed
1453 1454
        IS31_CHIP0_CHANNEL12 = 0x00u;  /* 绿灯 灭 */
        IS31_CHIP0_CHANNEL13 = 0x00u;  /* 黄灯 灭 */
hu's avatar
hu committed
1455 1456
    }

hu's avatar
hu committed
1457
    if ((led_status == 1) || (led_status == 2))
hu's avatar
hu committed
1458
    {
hu's avatar
hu committed
1459
        SEG_LED_eco_stop_OFF_L(7);
hu's avatar
hu committed
1460 1461 1462
    }
    else
    {
hu's avatar
hu committed
1463
        SEG_LED_eco_stop_OFF_L(0);
hu's avatar
hu committed
1464 1465 1466
    }
}

hu's avatar
hu committed
1467
/******************************************************************************
hu's avatar
hu committed
1468
  L14 AMT
1469
  信号接口:  20220616 条件变更
hu's avatar
hu committed
1470 1471 1472 1473
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_AMT_L_Judgement(void)
hu's avatar
hu committed
1474 1475 1476
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
1477
    uint8_t m_Condition4 = 0u;
1478
    uint8_t CanStatus = 0u;
hu's avatar
hu committed
1479

1480 1481 1482 1483 1484
    //m_Condition1 = (uint8_t)Get_ID_18FECA03_Sig_Amber_Warning_Lamp_Status();
    //m_Condition2 = (uint8_t)Get_ID_18FECA03_Sig_Malfunction_indicator_Lamp();
    m_Condition3 = (uint8_t)Get_ID_18FF8503_Sig_Stop_Warning();
    m_Condition4 = (uint8_t)Get_ID_18FF8503_Sig_Spanner_Warning();
    CanStatus = CAN_MSG_Status(ID_CanMsg18FF8503_Msg_Count);
hu's avatar
hu committed
1485

hu's avatar
hu committed
1486
    if (K_Line_Set.K_Line_LID41 == 0x13u)
hu's avatar
hu committed
1487
    {
1488
        if ((m_Condition3 == 1u) || (m_Condition4 == 1u) || (CanStatus == CAN_SIG_LOST))
hu's avatar
hu committed
1489 1490 1491 1492 1493 1494 1495
        {
            u8Result = 1u;
        }
        else
        {
            u8Result = 0u;
        }
hu's avatar
hu committed
1496 1497 1498 1499 1500 1501 1502 1503
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1504
void LED_AMT_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1505
{
hu's avatar
hu committed
1506
    if (K_Line_Set.K_Line_LID41 == 0x13u)
hu's avatar
hu committed
1507
    {
hu's avatar
hu committed
1508 1509
        if (led_status == 1)
        {
1510
            IS31_CHIP0_CHANNEL14 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1511 1512 1513 1514
            SEG_LED_AMT_L(7);
        }
        else
        {
hu's avatar
hu committed
1515
            IS31_CHIP0_CHANNEL14 = 0x00;
hu's avatar
hu committed
1516 1517
            SEG_LED_AMT_L(0);
        }
hu's avatar
hu committed
1518 1519 1520
    }
    else
    {
hu's avatar
hu committed
1521
        IS31_CHIP0_CHANNEL14 = 0x00u;
hu's avatar
hu committed
1522
        SEG_LED_AMT_L(0);
hu's avatar
hu committed
1523 1524 1525
    }
}

hu's avatar
hu committed
1526
/******************************************************************************
hu's avatar
hu committed
1527
  L15 WEAR IND
hu's avatar
hu committed
1528
  信号接口: B38 0V B40 0V
hu's avatar
hu committed
1529
  信号定义:
1530
  输出信号: 接地熄灭20220524
hu's avatar
hu committed
1531 1532
 ******************************************************************************/
uint8_t LED_WEAR_IND_L_Judgement(void)
hu's avatar
hu committed
1533 1534 1535
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1536 1537
    uint8_t m_Condition2 = 0u;

hu's avatar
hu committed
1538
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_WEAR_IND);
hu's avatar
hu committed
1539
    m_Condition2 = (uint8_t)Line_In_Get_Status(LINE_IN_WEAR2);
hu's avatar
hu committed
1540

1541
    if ((m_Condition1 == 0x01u) && (m_Condition2 == 0x01u))
hu's avatar
hu committed
1542
    {
1543
        u8Result = 0u;
hu's avatar
hu committed
1544 1545 1546
    }
    else
    {
1547
        u8Result = 1u;
hu's avatar
hu committed
1548 1549 1550 1551
    }

    return u8Result;
}
hu's avatar
hu committed
1552
void LED_WEAR_IND_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1553 1554 1555
{
    if (led_status == 1)
    {
1556
        IS31_CHIP0_CHANNEL15 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1557
        SEG_LED_WEAR_IND_L(7);
hu's avatar
hu committed
1558 1559 1560
    }
    else
    {
hu's avatar
hu committed
1561
        IS31_CHIP0_CHANNEL15 = 0x00;
hu's avatar
hu committed
1562
        SEG_LED_WEAR_IND_L(0);
hu's avatar
hu committed
1563 1564 1565
    }
}

hu's avatar
hu committed
1566
/******************************************************************************
hu's avatar
hu committed
1567
 R1 PARK BRAKE
hu's avatar
hu committed
1568
 信号接口: A23 GND
hu's avatar
hu committed
1569 1570 1571 1572
 信号定义:
 输出信号:
******************************************************************************/
uint8_t LED_PARK_BRAKE_R_Judgement(void)
hu's avatar
hu committed
1573
{
hu's avatar
hu committed
1574 1575
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1576
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_PARK_BRAKE);
hu's avatar
hu committed
1577

hu's avatar
hu committed
1578
    if (m_Condition1 == 1u)
hu's avatar
hu committed
1579
    {
hu's avatar
hu committed
1580
        u8Result = 1u;
hu's avatar
hu committed
1581 1582 1583
    }
    else
    {
hu's avatar
hu committed
1584
        u8Result = 0u;
hu's avatar
hu committed
1585 1586
    }

hu's avatar
hu committed
1587 1588
    return u8Result;
}
hu's avatar
hu committed
1589
void LED_PARK_BRAKE_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1590 1591 1592
{
    if (led_status == 1)
    {
1593
        IS31_CHIP0_CHANNEL08 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1594
        SEG_LED_PARK_BRAKE_R(7);
hu's avatar
hu committed
1595 1596 1597
    }
    else
    {
hu's avatar
hu committed
1598
        IS31_CHIP0_CHANNEL08 = 0x00;
hu's avatar
hu committed
1599
        SEG_LED_PARK_BRAKE_R(0);
hu's avatar
hu committed
1600 1601 1602
    }
}

hu's avatar
hu committed
1603
/******************************************************************************
hu's avatar
hu committed
1604
  R2 BRAKE AIR/EBS
hu's avatar
hu committed
1605 1606 1607 1608
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1609
uint8_t LED_BRAKE_AIR_or_EBS_RED_R_Judgement(void)
hu's avatar
hu committed
1610 1611
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
1612
    uint8_t CanStatus = 0u;
hu's avatar
hu committed
1613
    uint8_t m_Condition1 = 0u;
1614
    uint8_t m_Condition2 = 0u;
hu's avatar
hu committed
1615
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
1616

hu's avatar
hu committed
1617
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_BRAKE_AIR_EBS);
1618
    m_Condition2 = (uint8_t)Get_ID_18F0010B_Sig_ABS_Fully_Operational();
hu's avatar
hu committed
1619 1620
    m_Condition3 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Red_Warning_Lamp_State();

hu's avatar
hu committed
1621 1622
    CanStatus = CAN_MSG_Status(ID_CanMsg18F0010B_Msg_Count);

1623 1624 1625 1626 1627 1628 1629
    //if ((m_Condition1 == 0x01u) || (Common_Get_L12_Air_Sta() == 0x01u) ||
    //        ((K_Line_Set.K_Line_LID21 == 0x01u) && ((m_Condition3 == 1u) || (CanStatus == CAN_SIG_LOST))))
    /*禅道5014*/
    if (
        (m_Condition1 == 0x01u) ||
        ((K_Line_Set.K_Line_LID21 == 0x01u) && ((m_Condition2 == 0u) || (m_Condition3 == 1u) || (CanStatus == CAN_SIG_LOST)))
    )
hu's avatar
hu committed
1630
    {
hu's avatar
hu committed
1631
        u8Result = 1u;
hu's avatar
hu committed
1632 1633 1634 1635 1636 1637 1638 1639
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1640
void LED_BRAKE_AIR_or_EBS_RED_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1641
{
hu's avatar
hu committed
1642
    BRAKE_AIR_EBS_LED_MCU = led_status;
hu's avatar
hu committed
1643 1644 1645

    if (led_status == 1)
    {
hu's avatar
hu committed
1646
        SEG_LED_BRAKE_AIR_or_EBS_RED_R(7);
hu's avatar
hu committed
1647 1648 1649
    }
    else
    {
hu's avatar
hu committed
1650
        SEG_LED_BRAKE_AIR_or_EBS_RED_R(0);
hu's avatar
hu committed
1651 1652 1653
    }
}

hu's avatar
hu committed
1654
/******************************************************************************
hu's avatar
hu committed
1655
  R3 BRAKE LOCK
hu's avatar
hu committed
1656 1657
  信号接口:
  信号定义:
hu's avatar
hu committed
1658
  输出信号:
hu's avatar
hu committed
1659
 ******************************************************************************/
hu's avatar
hu committed
1660
uint8_t LED_BRAKE_LOCK_R_Judgement(void)
hu's avatar
hu committed
1661 1662 1663
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1664

hu's avatar
hu committed
1665
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677

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

    return u8Result;
}
hu's avatar
hu committed
1678
void LED_BRAKE_LOCK_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1679
{
hu's avatar
hu committed
1680 1681
    if (led_status == 1)
    {
1682
        IS31_CHIP0_CHANNEL07 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1683
        SEG_LED_BRAKE_LOCK_R(7);
hu's avatar
hu committed
1684 1685 1686
    }
    else
    {
hu's avatar
hu committed
1687
        IS31_CHIP0_CHANNEL07 = 0x00;
hu's avatar
hu committed
1688
        SEG_LED_BRAKE_LOCK_R(0);
hu's avatar
hu committed
1689 1690
    }
}
hu's avatar
hu committed
1691

hu's avatar
hu committed
1692
/******************************************************************************
hu's avatar
hu committed
1693
  R4 AIR SUS
hu's avatar
hu committed
1694 1695 1696 1697
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1698
uint8_t LED_AIR_SUS_R_Judgement(void)
hu's avatar
hu committed
1699 1700 1701
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1702

hu's avatar
hu committed
1703
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_AIR_SUS);
hu's avatar
hu committed
1704

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

hu's avatar
hu committed
1714 1715
    return u8Result;
}
hu's avatar
hu committed
1716
void LED_AIR_SUS_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1717
{
hu's avatar
hu committed
1718 1719
    if (led_status == 1)
    {
1720
        IS31_CHIP0_CHANNEL06 = LED_BRIGHTNESSR;
hu's avatar
hu committed
1721
        SEG_LED_AIR_SUS_R(7);
hu's avatar
hu committed
1722 1723 1724
    }
    else
    {
hu's avatar
hu committed
1725
        IS31_CHIP0_CHANNEL06 = 0x00;
hu's avatar
hu committed
1726
        SEG_LED_AIR_SUS_R(0);
hu's avatar
hu committed
1727 1728 1729
    }
}

hu's avatar
hu committed
1730
/******************************************************************************
hu's avatar
hu committed
1731 1732 1733 1734 1735 1736
  R5 TRAILER BRAKE
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_TRAILER_BRAKE_R_Judgement(void)
hu's avatar
hu committed
1737 1738 1739
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1740

1741
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_TRAILER_BRAKE);
hu's avatar
hu committed
1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753

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

    return u8Result;
}
hu's avatar
hu committed
1754
void LED_TRAILER_BRAKE_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1755 1756 1757
{
    if (led_status == 1)
    {
1758
        IS31_CHIP0_CHANNEL10 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1759
        SEG_LED_TRAILER_BRAKE_R(7);
hu's avatar
hu committed
1760 1761 1762
    }
    else
    {
hu's avatar
hu committed
1763
        IS31_CHIP0_CHANNEL10 = 0x00;
hu's avatar
hu committed
1764
        SEG_LED_TRAILER_BRAKE_R(0);
hu's avatar
hu committed
1765 1766 1767
    }
}

hu's avatar
hu committed
1768
/******************************************************************************
hu's avatar
hu committed
1769
  R6 BRAKE AIR/EBS
hu's avatar
hu committed
1770 1771 1772 1773
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1774
uint8_t LED_BRAKE_AIR_or_EBS_YELLOW_R_Judgement(void)
hu's avatar
hu committed
1775 1776 1777
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1778 1779

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

hu's avatar
hu committed
1781
    if (m_Condition1 == 1u)
hu's avatar
hu committed
1782
    {
hu's avatar
hu committed
1783
        u8Result = 0u;
hu's avatar
hu committed
1784 1785 1786 1787 1788 1789 1790 1791
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1792
void LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1793
{
hu's avatar
hu committed
1794 1795
    if (led_status == 1)
    {
1796
        IS31_CHIP0_CHANNEL09 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1797
        SEG_LED_BRAKE_AIR_or_EBS_YELLOW_R(7);
hu's avatar
hu committed
1798 1799 1800
    }
    else
    {
hu's avatar
hu committed
1801
        IS31_CHIP0_CHANNEL09 = 0x00;
hu's avatar
hu committed
1802
        SEG_LED_BRAKE_AIR_or_EBS_YELLOW_R(0);
hu's avatar
hu committed
1803 1804 1805
    }
}

hu's avatar
hu committed
1806
/******************************************************************************
hu's avatar
hu committed
1807
  R7  ACC AIR
hu's avatar
hu committed
1808 1809
  信号接口:
  信号定义:
hu's avatar
hu committed
1810
  输出信号: R6_LED_OUT
hu's avatar
hu committed
1811
 ******************************************************************************/
hu's avatar
hu committed
1812
uint8_t LED_ACC_AIR_R_Judgement(void)
hu's avatar
hu committed
1813 1814 1815
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1816

hu's avatar
hu committed
1817
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_ACC_AIR);
hu's avatar
hu committed
1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829

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

    return u8Result;
}
hu's avatar
hu committed
1830 1831

void LED_ACC_AIR_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1832
{
hu's avatar
hu committed
1833
    R6_LED_OUT = led_status;
hu's avatar
hu committed
1834 1835 1836

    if (led_status == 1)
    {
hu's avatar
hu committed
1837
        SEG_LED_ACC_AIR_R(7);
hu's avatar
hu committed
1838 1839 1840
    }
    else
    {
hu's avatar
hu committed
1841
        SEG_LED_ACC_AIR_R(0);
hu's avatar
hu committed
1842 1843
    }
}
hu's avatar
hu committed
1844
/******************************************************************************
hu's avatar
hu committed
1845
  R8 ABS
hu's avatar
hu committed
1846 1847 1848 1849
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1850
uint8_t LED_ABS_R_Judgement(void)
hu's avatar
hu committed
1851 1852
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
1853
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1854
    uint8_t m_Condition2 = 0u;
hu's avatar
hu committed
1855
    uint8_t CanStatus1 = 0u;
hu's avatar
hu committed
1856

hu's avatar
hu committed
1857
    m_Condition2 = (uint8_t)Get_ID_18F0010B_Sig_ABS_Fully_Operational();/*byte 6 12*/
hu's avatar
hu committed
1858
    CanStatus1 = CAN_MSG_Status(ID_CanMsg18F0010B_Msg_Count);
hu's avatar
hu committed
1859
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_ABS);
hu's avatar
hu committed
1860

hu's avatar
hu committed
1861
    if ((((CanStatus1 == CAN_SIG_LOST) || (m_Condition2 == 0u)) && (K_Line_Set.K_Line_LID21 == 0x01u)) ||
1862
            ((m_Condition1 == 1u) && (K_Line_Set.K_Line_LID21 == 0x03u)))
hu's avatar
hu committed
1863
    {
hu's avatar
hu committed
1864
        u8Result = 1u;
hu's avatar
hu committed
1865 1866 1867 1868 1869 1870 1871 1872
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1873
void LED_ABS_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1874
{
hu's avatar
hu committed
1875
    ABS_LED_MCU_OUT = led_status;
hu's avatar
hu committed
1876

hu's avatar
hu committed
1877 1878 1879
    if (led_status == 1)
    {
        SEG_LED_ABS_R(7);
hu's avatar
hu committed
1880 1881 1882
    }
    else
    {
hu's avatar
hu committed
1883
        SEG_LED_ABS_R(0);
hu's avatar
hu committed
1884 1885 1886
    }
}

hu's avatar
hu committed
1887 1888 1889 1890 1891 1892 1893 1894 1895 1896
/******************************************************************************
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
1897

hu's avatar
hu committed
1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913
    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
1914
    TRAILER_ABS_LED_MCU_OUT = led_status;
hu's avatar
hu committed
1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935

    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
1936

hu's avatar
hu committed
1937 1938 1939 1940 1941 1942 1943 1944 1945 1946
    m_Condition1 = (uint8_t)XXXX;

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

hu's avatar
hu committed
1948 1949
    return u8Result;
}
hu's avatar
hu committed
1950 1951 1952 1953
void LED_WORKING_LAMP_U_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1954
        IS31_CHIP0_CHANNEL11 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1955 1956 1957 1958
        SEG_LED_WORKING_LAMP_U(7);
    }
    else
    {
hu's avatar
hu committed
1959
        IS31_CHIP0_CHANNEL11 = 0x00;
hu's avatar
hu committed
1960 1961 1962 1963
        SEG_LED_WORKING_LAMP_U(0);
    }
}

hu's avatar
hu committed
1964 1965 1966 1967 1968 1969 1970 1971 1972 1973
/******************************************************************************
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
1974

hu's avatar
hu committed
1975 1976
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_TRAILER_ABS_INFO);

hu's avatar
hu committed
1977
    if (m_Condition1 == 0x01u)
hu's avatar
hu committed
1978 1979 1980 1981 1982 1983 1984 1985 1986 1987
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1988 1989 1990 1991
void LED_TRAILER_ABS_INFO_U_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
1992
        IS31_CHIP0_CHANNEL05 = LED_BRIGHTNESSY;
hu's avatar
hu committed
1993 1994 1995 1996
        SEG_LED_TRAILER_ABS_INFO_U(7);
    }
    else
    {
hu's avatar
hu committed
1997
        IS31_CHIP0_CHANNEL05 = 0x00;
hu's avatar
hu committed
1998 1999
        SEG_LED_TRAILER_ABS_INFO_U(0);
    }
hu's avatar
hu committed
2000 2001 2002 2003
}

/******************************************************************************
Temp
2004
  信号接口:18FEEE00
hu's avatar
hu committed
2005 2006 2007 2008 2009
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Temp_Judgement(void)
{
2010
    static uint8_t u8Result = 0u;
2011
    uint32_t u32IG_ON_Timer = 0x00u;
hu's avatar
hu committed
2012 2013
    uint8_t m_Condition1 = 0u;

2014
    m_Condition1 = Coolant_Get_CurSeg();
2015
    u32IG_ON_Timer = Common_GetIgnOnTime();
2016

2017
    if ((m_Condition1 >= 11u) &&  (Coolant_Get_Valid() == 1u)  && (u32IG_ON_Timer >= 5500))// && (K_Line_Set.K_Line_LID43 == 0x82u))
hu's avatar
hu committed
2018
    {
2019
        u8Result = 1u;
hu's avatar
hu committed
2020
    }
2021
    else if (m_Condition1 <= 9u)
hu's avatar
hu committed
2022 2023 2024 2025 2026 2027 2028 2029
    {
        u8Result = 0u;
    }

    return u8Result;
}
void LED_Temp_Execution(uint8_t led_status)
{
2030 2031 2032 2033
    COMMON_PowerStatus_t u8IG_st;
    u8IG_st = Common_Get_IG_Sts();

    if (u8IG_st == COMMON_POWER_ON)
hu's avatar
hu committed
2034
    {
2035
        if (led_status == 1u)
2036 2037
        {
            TEMP_R_LED_OUT = 1u ;/*水温红灯*/
hu's avatar
hu committed
2038
            //Water_Temp_Led_R_MCU_OUT = 1u;
hu's avatar
hu committed
2039

2040
            TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯
2041
            //Water_Temp_Led_W_MCU_OUT = 1u;
2042 2043 2044 2045
        }
        else
        {
            TEMP_R_LED_OUT = 0u ;/*水温红灯*/
2046
            //Water_Temp_Led_R_MCU_OUT = 0u;
2047 2048

            TEMP_W_LED_OUT = 1u ;//水温字符白色指示灯
2049
            //Water_Temp_Led_W_MCU_OUT = 1u;
2050
        }
hu's avatar
hu committed
2051 2052 2053 2054
    }
    else
    {
        TEMP_R_LED_OUT = 0u ;/*水温红灯*/
2055
        //Water_Temp_Led_R_MCU_OUT = 0u;
hu's avatar
hu committed
2056

2057
        TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯
2058
        //Water_Temp_Led_W_MCU_OUT = 0u;
hu's avatar
hu committed
2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070
    }
}

/******************************************************************************
Fuel
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Fuel_Judgement(void)
{
    uint8_t u8Result = 0u;
hu's avatar
hu committed
2071
    uint8_t variable_1 = 0x00u;
hu's avatar
hu committed
2072

hu's avatar
hu committed
2073
    variable_1 = Fuel_Get_Popup_Sta();
hu's avatar
hu committed
2074

hu's avatar
hu committed
2075
    if (variable_1 == 1)//&& (K_Line_Set.K_Line_LID43 == 0x82u))
hu's avatar
hu committed
2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
void LED_Fuel_Execution(uint8_t led_status)
{
2088
    COMMON_PowerStatus_t u8IG_st;
hu's avatar
hu committed
2089

2090 2091 2092
    u8IG_st = Common_Get_IG_Sts();

    if (u8IG_st == COMMON_POWER_ON)
hu's avatar
hu committed
2093
    {
2094
        if (led_status == 1u)
2095
        {
hu's avatar
hu committed
2096
            FUEL_LED_Y_MCU = 1u ;
2097
            //FUEL_W_LED_OUT = 0u ;
2098 2099 2100
        }
        else
        {
hu's avatar
hu committed
2101
            FUEL_LED_Y_MCU = 0u ;
2102
            //FUEL_W_LED_OUT = 1u ;
2103
        }
hu's avatar
hu committed
2104 2105 2106
    }
    else
    {
hu's avatar
hu committed
2107
        FUEL_LED_Y_MCU = 0u ;
2108
        //FUEL_W_LED_OUT = 0u ;
hu's avatar
hu committed
2109
    }
hu's avatar
hu committed
2110 2111 2112
}

/******************************************************************************
2113
Common_Get_L12_Air_Sta
hu's avatar
hu committed
2114 2115 2116 2117 2118 2119 2120
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t Common_Get_L12_Air_Sta(void)
{
    return L12_Air_Sta ;
hu's avatar
hu committed
2121
}