A270S生产版本更新
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
File diff suppressed because one or more lines are too long
@ -171,7 +171,6 @@
|
||||
#include "default/inc/images/time_select.res"
|
||||
#include "default/inc/images/tire.res"
|
||||
#include "default/inc/images/wifi.res"
|
||||
#include "default/inc/images/_12_1x.res"
|
||||
#else
|
||||
#endif /*WITH_STB_IMAGE*/
|
||||
#ifdef WITH_VGCANVAS
|
||||
@ -360,7 +359,6 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, image_time_select);
|
||||
assets_manager_add(am, image_tire);
|
||||
assets_manager_add(am, image_wifi);
|
||||
assets_manager_add(am, image__12_1x);
|
||||
#ifdef WITH_VGCANVAS
|
||||
#endif /*WITH_VGCANVAS*/
|
||||
#ifdef WITH_TRUETYPE_FONT
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
@ -171,7 +171,6 @@
|
||||
#include "assets/default/inc/images/time_select.res"
|
||||
#include "assets/default/inc/images/tire.res"
|
||||
#include "assets/default/inc/images/wifi.res"
|
||||
#include "assets/default/inc/images/_12_1x.res"
|
||||
#else
|
||||
#endif /*WITH_STB_IMAGE*/
|
||||
#ifdef WITH_VGCANVAS
|
||||
@ -361,7 +360,6 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, image_time_select);
|
||||
assets_manager_add(am, image_tire);
|
||||
assets_manager_add(am, image_wifi);
|
||||
assets_manager_add(am, image__12_1x);
|
||||
#ifdef WITH_VGCANVAS
|
||||
#endif /*WITH_VGCANVAS*/
|
||||
#ifdef WITH_TRUETYPE_FONT
|
||||
|
Binary file not shown.
@ -179,16 +179,21 @@ uint8_t Get_sys_bt_on_off(void)
|
||||
{
|
||||
return custom_data.user_data.bt_on_off;
|
||||
}
|
||||
extern uint8_t bt121_state;
|
||||
void Set_sys_bt_on_off(uint8_t value)
|
||||
{
|
||||
if(value != custom_data.user_data.bt_on_off){
|
||||
if(value == NULL ){
|
||||
if(!value){
|
||||
custom_data.user_data.bt_on_off = 0;
|
||||
custom_data.bt_connect_state = 0;
|
||||
custom_data.call.call_state = 0;
|
||||
}else
|
||||
custom_data.user_data.bt_on_off = value;
|
||||
SaveDataToFlash(custom_data.user_data);//保存数据
|
||||
|
||||
Set_sys_return_demo(2);
|
||||
if(Get_sys_power_on_self_test())
|
||||
SaveDataToFlash(custom_data.user_data);//保存数据
|
||||
bt121_state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,7 +204,10 @@ uint8_t Get_sys_bt_connect_state(void)
|
||||
void Set_sys_bt_connect_state(uint8_t value)
|
||||
{
|
||||
// printf("Get_sys_bt_connect_state = %d .\r\n",value);
|
||||
if(value != custom_data.bt_connect_state){
|
||||
if(!value){
|
||||
custom_data.bt_connect_state = 0;
|
||||
custom_data.call.call_state = 0;
|
||||
}else if(value != custom_data.bt_connect_state){
|
||||
custom_data.bt_connect_state = value;
|
||||
}
|
||||
//gpio_direction_output(46,1);
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#elif (MOTO_WARE_HOSE == MOTO_ICMX_GB518_A270S)
|
||||
#define SOFT_WARE_HOST 0
|
||||
#define SOFT_WARE_ORDER 11
|
||||
#define SOFT_WARE_ORDER 13
|
||||
#define HARD_WARE "MXC-A27-M V4.5"
|
||||
#define KEY_EXCHANGE 1
|
||||
#define MCU_INFO_LABEL "A270S"
|
||||
|
@ -188,7 +188,7 @@ ret_t long_key_event_handling(uint8_t key){
|
||||
widget_t* win = window_manager();
|
||||
widget_t* child = window_manager_get_top_main_window(win);
|
||||
widget_t* widget = NULL;
|
||||
printf("long_key_event_handling ------------------------ .\r\n");
|
||||
// printf("long_key_event_handling ------------------------ .\r\n");
|
||||
|
||||
if(key == TK_KEY_w){ //设置按键 小计清零
|
||||
// printf("w> child->name = %s .\r\n",child->name);
|
||||
|
@ -765,11 +765,52 @@ static ret_t on_home_page_key_down(void* ctx, event_t* e) {
|
||||
}
|
||||
|
||||
}else{
|
||||
if(evt->key == TK_KEY_w){//接听
|
||||
Set_sys_call_key_state(1);
|
||||
}else if(evt->key == TK_KEY_q){//挂断
|
||||
Set_sys_call_key_state(2);
|
||||
}
|
||||
|
||||
#ifndef AMT630HV100
|
||||
if(evt->key == TK_KEY_w){//接听
|
||||
Set_sys_call_state(2);
|
||||
}else if(evt->key == TK_KEY_q){//挂断
|
||||
Set_sys_call_state(0);
|
||||
}
|
||||
#else
|
||||
#if (CALL_BW121_KEY)
|
||||
switch(Get_sys_call_state()){
|
||||
case 1:
|
||||
case 2:
|
||||
if(evt->key == TK_KEY_w){//接听
|
||||
console_send_atcmd("AT+HFPANSW\r\n", strlen("AT+HFPANSW\r\n"));//接听
|
||||
}else if(evt->key == TK_KEY_q){//挂断
|
||||
console_send_atcmd("AT+HFPCHUP\r\n", strlen("AT+HFPCHUP\r\n"));//拒接
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if(evt->key == TK_KEY_w){//接听第三方来电
|
||||
console_send_atcmd("AT+HFPMCAL=2\r\n", strlen("AT+HFPMCAL=2\r\n"));
|
||||
}else if(evt->key == TK_KEY_q){//挂断第三方来电
|
||||
console_send_atcmd("AT+HFPMCAL=0\r\n", strlen("AT+HFPMCAL=0\r\n"));
|
||||
}
|
||||
break;
|
||||
case 4://三方通话时 一个电话接听一个电话保持状态
|
||||
if(evt->key == TK_KEY_w){//切换当前正常通话为保持,将保持通话切换为正常通话
|
||||
console_send_atcmd("AT+HFPMCAL=2\r\n", strlen("AT+HFPMCAL=2\r\n"));
|
||||
}else if(evt->key == TK_KEY_q){//挂断当前通话电话
|
||||
console_send_atcmd("AT+HFPMCAL=1\r\n", strlen("AT+HFPMCAL=1\r\n"));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
if(evt->key == TK_KEY_w){//接听
|
||||
Set_sys_call_key_state(1);
|
||||
}else if(evt->key == TK_KEY_q){//挂断
|
||||
Set_sys_call_key_state(2);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -816,7 +857,7 @@ ret_t home_page_init(widget_t* win, void* ctx) {
|
||||
light_refresh(win);
|
||||
tire_pressure_init(win);
|
||||
}
|
||||
printf("home_page_init--------------------\r\n");
|
||||
// printf("home_page_init--------------------\r\n");
|
||||
// widget_add_timer(win, ui_refresh, 100);//进度条颜色刷新
|
||||
extern uint8_t button_flag;
|
||||
if(button_flag==0)
|
||||
|
@ -120,6 +120,16 @@ void A27_BT_init(void){
|
||||
printf("BW121 HFP >> Open .\r\n");
|
||||
console_send_atcmd("AT+HFPCFG=5\r\n", strlen("AT+HFPCFG=5\r\n"));//开三方通话使能
|
||||
|
||||
#ifdef AMT630HV100
|
||||
vTaskDelay(10);
|
||||
#else
|
||||
sleep_ms(10);
|
||||
#endif
|
||||
|
||||
printf("BW121 A2D >> Close .\r\n");//若仪表不需要声音,这一块则直接屏蔽声音,保证手机和仪表接入时声音不会走到仪表通道
|
||||
console_send_atcmd("AT+PROFILE=50314\r\n", strlen("AT+PROFILE=50314\r\n"));//查询profile使能
|
||||
|
||||
|
||||
#else
|
||||
if(Get_sys_bt_on_off()==0){
|
||||
DEBUG_PRINT("BT_SWITCH close .\r\n");
|
||||
@ -473,18 +483,18 @@ static ret_t on_timer(const idle_info_t* idle){
|
||||
if(bw_121_time)//蓝牙按钮时间控制
|
||||
bw_121_time--;
|
||||
|
||||
//串口检测蓝牙通讯
|
||||
if(uart_state && (Get_sys_bt_upgrade()==0 && Get_sys_upgrade_Flag()==0)){
|
||||
uart_state--;
|
||||
if(!uart_state){
|
||||
printf("uart3 >gpio.\r\n");
|
||||
UART3_Modification_Type();//将通讯串口配置为gpio端口
|
||||
}
|
||||
}else{
|
||||
uart_state = 5;
|
||||
printf("uart3 > regression.\r\n");
|
||||
UART3_Type_regression();//串口恢复正常
|
||||
}
|
||||
// //串口检测蓝牙通讯
|
||||
// if(uart_state && (Get_sys_bt_upgrade()==0 && Get_sys_upgrade_Flag()==0)){
|
||||
// uart_state--;
|
||||
// if(!uart_state){
|
||||
// printf("uart3 >gpio.\r\n");
|
||||
// UART3_Modification_Type();//将通讯串口配置为gpio端口
|
||||
// }
|
||||
// }else{
|
||||
// uart_state = 5;
|
||||
// printf("uart3 > regression.\r\n");
|
||||
// UART3_Type_regression();//串口恢复正常
|
||||
// }
|
||||
|
||||
//串口检测蓝牙心跳 + 接收发送
|
||||
if(bt_communication_heartbeat && (Get_sys_bt_upgrade()==0 && Get_sys_upgrade_Flag()==0)){
|
||||
@ -504,7 +514,7 @@ static ret_t on_timer(const idle_info_t* idle){
|
||||
dh = 0;
|
||||
}
|
||||
|
||||
printf("test_total=%d,mile_total=%d.\r\n",test_total,mile_total);
|
||||
// printf("test_total=%d,mile_total=%d.\r\n",test_total,mile_total);
|
||||
|
||||
idletick = xTaskGetTickCount();
|
||||
}
|
||||
|
Reference in New Issue
Block a user