loc_graphics_data.h 7.08 KB
Newer Older
hu's avatar
hu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/**********************************************************************************************************
* @file    loc_graphics_data.h
* @author  HZS
* @version V1.0.0
* @date    2021.04.09
* @brief   c header file
********************************************************************************************************/
#ifndef LOC_GRAPHICS_DATA_H_
#define LOC_GRAPHICS_DATA_H_

#include "loc_graphics_def.h"
#include "images.h"
#include "DisplaySch_user.h"

hu's avatar
hu committed
15
/*区域1 WET*/
hu's avatar
hu committed
16 17 18 19 20 21 22
#define MAX_WET_SUP_LAYER        20
MultiBufferSprite_t WETSpriteBuf;
uint8_t             WETIndex = 0u;
uint8_t             WETUpdate = 0u;
uint8_t             WETEn = 0u;
LogicLayerAttr_t    WETLogicLayerAttr[MAX_WET_SUP_LAYER];

hu's avatar
hu committed
23
/*区域1 AdBlue*/
hu's avatar
hu committed
24 25 26 27 28 29 30
#define MAX_ADBLUE_SUP_LAYER        10
MultiBufferSprite_t AdBlueSpriteBuf;
uint8_t             AdBlueIndex = 0u;
uint8_t             AdBlueUpdate = 0u;
uint8_t             AdBlueEn = 0u;
LogicLayerAttr_t    AdBlueLogicLayerAttr[MAX_ADBLUE_SUP_LAYER];

hu's avatar
hu committed
31
/*区域2 TRIP*/
hu's avatar
hu committed
32 33 34 35 36 37 38
#define MAX_TRIP_SUP_LAYER        10
MultiBufferSprite_t TRIPSpriteBuf;
uint8_t             TRIPIndex = 0u;
uint8_t             TRIPUpdate = 0u;
uint8_t             TRIPEn = 0u;
LogicLayerAttr_t    TRIPLogicLayerAttr[MAX_TRIP_SUP_LAYER];

hu's avatar
hu committed
39
/*区域2 ODO*/
hu's avatar
hu committed
40 41 42 43 44 45 46
#define MAX_ODO_SUP_LAYER        10
MultiBufferSprite_t ODOSpriteBuf;
uint8_t             ODOIndex = 0u;
uint8_t             ODOUpdate = 0u;
uint8_t             ODOEn = 0u;
LogicLayerAttr_t    ODOLogicLayerAttr[MAX_ODO_SUP_LAYER];

hu's avatar
hu committed
47
/*区域3 警告灯*/
hu's avatar
hu committed
48 49 50 51 52 53 54
#define MAX_WARNINGLIGHT_SUP_LAYER        10
MultiBufferSprite_t WarningLightSpriteBuf;
uint8_t             WarningLightIndex = 0u;
uint8_t             WarningLightUpdate = 0u;
uint8_t             WarningLightEn = 0u;
LogicLayerAttr_t    WarningLightLogicLayerAttr[MAX_WARNINGLIGHT_SUP_LAYER];

hu's avatar
hu committed
55
/*区域4 ADAS*/
hu's avatar
hu committed
56 57 58 59 60 61 62
#define MAX_ADAS_SUP_LAYER        15
MultiBufferSprite_t ADASSpriteBuf;
uint8_t             ADASIndex = 0u;
uint8_t             ADASUpdate = 0u;
uint8_t             ADASEn = 0u;
LogicLayerAttr_t    ADASLogicLayerAttr[MAX_ADAS_SUP_LAYER];

hu's avatar
hu committed
63
/*区域5 行车电脑*/
hu's avatar
hu committed
64 65 66 67 68 69 70
#define MAX_MULTIPURPOSE_SUP_LAYER        20
MultiBufferSprite_t MultiPurposeSpriteBuf;
uint8_t             MultiPurposeIndex = 0u;
uint8_t             MultiPurposeUpdate = 0u;
uint8_t             MultiPurposeEn = 0u;
LogicLayerAttr_t    MultiPurposeLogicLayerAttr[MAX_MULTIPURPOSE_SUP_LAYER];

hu's avatar
hu committed
71
/*区域6 定速巡航图标*/
hu's avatar
hu committed
72
#define MAX_CRUISE_SUP_LAYER        6
hu's avatar
hu committed
73 74 75 76 77 78
MultiBufferSprite_t CruiseSpriteBuf;
uint8_t             CruiseIndex = 0u;
uint8_t             CruiseUpdate = 0u;
uint8_t             CruiseEn = 0u;
LogicLayerAttr_t    CruiseLogicLayerAttr[MAX_CRUISE_SUP_LAYER];

hu's avatar
hu committed
79
/*区域7 挡位*/
hu's avatar
hu committed
80 81 82 83 84 85 86
#define MAX_GEAR_SUP_LAYER        5
MultiBufferSprite_t GearSpriteBuf;
uint8_t             GearIndex = 0u;
uint8_t             GearUpdate = 0u;
uint8_t             GearEn = 0u;
LogicLayerAttr_t    GearLogicLayerAttr[MAX_GEAR_SUP_LAYER];

hu's avatar
hu committed
87
/*区域8 室外温度*/
hu's avatar
hu committed
88 89 90 91 92 93 94
#define MAX_TEMP_SUP_LAYER        10
MultiBufferSprite_t TempSpriteBuf;
uint8_t             TempIndex = 0u;
uint8_t             TempUpdate = 0u;
uint8_t             TempEn = 0u;
LogicLayerAttr_t    TempLogicLayerAttr[MAX_TEMP_SUP_LAYER];

hu's avatar
hu committed
95
/*区域8 时间*/
hu's avatar
hu committed
96 97 98 99 100 101 102
#define MAX_TIME_SUP_LAYER        5
MultiBufferSprite_t TimeSpriteBuf;
uint8_t             TimeIndex = 0u;
uint8_t             TimeUpdate = 0u;
uint8_t             TimeEn = 0u;
LogicLayerAttr_t    TimeLogicLayerAttr[MAX_TIME_SUP_LAYER];

hu's avatar
hu committed
103
/*区域8 年月日*/
hu's avatar
hu committed
104 105 106 107 108 109 110
#define MAX_CALENDAR_SUP_LAYER        15
MultiBufferSprite_t CalendarSpriteBuf;
uint8_t             CalendarIndex = 0u;
uint8_t             CalendarUpdate = 0u;
uint8_t             CalendarEn = 0u;
LogicLayerAttr_t    CalendarLogicLayerAttr[MAX_CALENDAR_SUP_LAYER];

hu's avatar
hu committed
111 112 113 114 115 116 117 118
/**/
#define MAX_MENU_SUP_LAYER        20
MultiBufferSprite_t MENUSpriteBuf;
uint8_t             MENUIndex = 0u;
uint8_t             MENUUpdate = 0u;
uint8_t             MENUEn = 0u;
LogicLayerAttr_t    MENULogicLayerAttr[MAX_MENU_SUP_LAYER];

hu's avatar
hu committed
119 120
static const SpritesHandler_t SpriteHandler[Max_Sprite] =
{
hu's avatar
hu committed
121 122 123 124 125 126 127 128 129 130 131 132 133
    {WET_Sprite,          { 38u, 364u, 326u,  60u, 1u}, TARGET_SDRAM, &WETSpriteBuf,          &WETIndex,          WETLogicLayerAttr,          MAX_WET_SUP_LAYER         , &WETUpdate,            &WETEn,          GUI_DisplayServices},
    {AdBlue_Sprite,       { 38u, 428u, 326u,  48u, 1u}, TARGET_SDRAM, &AdBlueSpriteBuf,       &AdBlueIndex,       AdBlueLogicLayerAttr,       MAX_ADBLUE_SUP_LAYER      , &AdBlueUpdate,         &AdBlueEn,       R_NULL},
    {TRIP_Sprite,         {438u, 374u, 322u,  48u, 1u}, TARGET_SDRAM, &TRIPSpriteBuf,         &TRIPIndex,         TRIPLogicLayerAttr,         MAX_TRIP_SUP_LAYER        , &TRIPUpdate,           &TRIPEn,         R_NULL},
    {ODO_Sprite,          {438u, 424u, 324u,  42u, 1u}, TARGET_SDRAM, &ODOSpriteBuf,          &ODOIndex,          ODOLogicLayerAttr,          MAX_ODO_SUP_LAYER         , &ODOUpdate,            &ODOEn,          R_NULL},
    {WarningLight_Sprite, {  8u,  88u,  82u, 264u, 1u}, TARGET_SDRAM, &WarningLightSpriteBuf, &WarningLightIndex, WarningLightLogicLayerAttr, MAX_WARNINGLIGHT_SUP_LAYER, &WarningLightUpdate,   &WarningLightEn, R_NULL},
    {ADAS_Sprite,         {112u,  94u, 254u, 260u, 1u}, TARGET_SDRAM, &ADASSpriteBuf,         &ADASIndex,         ADASLogicLayerAttr,         MAX_ADAS_SUP_LAYER        , &ADASUpdate,           &ADASEn,         R_NULL},
    {MultiPurpose_Sprite, {382u, 182u, 410u, 170u, 1u}, TARGET_SDRAM, &MultiPurposeSpriteBuf, &MultiPurposeIndex, MultiPurposeLogicLayerAttr, MAX_MULTIPURPOSE_SUP_LAYER, &MultiPurposeUpdate ,  &MultiPurposeEn, R_NULL},
    {Cruise_Sprite,       {382u,  84u, 230u,  92u, 1u}, TARGET_SDRAM, &CruiseSpriteBuf,       &CruiseIndex,       CruiseLogicLayerAttr,       MAX_CRUISE_SUP_LAYER      , &CruiseUpdate,         &CruiseEn,       R_NULL},
    {Gear_Sprite,         {622u,  86u, 170u,  94u, 1u}, TARGET_SDRAM, &GearSpriteBuf,         &GearIndex,         GearLogicLayerAttr,         MAX_GEAR_SUP_LAYER        , &GearUpdate,           &GearEn,         R_NULL},
    {Temp_Sprite,         { 26u,  12u, 258u,  70u, 1u}, TARGET_SDRAM, &TempSpriteBuf,         &TempIndex,         TempLogicLayerAttr,         MAX_TEMP_SUP_LAYER        , &TempUpdate,           &TempEn,         R_NULL},
    {Time_Sprite,         {330u,  14u, 140u,  66u, 1u}, TARGET_SDRAM, &TimeSpriteBuf,         &TimeIndex,         TimeLogicLayerAttr,         MAX_TIME_SUP_LAYER        , &TimeUpdate,           &TimeEn,         R_NULL},
    {Calendar_Sprite,     {508u,  16u, 284u,  64u, 1u}, TARGET_SDRAM, &CalendarSpriteBuf,     &CalendarIndex,     CalendarLogicLayerAttr,     MAX_CALENDAR_SUP_LAYER    , &CalendarUpdate,       &CalendarEn,     R_NULL},
    {MENU_Sprite,         {100u,  82u, 694u, 278u, 1u}, TARGET_SDRAM, &MENUSpriteBuf,         &MENUIndex,         MENULogicLayerAttr,         MAX_MENU_SUP_LAYER        , &MENUUpdate,           &MENUEn,         R_NULL},
hu's avatar
hu committed
134 135 136 137 138 139 140 141
};

/*AutoCreateEnd*/
static const r_screen_attr_t ScreenAttr =
{
    800, 480, 896,      /* JEPG Window*/
    800, 480, 896,      /* Loc Window*/
    5,                  /* 刷新时间,50ms*/
hu's avatar
hu committed
142
    12,                 /* 主屏幕Sprite数量*/
hu's avatar
hu committed
143 144 145 146
    Max_Sprite,         /* 全部Sprite数量*/
    SpriteSize          /* 最大的图片数量*/
};

hu's avatar
hu committed
147
#endif