A272O版本整理

This commit is contained in:
LiJie 2025-02-12 14:05:53 +08:00
parent 08e216ffb2
commit 7a59be0434
156 changed files with 27634 additions and 25946 deletions

View File

@ -1,5 +1,7 @@
{
"files.associations": {
"chip.h": "c"
"chip.h": "c",
"*.inc": "cpp",
"data_port.h": "c"
}
}

View File

@ -263,9 +263,9 @@
#ifdef WIFI_SUPPORT
#define CARLINK_EY 0
#define CARLINK_EC 0
#define CARLINK_CP 1
#define CARLINK_AA 1
#define CARLINK_EC 1
#define CARLINK_CP 0
#define CARLINK_AA 0
#if !DEVICE_MXC_A27
#define WIFI_RESET_IO 12
@ -300,15 +300,15 @@
#error "carplay need lwip"
#endif
#if !DEVICE_MXC_A27
//wifi模块蓝牙复位引脚
#define BT_RESET_IO 13
//wifi模块使能引脚
#define WIFI_EN_IO 14
#else
// #if !DEVICE_MXC_A27
// //wifi模块蓝牙复位引脚
// #define BT_RESET_IO 13
// //wifi模块使能引脚
// #define WIFI_EN_IO 14
// #else
#define BT_RESET_IO 94
#define WIFI_EN_IO 46
#endif
// #endif
#define BT_UART_PORT 1

View File

@ -5,24 +5,38 @@
#include "chip.h"
#include "data_port.h"
#include "gear_protocol.h"
#include "moto_config.h"
extern void check_key(void);
// 定义定时器句柄
TimerHandle_t xTimer;
uint8_t GPIO_value_high[7];
#define IO_KEEP 4
#ifdef UI_VIEW_QUICKLY_ARRANGE
#define IO_KEEP 1 //采样大于1次
#define CNT_KEEP 1 //20ms一次判断
#else
#define IO_KEEP 4 //采样大于两次
#define CNT_KEEP 6 //30ms一次判断
#endif
uint8_t gpio_pins[7] = {GPIO_D6, GPIO_D5, GPIO_D4, GPIO_D3, GPIO_D2, GPIO_D1, GPIO_N};
void grade_key(void){
#ifdef UI_VIEW_QUICKLY_ARRANGE
static uint8_t Gear_value = 7;
#else
uint8_t Gear_value = 7;
#endif
static uint8_t cnt =0;
//数据顺序 N 1 2 3 4 5 6 ABS TCS FAN ENG YG R L RMT
//挡位高电平触发, 灯光、ABS、TCS、FAN ENG 低电平触发
if(gpio_get_value(GPIO_GRADE_N))
{
GPIO_value_high[GPIO_N]++;
if(GPIO_value_high[GPIO_N] == IO_KEEP)
{
Gear_value = 0;
printf("N\r\n");
}
}
else
GPIO_value_high[GPIO_N] = 0;
@ -30,11 +44,6 @@ void grade_key(void){
if(gpio_get_value(GPIO_GRADE_D1))
{
GPIO_value_high[GPIO_D1]++;
if(GPIO_value_high[GPIO_D1] == IO_KEEP)
{
Gear_value = 1;
printf("D1\r\n");
}
}
else
GPIO_value_high[GPIO_D1] = 0;
@ -42,11 +51,6 @@ void grade_key(void){
if(gpio_get_value(GPIO_GRADE_D2))
{
GPIO_value_high[GPIO_D2]++;
if(GPIO_value_high[GPIO_D2] == IO_KEEP)
{
Gear_value = 2;
printf("D2\r\n");
}
}
else
GPIO_value_high[GPIO_D2] = 0;
@ -54,11 +58,6 @@ void grade_key(void){
if(gpio_get_value(GPIO_GRADE_D3))
{
GPIO_value_high[GPIO_D3]++;
if(GPIO_value_high[GPIO_D3] == IO_KEEP)
{
Gear_value = 3;
printf("D3\r\n");
}
}
else
GPIO_value_high[GPIO_D3] = 0;
@ -66,11 +65,6 @@ void grade_key(void){
if(gpio_get_value(GPIO_GRADE_D4))
{
GPIO_value_high[GPIO_D4]++;
if(GPIO_value_high[GPIO_D4] == IO_KEEP)
{
Gear_value = 4;
printf("D4\r\n");
}
}
else
GPIO_value_high[GPIO_D4] = 0;
@ -78,11 +72,6 @@ void grade_key(void){
if(gpio_get_value(GPIO_GRADE_D5))
{
GPIO_value_high[GPIO_D5]++;
if(GPIO_value_high[GPIO_D5] == IO_KEEP)
{
Gear_value = 5;
printf("D5\r\n");
}
}
else
GPIO_value_high[GPIO_D5] = 0;
@ -90,16 +79,28 @@ void grade_key(void){
if(gpio_get_value(GPIO_GRADE_D6))
{
GPIO_value_high[GPIO_D6]++;
if(GPIO_value_high[GPIO_D6] == IO_KEEP)
{
Gear_value = 6;
printf("D6\r\n");
}
}
else
GPIO_value_high[GPIO_D6] = 0;
Set_sys_grade(Gear_value);
cnt++;
// printf("N=%d,D1=%d,D2=%d,D3=%d,D4=%d,D5=%d,D6=%d.\r\n",gpio_get_value(GPIO_GRADE_N),gpio_get_value(GPIO_GRADE_D1),gpio_get_value(GPIO_GRADE_D2),
// gpio_get_value(GPIO_GRADE_D3),gpio_get_value(GPIO_GRADE_D4),gpio_get_value(GPIO_GRADE_D5),gpio_get_value(GPIO_GRADE_D6));
if(cnt>=CNT_KEEP){
// if(cnt){
// 针对当前档位进行赋值
for (uint8_t i = 0; i < 7; i++) {
if (GPIO_value_high[gpio_pins[i]] >= IO_KEEP) {
Gear_value = (6-i); // 根据索引设置 Gear_value
break; // 找到第一个符合条件的引脚后退出循环
}
}
Set_sys_grade(Gear_value);
cnt=0;
memset(GPIO_value_high, 0, 7); //buff初始化
}
}
// 定时器回调函数
@ -109,13 +110,27 @@ void vTimerCallback(TimerHandle_t xTimer) {
check_key();
//档位检测
grade_key();
}
void Moto_gpio_timer(void) {
static void gear_gpio_init(void){
gpio_direction_input(GPIO_GRADE_N);
gpio_direction_input(GPIO_GRADE_D1);
gpio_direction_input(GPIO_GRADE_D2);
gpio_direction_input(GPIO_GRADE_D3);
gpio_direction_input(GPIO_GRADE_D4);
gpio_direction_input(GPIO_GRADE_D5);
gpio_direction_input(GPIO_GRADE_D6);
gpio_direction_input(GPIO_LIGHT_SET);
gpio_direction_input(GPIO_LIGHT_MODE);
}
void Moto_gpio_timer(void) {
gear_gpio_init();
// 创建定时器
xTimer = xTimerCreate("MyTimer", // 定时器名称
pdMS_TO_TICKS(20), // 定时器周期1000毫秒
pdMS_TO_TICKS(5), // 定时器周期1000毫秒
pdTRUE, // 自动重载定时器
(void *)0, // 定时器 ID
vTimerCallback); // 回调函数
@ -123,7 +138,7 @@ void Moto_gpio_timer(void) {
// 启动定时器
if (xTimerStart(xTimer, 0) != pdPASS) {
// 启动定时器失败的处理
printf("xTimer error!!!!!!!!!!!!!!!!!.\r\n");
printf("xTimer error!!!!!!!!!!!!!!!!!..........................\r\n");
}
}

View File

@ -12,7 +12,7 @@ enum
GPIO_D6,
};
#define GPIO_GRADE_N 8
#define GPIO_GRADE_N 8
#define GPIO_GRADE_D1 9
#define GPIO_GRADE_D2 10
#define GPIO_GRADE_D3 11

View File

@ -10,8 +10,16 @@ KEY_DAT gs_keyDat[KEY_NUMBERS]={0};
bool key_readKeyPin(uint8_t keyx)
{
bool status;
#ifdef DATA_CAN //适配270M版本
if(keyx==0) status = gpio_get_value(GPIO_LIGHT_SET);
else if(keyx==1) status = gpio_get_value(GPIO_LIGHT_MODE);
#else
if(keyx==0) status = gpio_get_value(GPIO_LIGHT_MODE);
else if(keyx==1) status = gpio_get_value(GPIO_LIGHT_SET);
#endif
// if(keyx==0) status = gpio_get_value(GPIO_LIGHT_SET);
// else if(keyx==1) status = gpio_get_value(GPIO_LIGHT_MODE);
// return (!status);//低有效
return (status);//高有效
}

View File

@ -302,31 +302,31 @@ void data_analysis(uint8_t *buf){
//按键 高set 低mod
data = *(buf++);
#ifdef KEY_EXCHANGE
if(JUDGE_BIN_4(data))
Key_Distinction(KEY_DATA_PRESS,LV_KEY_OPTION);
else if(JUDGE_BIN_5(data))
Key_Distinction(KEY_DATA_LONG_PRESS,LV_KEY_OPTION);
else if(JUDGE_BIN_0(data))
Key_Distinction(KEY_DATA_PRESS,LV_KEY_SELECT);
else if(JUDGE_BIN_1(data))
Key_Distinction(KEY_DATA_LONG_PRESS,LV_KEY_SELECT);
else if(JUDGE_BIN_7(data)){
Key_Distinction(KEY_DATA_PRESS,LV_KEY_OTHER1);
}
#else
if(JUDGE_BIN_0(data))
Key_Distinction(KEY_DATA_PRESS,LV_KEY_OPTION);
else if(JUDGE_BIN_1(data))
Key_Distinction(KEY_DATA_LONG_PRESS,LV_KEY_OPTION);
else if(JUDGE_BIN_4(data))
Key_Distinction(KEY_DATA_PRESS,LV_KEY_SELECT);
else if(JUDGE_BIN_5(data))
Key_Distinction(KEY_DATA_LONG_PRESS,LV_KEY_SELECT);
else if(JUDGE_BIN_7(data)){
Key_Distinction(KEY_DATA_PRESS,LV_KEY_OTHER1);
}
#endif
// #ifdef KEY_EXCHANGE
// if(JUDGE_BIN_4(data))
// Key_Distinction(KEY_DATA_PRESS,LV_KEY_OPTION);
// else if(JUDGE_BIN_5(data))
// Key_Distinction(KEY_DATA_LONG_PRESS,LV_KEY_OPTION);
// else if(JUDGE_BIN_0(data))
// Key_Distinction(KEY_DATA_PRESS,LV_KEY_SELECT);
// else if(JUDGE_BIN_1(data))
// Key_Distinction(KEY_DATA_LONG_PRESS,LV_KEY_SELECT);
// else if(JUDGE_BIN_7(data)){
// Key_Distinction(KEY_DATA_PRESS,LV_KEY_OTHER1);
// }
// #else
// if(JUDGE_BIN_0(data))
// Key_Distinction(KEY_DATA_PRESS,LV_KEY_OPTION);
// else if(JUDGE_BIN_1(data))
// Key_Distinction(KEY_DATA_LONG_PRESS,LV_KEY_OPTION);
// else if(JUDGE_BIN_4(data))
// Key_Distinction(KEY_DATA_PRESS,LV_KEY_SELECT);
// else if(JUDGE_BIN_5(data))
// Key_Distinction(KEY_DATA_LONG_PRESS,LV_KEY_SELECT);
// else if(JUDGE_BIN_7(data)){
// Key_Distinction(KEY_DATA_PRESS,LV_KEY_OTHER1);
// }
// #endif
//速度
data = *(buf++);
#ifndef DATA_CAN
@ -428,11 +428,11 @@ void data_analysis(uint8_t *buf){
//档位
data = *(buf++);
if(data == 0){
Set_sys_grade(0);
}else if(data < 8){
Set_sys_grade(data);
}
// if(data == 0){
// Set_sys_grade(0);
// }else if(data < 8){
// Set_sys_grade(data);
// }
//油量
oil = *(buf++);

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

View File

@ -0,0 +1,88 @@
<digit_clock>
<style name="font_30">
<normal font_name="SerpentineSansICG" font_size="30" text_color="#FFFFFF"/>
</style>
<style name="font_30_right">
<normal font_name="SerpentineSansICG" font_size="36" margin_right="3" text_align_h="right" text_color="#FFFFFF"/>
</style>
</digit_clock>
<image>
<style name="cell">
<normal bg_image="cell" text_color="#444444"/>
</style>
<style name="cell_warning">
<normal bg_image="cell_wn" text_color="#444444"/>
</style>
<style name="uidemo1_oil_normal">
<normal bg_image="oil" text_color="#444444"/>
</style>
<style name="uidemo1_oil_warning">
<normal bg_image="oil_wn" text_color="#444444"/>
</style>
<style name="uidemo1_temp_normal">
<normal bg_image="temp" text_color="#444444"/>
</style>
<style name="uidemo1_temp_warning">
<normal bg_image="temp_wn" text_color="#444444"/>
</style>
</image>
<label>
<style name="font_24">
<normal font_name="SerpentineSansICG" font_size="24" text_color="#FFFFFF"/>
<disable text_color="#44444466"/>
</style>
<style name="font_30">
<normal font_name="SerpentineSansICG" font_size="30" text_align_h="center" text_color="#FFFFFF"/>
<disable text_color="#44444466"/>
</style>
<style name="font_75">
<normal font_name="SerpentineSansICG" font_size="75" margin_right="3" text_align_h="center" text_color="#FFFFFF"/>
<disable text_color="#44444466"/>
</style>
<style name="font_right_30">
<normal font_name="SerpentineSansICG" font_size="30" margin_right="3" text_align_h="right" text_color="#FFFFFF"/>
<disable text_color="#44444466"/>
</style>
<style name="tirefont_18">
<normal font_name="SerpentineSansICG" text_color="#FFFFFF"/>
<disable text_color="#44444466"/>
</style>
</label>
<progress_bar>
<style name="bar_normal" round_radius="5">
<normal bg_color="#00000000" bg_image="bar_bg" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="bar_1" fg_image_draw_type="default" text_color="#444444"/>
<disable bg_color="#D8D8D866" border_color="#D8D8D866" fg_color="#338FFF66" text_color="#44444466"/>
</style>
<style name="bar_warning" round_radius="5">
<normal bg_color="#00000000" bg_image="bar_bg" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="bar_2" fg_image_draw_type="default" font_name="default" text_color="#444444"/>
<disable bg_color="#D8D8D866" border_color="#D8D8D866" fg_color="#338FFF66" text_color="#44444466"/>
</style>
</progress_bar>
<progress_circle>
<style name="default">
<normal fg_color="#338FFF" font_name="SerpentineSansICG" text_color="#444444"/>
</style>
<style name="speed_135">
<normal fg_color="#00000000" font_name="SerpentineSansICG" font_size="135" margin_right="3" text_align_h="none" text_color="#FFFFFF"/>
<disable fg_color="#338FFF66" text_color="#44444466"/>
</style>
<style name="speed_normal">
<normal bg_color="#00000000" border_width="0" fg_image="rpm_bar_1" text_color="#00000000"/>
</style>
<style name="speed_warning">
<normal bg_image="" border_width="0" fg_color="#00000000" fg_image="rpm_bar_2" text_color="#00000000"/>
</style>
</progress_circle>
<view>
<style name="uidemo1_bg_bk">
<normal bg_image="demo1bg_bk"/>
</style>
<style name="uidemo1_bg_wt">
<normal bg_image="demo1bg_wt"/>
</style>
</view>
<window>
<style name="bgcolor">
<normal bg_color="#000000"/>
</style>
</window>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1005 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,13 +1,10 @@
<digit_clock>
<style name="font_bk_30">
<style name="font_30">
<normal font_name="SerpentineSansICG" font_size="30" text_color="#000000"/>
</style>
<style name="font_bk_30_right">
<style name="font_30_right">
<normal font_name="SerpentineSansICG" font_size="36" margin_right="3" text_align_h="right" text_color="#000000"/>
</style>
<style name="font_wt_30">
<normal font_name="SerpentineSansICG" font_size="30" text_color="#FFFFFF"/>
</style>
</digit_clock>
<image>
<style name="cell">
@ -16,76 +13,48 @@
<style name="cell_warning">
<normal bg_image="cell_wn" text_color="#444444"/>
</style>
<style name="uidemo_veer_left_bk">
<normal bg_image="left_bk" text_color="#444444"/>
<style name="uidemo1_oil_normal">
<normal bg_image="oil" text_color="#444444"/>
</style>
<style name="uidemo_veer_left_wt">
<normal bg_image="left_wt" text_color="#444444"/>
<style name="uidemo1_oil_warning">
<normal bg_image="oil_wn" text_color="#444444"/>
</style>
<style name="uidemo_veer_right_bk">
<normal bg_image="right_bk" text_color="#444444"/>
<style name="uidemo1_temp_normal">
<normal bg_image="temp" text_color="#444444"/>
</style>
<style name="uidemo_veer_right_wt">
<normal bg_image="right_wt" text_color="#444444"/>
<style name="uidemo1_temp_warning">
<normal bg_image="temp_wn" text_color="#444444"/>
</style>
</image>
<label>
<style name="font_bk_24">
<style name="font_24">
<normal font_name="SerpentineSansICG" font_size="24" text_color="#000000"/>
<disable text_color="#44444466"/>
</style>
<style name="font_bk_30">
<style name="font_30">
<normal font_name="SerpentineSansICG" font_size="30" text_align_h="center" text_color="#000000"/>
<disable text_color="#44444466"/>
</style>
<style name="font_bk_right_20">
<normal font_name="SerpentineSansICG" font_size="24" margin_right="3" text_align_h="right" text_color="#000000"/>
<style name="font_75">
<normal font_name="SerpentineSansICG" font_size="75" margin_right="3" text_align_h="center" text_color="#000000"/>
<disable text_color="#44444466"/>
</style>
<style name="font_bk_right_30">
<style name="font_right_30">
<normal font_name="SerpentineSansICG" font_size="30" margin_right="3" text_align_h="right" text_color="#000000"/>
<disable text_color="#44444466"/>
</style>
<style name="font_bk_right_40">
<normal font_name="SerpentineSansICG" font_size="40" margin_right="3" text_align_h="center" text_color="#000000"/>
<disable text_color="#44444466"/>
</style>
<style name="font_wt_24">
<normal font_name="SerpentineSansICG" font_size="24" text_color="#FFFFFF"/>
<disable text_color="#44444466"/>
</style>
<style name="font_wt_30">
<normal font_name="SerpentineSansICG" font_size="30" text_align_h="right" text_color="#FFFFFF"/>
<disable text_color="#44444466"/>
</style>
<style name="uidemo_speed_blk">
<normal font_name="SerpentineSansICG" font_size="130" text_color="#000000"/>
<style name="tirefont_18">
<normal font_name="SerpentineSansICG" text_color="#000000"/>
<disable text_color="#44444466"/>
</style>
</label>
<progress_bar>
<style name="oil_bk_normal" round_radius="5">
<normal bg_color="#00000000" bg_image="" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="bar_bk" fg_image_draw_type="default" text_color="#444444"/>
<style name="bar_normal" round_radius="5">
<normal bg_color="#00000000" bg_image="bar_bg" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="bar_1" fg_image_draw_type="default" text_color="#444444"/>
<disable bg_color="#D8D8D866" border_color="#D8D8D866" fg_color="#338FFF66" text_color="#44444466"/>
</style>
<style name="oil_bk_warning" round_radius="5">
<normal bg_color="#00000000" bg_image="" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="oil_bk" fg_image_draw_type="default" text_color="#444444"/>
<disable bg_color="#D8D8D866" border_color="#D8D8D866" fg_color="#338FFF66" text_color="#44444466"/>
</style>
<style name="oil_wt_normal" round_radius="5">
<normal bg_color="#00000000" bg_image="" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="bar_wt" fg_image_draw_type="default" text_color="#444444"/>
<disable bg_color="#D8D8D866" border_color="#D8D8D866" fg_color="#338FFF66" text_color="#44444466"/>
</style>
<style name="oil_wt_warning" round_radius="5">
<normal bg_color="#00000000" bg_image="" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="oil_wt" fg_image_draw_type="default" text_color="#444444"/>
<disable bg_color="#D8D8D866" border_color="#D8D8D866" fg_color="#338FFF66" text_color="#44444466"/>
</style>
<style name="temp_bk" round_radius="5">
<normal bg_color="#00000000" bg_image="" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="temp_bk" fg_image_draw_type="default" text_color="#444444"/>
<disable bg_color="#D8D8D866" border_color="#D8D8D866" fg_color="#338FFF66" text_color="#44444466"/>
</style>
<style name="temp_wt" round_radius="5">
<normal bg_color="#00000000" bg_image="" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="temp_wt" fg_image_draw_type="default" text_color="#444444"/>
<style name="bar_warning" round_radius="5">
<normal bg_color="#00000000" bg_image="bar_bg" border_color="#00000000" border_width="0" fg_color="#00000000" fg_image="bar_2" fg_image_draw_type="default" font_name="default" text_color="#444444"/>
<disable bg_color="#D8D8D866" border_color="#D8D8D866" fg_color="#338FFF66" text_color="#44444466"/>
</style>
</progress_bar>
@ -93,24 +62,19 @@
<style name="default">
<normal fg_color="#338FFF" font_name="SerpentineSansICG" text_color="#444444"/>
</style>
<style name="uidemo1_bk">
<normal bg_color="#00000000" border_width="0" fg_image="rev_green_bk" text_color="#00000000"/>
<style name="speed_135">
<normal fg_color="#00000000" font_name="SerpentineSansICG" font_size="135" margin_right="3" text_align_h="none" text_color="#000000"/>
<disable fg_color="#338FFF66" text_color="#44444466"/>
</style>
<style name="uidemo1_bk_warning">
<normal bg_color="#00000000" border_width="0" fg_image="rev_red_bk" text_color="#00000000"/>
<style name="speed_normal">
<normal bg_color="#00000000" border_width="0" fg_image="rpm_bar_1" text_color="#00000000"/>
</style>
<style name="uidemo1_wt">
<normal bg_color="#00000000" border_width="0" fg_image="rev_green_wt" text_color="#00000000"/>
</style>
<style name="uidemo1_wt_warning">
<normal bg_image="" border_width="0" fg_color="#00000000" fg_image="rev_red_wt" text_color="#00000000"/>
<style name="speed_warning">
<normal bg_image="" border_width="0" fg_color="#00000000" fg_image="rpm_bar_2" text_color="#00000000"/>
</style>
</progress_circle>
<view>
<style name="uidemo1_bg_bk">
<normal bg_image="demo1bg_bk"/>
<window>
<style name="bgcolor">
<normal bg_color="#FFFFFF"/>
</style>
<style name="uidemo1_bg_wt">
<normal bg_image="demo1bg_wt"/>
</style>
</view>
</window>

View File

@ -1,4 +1,3 @@
<?xml ruler_y="380"?>
<window anim_hint="htranslate" name="new" style:normal:bg_color="#00000000" disable_anim="true" enable="true">
<view name="qr_view" h="380" opacity="255" x="0" y="0" w="800" style:normal:bg_color="#000000" visible="true" enable="true" floating="false">
<view name="view" h="328" x="0" y="0" w="800">
@ -34,14 +33,14 @@
</view>
</view>
<view name="view2" h="100" style:normal:border="none" style:normal:border_width="2" style:normal:border_color="#FFFFFF" opacity="255" style:normal:bg_color="#000000" style:normal:bg_image="" x="0" y="380" w="800" enable="true" visible="true">
<view name="icon_view" x="10" y="10" w="780" h="71">
<image name="func_bt_icon" x="514" y="-2" w="35" h="43" draw_type="default" image="bt" visible="true"/>
<image name="tcs_icon" x="69" y="2" w="37" h="41" draw_type="default" image="tcs" visible="true"/>
<image name="warn_abs_icon" x="151" y="-2" w="48" h="43" draw_type="default" image="abs" visible="true"/>
<image name="warn_engine_icon" x="594" y="0" w="50" h="43" draw_type="default" image="engine" visible="true"/>
<image name="left" x="0" y="0" w="59" h="43" draw_type="default" image="left_bk" visible="true"/>
<image name="right" x="726" y="0" w="54" h="43" draw_type="default" image="right_bk" visible="true"/>
<image name="light" x="249" y="2" w="48" h="35" draw_type="default" image="ahb" visible="true"/>
<view name="icon_view" x="10" y="4" w="780" h="77">
<image name="func_bt_icon" x="514" y="5" w="35" h="43" draw_type="default" image="bt" visible="true"/>
<image name="tcs_icon" x="69" y="6" w="37" h="41" draw_type="default" image="tcs" visible="true"/>
<image name="warn_abs_icon" x="151" y="2" w="48" h="43" draw_type="default" image="abs" visible="true"/>
<image name="warn_engine_icon" x="594" y="4" w="50" h="43" draw_type="default" image="engine" visible="true"/>
<image name="left" x="0" y="0" w="59" h="43" draw_type="default" image="turn_left_icon" visible="true"/>
<image name="right" x="726" y="-2" w="54" h="43" draw_type="default" image="turn_right_icon" visible="true"/>
<image name="light" x="249" y="6" w="48" h="35" draw_type="default" image="ahb" visible="true"/>
</view>
<label name="dh_veer_velocity" h="60" x="0" y="40" w="110" style:normal:text_color="#FFFFFF" style:normal:font_size="60" style:normal:font_name="Serpentine_MediumOblique" style:normal:text_align_h="center" style:normal:text_align_v="top"/>
<label name="dh_grade" h="96" style:normal:text_color="#FFFFFF" style:normal:font_size="80" style:normal:font_name="Serpentine_MediumOblique" x="365" y="4" w="68" style:normal:text_align_v="bottom" text="-"/>

View File

@ -8,10 +8,7 @@
<tab_button name="tab_button3" load_ui="settingview3" style:normal:font_name="default" style:normal:font_size="36" style:normal:border_color="#00000000" style="list_btn" style:normal:icon="" style:normal:icon_at="left" style:normal:text_align_h="center" focusable="true" with_focus_state="false" tr_text="蓝牙设置"/>
<tab_button name="tab_button4" load_ui="settingview4" style:normal:font_name="default" style:normal:font_size="36" style:normal:border_color="#00000000" style="list_btn" style:normal:bg_image="" style:normal:icon="" style:normal:icon_at="left" style:normal:text_align_h="center" focusable="true" with_focus_state="false" tr_text="其他设置"/>
<tab_button name="tab_button5" load_ui="settingview5" style:normal:font_name="default" style:normal:font_size="36" style:normal:border_color="#00000000" style="list_btn" style:normal:icon="" style:normal:icon_at="left" style:normal:text_align_h="center" focusable="true" with_focus_state="false" tr_text="车辆信息"/>
<tab_button name="tab_button6" load_ui="settingview6" style:normal:font_name="default" style:normal:font_size="36" style:normal:border_color="#00000000" style="list_btn" style:normal:icon="" style:normal:icon_at="left" style:normal:text_align_h="center" focusable="true" style:pressed:text_align_h="center" style:pressed:icon="" style:over:text_align_h="left" style:over:icon="return" style:disable:text_align_h="left" style:disable:icon="return" style:focused:text_align_h="center" style:focused:icon="" style:normal_of_active:text_align_h="center" style:normal_of_active:icon="" style:pressed_of_active:text_align_h="center" style:pressed_of_active:icon="" style:over_of_active:text_align_h="center" style:over_of_active:icon="">
<property name="style:disable_of_active:text_align_h">
<![CDATA[center]]>
</property>
<tab_button name="tab_button6" style:normal:font_name="default" style:normal:font_size="36" style:normal:border_color="#00000000" style="list_btn" style:normal:icon="" style:normal:icon_at="left" style:normal:text_align_h="center" focusable="true" style:pressed:text_align_h="center" style:pressed:icon="" style:over:text_align_h="left" style:over:icon="return" style:disable:text_align_h="left" style:disable:icon="return" style:focused:text_align_h="center" style:focused:icon="" style:normal_of_active:text_align_h="center" style:normal_of_active:icon="" style:pressed_of_active:text_align_h="center" style:pressed_of_active:icon="" style:over_of_active:text_align_h="center" style:over_of_active:icon="" style:disable_of_active:text_align_h="center">
<property name="style:focused_of_active:text_align_h">
<![CDATA[center]]>
</property>

View File

@ -1,36 +1,72 @@
<window name="ui_demo1" style="demo_bg_wht">
<view name="ui_demo1_bg" x="28" y="0" w="772" h="480" style="uidemo1_bg_wt"/>
<progress_circle max="181" name="progress_circle" x="48" y="40" w="390" h="390" style="uidemo1_wt_warning" line_width="20" line_cap="butt" start_angle="90" value="0"/>
<progress_bar max="100" name="oil_bar" x="426" y="266" w="271" h="10" style="oil_wt_normal" value="0"/>
<progress_bar max="60" name="temp_bar" x="390" y="313" w="270" h="10" style="temp_wt" value="0"/>
<window name="ui_demo1" style="bgcolor">
<view name="ui_demo1_bg" x="28" y="0" w="772" h="480" style="default" style:normal:bg_image="demo1bg"/>
<progress_circle max="181" name="progress_circle" x="48" y="40" w="390" h="390" style="speed_normal" line_width="20" line_cap="butt" start_angle="90" value="0"/>
<view name="oil_view" x="423" y="247" w="347" h="48">
<progress_bar max="100" name="oil_bar" x="3" y="19" w="268" h="10" style="bar_normal" value="0"/>
<image name="oil" x="309" y="8" w="38" h="39" draw_type="default" style="uidemo1_oil_warning"/>
<label name="E" x="25" y="-7" w="27" h="25" style="font_24" style:normal:text_color="#FF0000" text="E"/>
<label name="F" x="262" y="-7" w="27" h="25" style="font_24" text="F"/>
</view>
<view name="temp_view" x="391" y="294" w="347" h="48">
<progress_bar max="60" name="temp_bar" x="0" y="19" w="268" h="10" style="bar_normal" value="0"/>
<image name="temp" x="291" y="9" w="46" h="39" draw_type="default" style="uidemo1_temp_warning"/>
<label name="C" x="-4" y="32" w="27" h="25" style="font_24" text="C"/>
<label name="H" x="241" y="32" w="27" h="25" style="font_24" style:normal:text_color="#FF0000" text="H"/>
</view>
<view name="veer" x="10" y="10" w="780" h="54">
<image name="left" x="0" y="0" w="60" h="54" draw_type="default" style="uidemo_veer_left_wt"/>
<image name="right" x="720" y="0" w="60" h="54" draw_type="default" style="uidemo_veer_right_wt"/>
<image name="left" x="0" y="0" w="60" h="54" draw_type="default" style="default" style:normal:bg_image="turn_left_icon"/>
<image name="right" x="720" y="0" w="60" h="54" draw_type="default" style="default" style:normal:bg_image="turn_right_icon"/>
</view>
<view name="caution_light_view" x="256" y="202" w="205" h="234">
<image name="light" x="157" y="0" w="48" h="35" draw_type="default" image="ahb"/>
<image name="fan" x="119" y="35" w="50" h="50" draw_type="default" image="fan" visible="false" enable="false"/>
<image name="tcs" x="53" y="132" w="38" h="45" draw_type="default" image="tcs"/>
<image name="engine" x="74" y="81" w="53" h="41" draw_type="default" image="engine"/>
<image name="abs" x="10" y="176" w="49" h="40" draw_type="default" image="abs"/>
<image name="bt" x="127" y="36" w="35" h="49" draw_type="default" style="default" image="bt"/>
<image name="beam_high_icon" x="164" y="0" w="40" h="35" draw_type="default" image="ahb"/>
<image name="func_bt_icon" x="137" y="32" w="40" h="35" draw_type="default" style="default" image="bt"/>
<image name="warn_engine_icon" x="104" y="69" w="40" h="35" draw_type="default" image="engine"/>
<image name="warn_fan_icon" x="82" y="101" w="40" h="35" draw_type="default" image="fan"/>
<image name="warn_tcs_icon" x="57" y="137" w="40" h="35" draw_type="default" image="tcs"/>
<image name="warn_abs_icon" x="27" y="168" w="40" h="35" draw_type="default" image="abs"/>
<image name="warn_tire_icon" x="10" y="202" w="40" h="35" draw_type="default" image="tire_pressure"/>
</view>
<view name="bg_color" x="16" y="0" w="800" h="480">
<digit_clock name="digit_clock" x="485" y="342" w="51" h="35" format="mm" style="font_bk_30_right" style:normal:text_align_h="left" style:normal:margin_left="-1" style:normal:margin_right="0"/>
<label name="colon" x="465" y="341" w="20" h="35" style="font_bk_30" text=":"/>
<digit_clock name="digit_clock" x="417" y="342" w="51" h="35" format="hh" style="font_bk_30_right"/>
<label name="voltage" x="45" y="431" w="70" h="30" style="font_bk_right_30" text="12.0"/>
<label name="trip_mileage" x="365" y="406" w="132" h="32" style="font_bk_right_30" text="0.0"/>
<label name="total_mileage" x="596" y="405" w="139" h="32" style="font_bk_right_30" dirty_rect_tolerance="8" text="0"/>
<label name="grade" x="186" y="285" w="74" h="100" style="font_bk_right_40" style:normal:font_size="75" text="-"/>
<label name="unit1" x="195" y="269" w="68" h="24" style:normal:font_name="SerpentineSansICG" style:normal:text_color="#000000" style:normal:font_size="24" text="km/h"/>
<label name="unit2" x="499" y="410" w="40" h="24" style="font_bk_24" text="km"/>
<label name="unit3" x="737" y="409" w="40" h="24" style="font_bk_24" text="km"/>
<label name="trip" x="321" y="409" w="49" h="27" style:normal:font_name="SerpentineSansICG" style:normal:font_size="24" style:normal:text_color="#000000" text="Trip"/>
<label name="odo" x="546" y="409" w="49" h="27" style:normal:font_name="SerpentineSansICG" style:normal:font_size="24" style:normal:text_color="#000000" text="Odo"/>
<digit_clock name="digit_clock" x="485" y="342" w="51" h="35" format="mm" style="font_30_right" style:normal:text_align_h="left" style:normal:margin_left="-1" style:normal:margin_right="0"/>
<label name="colon" x="465" y="341" w="20" h="35" style="font_30" text=":"/>
<digit_clock name="digit_clock" x="417" y="342" w="51" h="35" format="hh" style="font_30_right"/>
<label name="voltage" x="45" y="431" w="70" h="30" style="font_right_30" text="12.0"/>
<label name="grade" x="186" y="285" w="74" h="100" style="font_75" style:normal:font_size="75" text="-"/>
<label name="unit1" x="195" y="269" w="68" h="24" style="font_24" text="km/h"/>
<view name="mile_view" x="327" y="386" w="457" h="75">
<label name="trip_mileage" x="38" y="20" w="132" h="32" style="font_right_30" text="0.0"/>
<label name="total_mileage" x="269" y="19" w="139" h="32" style="font_right_30" dirty_rect_tolerance="8" text="0"/>
<label name="unit2" x="172" y="24" w="40" h="24" style="font_24" text="km"/>
<label name="unit3" x="410" y="23" w="40" h="24" style="font_24" text="km"/>
<label name="trip" x="-6" y="23" w="49" h="27" style="font_24" text="Trip"/>
<label name="odo" x="219" y="23" w="49" h="27" style="font_24" text="Odo"/>
</view>
</view>
<image name="cell" x="13" y="429" w="49" h="35" draw_type="default" style="cell_warning"/>
<image name="oil" x="732" y="255" w="38" h="39" draw_type="default" style="uidemo1_oil_warning"/>
<image name="null" x="217" y="312" w="49" h="50" draw_type="center" image="neutral_gear" style="default" visible="false" scale_x="1.3" scale_y="1.3"/>
<progress_circle max="255" name="speed_progress" x="100" y="100" w="286" h="222" style:normal:text_color="#000000" style:normal:font_size="135" style:normal:font_name="SerpentineSansICG" style:normal:fg_color="#00000000" style:normal:text_align_h="none" style:normal:margin_right="3" value="0"/>
<image name="null" x="217" y="312" w="49" h="50" draw_type="center" image="neutral_gear" style="default" visible="false" scale_x="1.3" scale_y="1.3" text=""/>
<progress_circle max="255" name="speed_progress" x="100" y="100" w="286" h="222" style="speed_135" value="0"/>
<view name="tire_pressure_view" x="473" y="122" w="313" h="75">
<image name="moto_bg" x="92" y="0" w="130" h="75" draw_type="default" style="default" style:normal:bg_image="demo_moto"/>
<view name="f_view" x="0" y="0" w="92" h="75">
<label name="f_label" x="16" y="6" w="51" h="20" style="tirefont_18" text="Front"/>
<label name="f_unit" x="48" y="32" w="51" h="20" style="tirefont_18" text="bar"/>
<label name="f_data" x="0" y="32" w="50" h="20" style="tirefont_18" text="0.00"/>
<label name="f_temp_unit" x="55" y="52" w="44" h="20" style="tirefont_18" text="°C"/>
<label name="f_temp_data" x="4" y="52" w="50" h="20" style="tirefont_18" text="0"/>
</view>
<view name="r_view" x="227" y="0" w="86" h="75">
<label name="r_label" x="20" y="-1" w="44" h="20" style="tirefont_18" text="Rear"/>
<label name="r_unit" x="55" y="28" w="44" h="20" style="tirefont_18" text="bar"/>
<label name="r_data" x="4" y="28" w="50" h="20" style="tirefont_18" text="0.00"/>
<label name="r_temp_unit" x="55" y="48" w="44" h="20" style="tirefont_18" text="°C"/>
<label name="r_temp_data" x="4" y="48" w="50" h="20" style="tirefont_18" text="0"/>
</view>
<image name="f_error" x="92" y="37" w="40" h="40" draw_type="default" style:normal:bg_image="demo_front_wheel"/>
<image name="r_error" x="184" y="38" w="40" h="40" draw_type="default" style:normal:bg_image="demo_rear_wheel"/>
</view>
<view name="call_view" x="343" y="386" w="447" h="84" visible="false">
<image name="call_img" x="70" y="12" w="38" h="38" draw_type="default" style="default" style:normal:bg_image="call"/>
<label name="call_number" x="108" y="15" w="257" h="33" style:normal:font_size="32" style:normal:text_align_h="left" style:normal:text_color="#FFFFFF" style:normal:font_name="SerpentineSansICG" style:normal:text_align_v="middle" text="999999999999"/>
<label name="call_label" x="117" y="15" w="223" h="33" style:normal:font_name="moto_font" style:normal:font_size="32" style:normal:text_align_h="left" style:normal:text_color="#FFFFFF" visible="false" tr_text="通话中"/>
</view>
</window>

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@
"awtk": ">=2210"
},
"assets": {
"activedTheme": "default",
"activedTheme": "dark",
"outputDir": "res",
"loadFrom": "any",
"const": "resource_data",
@ -58,6 +58,18 @@
"colorDepth": "16bit",
"colorFormat": "BGR(A)"
}
},
"dark": {
"activedSystemBar": "",
"activedBottomSystemBar": "",
"packaged": true,
"fonts": {},
"lcd": {
"width": "800",
"height": "480",
"colorDepth": "16bit",
"colorFormat": "BGR(A)"
}
}
}
},

View File

@ -1,9 +1,10 @@
#include "awtk.h"
#include "base/assets_manager.h"
#include "assets/__assets_default.inc"
#include "assets/__assets_dark.inc"
#ifndef APP_THEME
#define APP_THEME "default"
#define APP_THEME "dark"
#endif /*APP_THEME*/
bool_t assets_has_theme(const char* name) {
@ -11,6 +12,8 @@ bool_t assets_has_theme(const char* name) {
if (tk_str_eq(name, "default")) {
return TRUE;
} else if (tk_str_eq(name, "dark")) {
return TRUE;
} else {
return FALSE;
}
@ -24,6 +27,8 @@ static ret_t assets_init_internal(const char* theme) {
if (tk_str_eq(theme, "default")) {
return assets_init_default();
} else if (tk_str_eq(theme, "dark")) {
return assets_init_dark();
} else {
log_debug("%s not support.\n", theme);
return RET_NOT_IMPL;

View File

@ -0,0 +1,217 @@
#include "awtk.h"
#include "base/assets_manager.h"
#ifndef WITH_FS_RES
extern TK_CONST_DATA_ALIGN(const unsigned char ui_call[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_new[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_prompt[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_settingview11[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_settingview2[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_settingview3[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_settingview4[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_settingview5[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_set_list[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_set_theme[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_set_theme_bg[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_set_time[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_set_tire_pressure[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_ui_demo1[]);
extern TK_CONST_DATA_ALIGN(const unsigned char strings_en_US[]);
extern TK_CONST_DATA_ALIGN(const unsigned char strings_zh_CN[]);
#include "dark/inc/styles/ui_demo1.data"
extern TK_CONST_DATA_ALIGN(const unsigned char style_default[]);
extern TK_CONST_DATA_ALIGN(const unsigned char style_new[]);
extern TK_CONST_DATA_ALIGN(const unsigned char style_select_list[]);
extern TK_CONST_DATA_ALIGN(const unsigned char style_settingview1[]);
extern TK_CONST_DATA_ALIGN(const unsigned char style_settingview11[]);
extern TK_CONST_DATA_ALIGN(const unsigned char style_set_time[]);
#ifdef WITH_STB_IMAGE
#include "dark/inc/images/bar_1.res"
#include "dark/inc/images/bar_2.res"
#include "dark/inc/images/call.res"
#include "dark/inc/images/demo1bg.res"
#include "dark/inc/images/demo_moto.res"
#include "dark/inc/images/neutral_gear.res"
#include "dark/inc/images/rpm_bar_1.res"
#include "dark/inc/images/rpm_bar_2.res"
#include "dark/inc/images/turn_left_icon.res"
#include "dark/inc/images/turn_right_icon.res"
extern TK_CONST_DATA_ALIGN(const unsigned char image_abs[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_ahb[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_auto[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_bar_bg[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_bt[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_cell[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_cell_wn[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_demo_front_wheel[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_demo_rear_wheel[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_dh_bg[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_dh_bg2[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_dh_bg3[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_dh_oil[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_dh_oil_w[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_dh_temp[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_dh_temp_w[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_engine[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_engine_oil[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_enter[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_esp[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_fan[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_front_learing[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_front_normal[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_front_not_learned[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_img_bt[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_img_information[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_img_luminance[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_img_other[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_img_set[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_img_theme[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_1[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_2[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_3[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_4[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_5[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_6[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_distance[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_left[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_right[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_light_vicinity[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_Moto[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_oil[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_oil_wn[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_rear_learing[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_rear_normal[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_rear_not_learned[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_return[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_tcs[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_temp[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_temp_wn[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_theme_demo1_1[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_theme_demo1_2[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_tire_pressure[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_wifi[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_wifi_blk[]);
extern TK_CONST_DATA_ALIGN(const unsigned char image_wifi_connect[]);
#else
#endif /*WITH_STB_IMAGE*/
#ifdef WITH_VGCANVAS
#endif /*WITH_VGCANVAS*/
#ifdef WITH_TRUETYPE_FONT
extern TK_CONST_DATA_ALIGN(const unsigned char font_A27_SYHT_CT[]);
extern TK_CONST_DATA_ALIGN(const unsigned char font_default[]);
extern TK_CONST_DATA_ALIGN(const unsigned char font_moto_font[]);
extern TK_CONST_DATA_ALIGN(const unsigned char font_SerpentineSansICG[]);
extern TK_CONST_DATA_ALIGN(const unsigned char font_Serpentine_MediumOblique[]);
#else /*WITH_TRUETYPE_FONT*/
#endif /*WITH_TRUETYPE_FONT*/
#endif /*WITH_FS_RES*/
ret_t assets_init_dark(void) {
assets_manager_t* am = assets_manager();
#ifdef WITH_FS_RES
assets_manager_preload(am, ASSET_TYPE_STYLE, "default");
#else
assets_manager_add(am, ui_call);
assets_manager_add(am, ui_new);
assets_manager_add(am, ui_prompt);
assets_manager_add(am, ui_settingview11);
assets_manager_add(am, ui_settingview2);
assets_manager_add(am, ui_settingview3);
assets_manager_add(am, ui_settingview4);
assets_manager_add(am, ui_settingview5);
assets_manager_add(am, ui_set_list);
assets_manager_add(am, ui_set_theme);
assets_manager_add(am, ui_set_theme_bg);
assets_manager_add(am, ui_set_time);
assets_manager_add(am, ui_set_tire_pressure);
assets_manager_add(am, ui_ui_demo1);
assets_manager_add(am, strings_en_US);
assets_manager_add(am, strings_zh_CN);
assets_manager_add(am, style_ui_demo1_dark);
assets_manager_add(am, style_default);
assets_manager_add(am, style_new);
assets_manager_add(am, style_select_list);
assets_manager_add(am, style_settingview1);
assets_manager_add(am, style_settingview11);
assets_manager_add(am, style_set_time);
assets_manager_add(am, image_bar_1_dark);
assets_manager_add(am, image_bar_2_dark);
assets_manager_add(am, image_call_dark);
assets_manager_add(am, image_demo1bg_dark);
assets_manager_add(am, image_demo_moto_dark);
assets_manager_add(am, image_neutral_gear_dark);
assets_manager_add(am, image_rpm_bar_1_dark);
assets_manager_add(am, image_rpm_bar_2_dark);
assets_manager_add(am, image_turn_left_icon_dark);
assets_manager_add(am, image_turn_right_icon_dark);
assets_manager_add(am, image_abs);
assets_manager_add(am, image_ahb);
assets_manager_add(am, image_auto);
assets_manager_add(am, image_bar_bg);
assets_manager_add(am, image_bt);
assets_manager_add(am, image_cell);
assets_manager_add(am, image_cell_wn);
assets_manager_add(am, image_demo_front_wheel);
assets_manager_add(am, image_demo_rear_wheel);
assets_manager_add(am, image_dh_bg);
assets_manager_add(am, image_dh_bg2);
assets_manager_add(am, image_dh_bg3);
assets_manager_add(am, image_dh_oil);
assets_manager_add(am, image_dh_oil_w);
assets_manager_add(am, image_dh_temp);
assets_manager_add(am, image_dh_temp_w);
assets_manager_add(am, image_engine);
assets_manager_add(am, image_engine_oil);
assets_manager_add(am, image_enter);
assets_manager_add(am, image_esp);
assets_manager_add(am, image_fan);
assets_manager_add(am, image_front_learing);
assets_manager_add(am, image_front_normal);
assets_manager_add(am, image_front_not_learned);
assets_manager_add(am, image_img_bt);
assets_manager_add(am, image_img_information);
assets_manager_add(am, image_img_luminance);
assets_manager_add(am, image_img_other);
assets_manager_add(am, image_img_set);
assets_manager_add(am, image_img_theme);
assets_manager_add(am, image_light_1);
assets_manager_add(am, image_light_2);
assets_manager_add(am, image_light_3);
assets_manager_add(am, image_light_4);
assets_manager_add(am, image_light_5);
assets_manager_add(am, image_light_6);
assets_manager_add(am, image_light_distance);
assets_manager_add(am, image_light_left);
assets_manager_add(am, image_light_right);
assets_manager_add(am, image_light_vicinity);
assets_manager_add(am, image_Moto);
assets_manager_add(am, image_oil);
assets_manager_add(am, image_oil_wn);
assets_manager_add(am, image_rear_learing);
assets_manager_add(am, image_rear_normal);
assets_manager_add(am, image_rear_not_learned);
assets_manager_add(am, image_return);
assets_manager_add(am, image_tcs);
assets_manager_add(am, image_temp);
assets_manager_add(am, image_temp_wn);
assets_manager_add(am, image_theme_demo1_1);
assets_manager_add(am, image_theme_demo1_2);
assets_manager_add(am, image_tire_pressure);
assets_manager_add(am, image_wifi);
assets_manager_add(am, image_wifi_blk);
assets_manager_add(am, image_wifi_connect);
#ifdef WITH_VGCANVAS
#endif /*WITH_VGCANVAS*/
#ifdef WITH_TRUETYPE_FONT
assets_manager_add(am, font_A27_SYHT_CT);
assets_manager_add(am, font_default);
assets_manager_add(am, font_moto_font);
assets_manager_add(am, font_SerpentineSansICG);
assets_manager_add(am, font_Serpentine_MediumOblique);
#else /*WITH_TRUETYPE_FONT*/
#endif /*WITH_TRUETYPE_FONT*/
#endif
tk_init_assets();
return RET_OK;
}

View File

@ -27,15 +27,18 @@
#ifdef WITH_STB_IMAGE
#include "default/inc/images/abs.res"
#include "default/inc/images/ahb.res"
#include "default/inc/images/bar_bk.res"
#include "default/inc/images/bar_wt.res"
#include "default/inc/images/auto.res"
#include "default/inc/images/bar_1.res"
#include "default/inc/images/bar_2.res"
#include "default/inc/images/bar_bg.res"
#include "default/inc/images/bt.res"
#include "default/inc/images/call_bk.res"
#include "default/inc/images/call_wt.res"
#include "default/inc/images/call.res"
#include "default/inc/images/cell.res"
#include "default/inc/images/cell_wn.res"
#include "default/inc/images/demo1bg_bk.res"
#include "default/inc/images/demo1bg_wt.res"
#include "default/inc/images/demo1bg.res"
#include "default/inc/images/demo_front_wheel.res"
#include "default/inc/images/demo_moto.res"
#include "default/inc/images/demo_rear_wheel.res"
#include "default/inc/images/dh_bg.res"
#include "default/inc/images/dh_bg2.res"
#include "default/inc/images/dh_bg3.res"
@ -44,16 +47,19 @@
#include "default/inc/images/dh_temp.res"
#include "default/inc/images/dh_temp_w.res"
#include "default/inc/images/engine.res"
#include "default/inc/images/engine_oil.res"
#include "default/inc/images/enter.res"
#include "default/inc/images/esp.res"
#include "default/inc/images/fan.res"
#include "default/inc/images/front_learing.res"
#include "default/inc/images/front_normal.res"
#include "default/inc/images/front_not_learned.res"
#include "default/inc/images/img_bt.res"
#include "default/inc/images/img_information.res"
#include "default/inc/images/img_luminance.res"
#include "default/inc/images/img_other.res"
#include "default/inc/images/img_set.res"
#include "default/inc/images/img_theme.res"
#include "default/inc/images/left_bk.res"
#include "default/inc/images/left_wt.res"
#include "default/inc/images/light_1.res"
#include "default/inc/images/light_2.res"
#include "default/inc/images/light_3.res"
@ -64,31 +70,24 @@
#include "default/inc/images/light_left.res"
#include "default/inc/images/light_right.res"
#include "default/inc/images/light_vicinity.res"
#include "default/inc/images/Moto.res"
#include "default/inc/images/neutral_gear.res"
#include "default/inc/images/oil.res"
#include "default/inc/images/oil_bk.res"
#include "default/inc/images/oil_blk.res"
#include "default/inc/images/oil_warning.res"
#include "default/inc/images/oil_warning2.res"
#include "default/inc/images/oil_wn.res"
#include "default/inc/images/oil_wt.res"
#include "default/inc/images/rear_learing.res"
#include "default/inc/images/rear_normal.res"
#include "default/inc/images/rear_not_learned.res"
#include "default/inc/images/return.res"
#include "default/inc/images/rev_green_bk.res"
#include "default/inc/images/rev_green_wt.res"
#include "default/inc/images/rev_red_bk.res"
#include "default/inc/images/rev_red_wt.res"
#include "default/inc/images/right_bk.res"
#include "default/inc/images/right_wt.res"
#include "default/inc/images/rpm_bar_1.res"
#include "default/inc/images/rpm_bar_2.res"
#include "default/inc/images/tcs.res"
#include "default/inc/images/Tem.res"
#include "default/inc/images/temp.res"
#include "default/inc/images/temp_bk.res"
#include "default/inc/images/temp_wn.res"
#include "default/inc/images/temp_wt.res"
#include "default/inc/images/Tem_blk.res"
#include "default/inc/images/Tem_warning.res"
#include "default/inc/images/theme_demo1_1.res"
#include "default/inc/images/theme_demo1_2.res"
#include "default/inc/images/tire_pressure.res"
#include "default/inc/images/turn_left_icon.res"
#include "default/inc/images/turn_right_icon.res"
#include "default/inc/images/wifi.res"
#include "default/inc/images/wifi_blk.res"
#include "default/inc/images/wifi_connect.res"
@ -137,15 +136,18 @@ ret_t assets_init_default(void) {
assets_manager_add(am, style_ui_demo1);
assets_manager_add(am, image_abs);
assets_manager_add(am, image_ahb);
assets_manager_add(am, image_bar_bk);
assets_manager_add(am, image_bar_wt);
assets_manager_add(am, image_auto);
assets_manager_add(am, image_bar_1);
assets_manager_add(am, image_bar_2);
assets_manager_add(am, image_bar_bg);
assets_manager_add(am, image_bt);
assets_manager_add(am, image_call_bk);
assets_manager_add(am, image_call_wt);
assets_manager_add(am, image_call);
assets_manager_add(am, image_cell);
assets_manager_add(am, image_cell_wn);
assets_manager_add(am, image_demo1bg_bk);
assets_manager_add(am, image_demo1bg_wt);
assets_manager_add(am, image_demo1bg);
assets_manager_add(am, image_demo_front_wheel);
assets_manager_add(am, image_demo_moto);
assets_manager_add(am, image_demo_rear_wheel);
assets_manager_add(am, image_dh_bg);
assets_manager_add(am, image_dh_bg2);
assets_manager_add(am, image_dh_bg3);
@ -154,16 +156,19 @@ ret_t assets_init_default(void) {
assets_manager_add(am, image_dh_temp);
assets_manager_add(am, image_dh_temp_w);
assets_manager_add(am, image_engine);
assets_manager_add(am, image_engine_oil);
assets_manager_add(am, image_enter);
assets_manager_add(am, image_esp);
assets_manager_add(am, image_fan);
assets_manager_add(am, image_front_learing);
assets_manager_add(am, image_front_normal);
assets_manager_add(am, image_front_not_learned);
assets_manager_add(am, image_img_bt);
assets_manager_add(am, image_img_information);
assets_manager_add(am, image_img_luminance);
assets_manager_add(am, image_img_other);
assets_manager_add(am, image_img_set);
assets_manager_add(am, image_img_theme);
assets_manager_add(am, image_left_bk);
assets_manager_add(am, image_left_wt);
assets_manager_add(am, image_light_1);
assets_manager_add(am, image_light_2);
assets_manager_add(am, image_light_3);
@ -174,31 +179,24 @@ ret_t assets_init_default(void) {
assets_manager_add(am, image_light_left);
assets_manager_add(am, image_light_right);
assets_manager_add(am, image_light_vicinity);
assets_manager_add(am, image_Moto);
assets_manager_add(am, image_neutral_gear);
assets_manager_add(am, image_oil);
assets_manager_add(am, image_oil_bk);
assets_manager_add(am, image_oil_blk);
assets_manager_add(am, image_oil_warning);
assets_manager_add(am, image_oil_warning2);
assets_manager_add(am, image_oil_wn);
assets_manager_add(am, image_oil_wt);
assets_manager_add(am, image_rear_learing);
assets_manager_add(am, image_rear_normal);
assets_manager_add(am, image_rear_not_learned);
assets_manager_add(am, image_return);
assets_manager_add(am, image_rev_green_bk);
assets_manager_add(am, image_rev_green_wt);
assets_manager_add(am, image_rev_red_bk);
assets_manager_add(am, image_rev_red_wt);
assets_manager_add(am, image_right_bk);
assets_manager_add(am, image_right_wt);
assets_manager_add(am, image_rpm_bar_1);
assets_manager_add(am, image_rpm_bar_2);
assets_manager_add(am, image_tcs);
assets_manager_add(am, image_Tem);
assets_manager_add(am, image_temp);
assets_manager_add(am, image_temp_bk);
assets_manager_add(am, image_temp_wn);
assets_manager_add(am, image_temp_wt);
assets_manager_add(am, image_Tem_blk);
assets_manager_add(am, image_Tem_warning);
assets_manager_add(am, image_theme_demo1_1);
assets_manager_add(am, image_theme_demo1_2);
assets_manager_add(am, image_tire_pressure);
assets_manager_add(am, image_turn_left_icon);
assets_manager_add(am, image_turn_right_icon);
assets_manager_add(am, image_wifi);
assets_manager_add(am, image_wifi_blk);
assets_manager_add(am, image_wifi_connect);

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Some files were not shown because too many files have changed in this diff Show More