A27快排版本和A270Y版本更新提交

This commit is contained in:
2025-06-11 17:16:43 +08:00
parent 0113a2a2b1
commit 364af82a07
42 changed files with 57337 additions and 59184 deletions

View File

@ -3,288 +3,259 @@
#include "ECTypes.h"
#define ECSDK_VERSION "1.0.10"
#define ECSDK_VERSION "1.0.13.1"
typedef struct {
/**
* @brief 互联连接状态回调函数
* @param status 互联连接状态
* @param type 互联连接类型
* @note 此函数是非常重要的回调函数。它会返回整个互联的状态。
* 有部分互联功能接口比如EC_startMirror()/EC_enableDownloadPhoneAppHud()/EC_enableDownloadPhoneAppHud() 等,
* 都需要 status为 EC_CONNECT_STATUS_CONNECT_SUCCEED 时,调用才能生效。
* 因为这些接口都是在互联成功之后(ECTiny与手机app建立了通讯)才能发指令给手机app对应功能才能开启。
*/
void (*onECConnectStatus)(ECConnectedStatus status, ECConnectedType type);
void (*onMirrorStatus)(ECMirrorStatus status);
/**
* @brief Called when EasyConnected status changed.
*
* @param status The changed EasyConnected message.
* @brief 投屏状态
* @param status 互联投屏状态
*/
void (*onMirrorStatus)(ECMirrorStatus status);
/**
* @brief 互联状态变更通知
* @param status 变更的状态
*/
void (*onECStatusMessage)(ECStatusMessage status);
/**
* @brief Called when the phone app sends down HUD information.
*
* @param data HUD information.
* @brief 手机下发HUD信息时回调
* @param data HUD信息
*/
void (*onPhoneAppHUD)(const ECNavigationHudInfo *data);
/**
* @brief Called when the phone app sends down HUD Road Junction Picture.
* @brief 手机下发道路引导图时回调
* @param data
*/
void (*onPhoneAppHUDRoadJunctionPicture)(const ECHudRoadJunctionPictureInfo* data);
/*
* @brief Called when phone app tell the music info.
*
* @param data The information of music.
*/
/**
* @brief 手机音乐信息变化时回调
* @param data
*/
void (*onPhoneAppMusicInfo)(const ECAppMusicInfo *data);
/**
* @brief Called when the phone app sends down some information.
*
* @param data Buffer of app information.
*
* @param length Buffer length.
*
* @note data is json string, the fields includes os, osVersion and ip.
* Called when ECSDK::openTransport succeed.
* @brief 手机下发app信息时回调
* @param data app信息
* @param length app信息长度
* @note data 是json字符串, 包括手机类型、系统版本、ip地址等。
* ECTiny 与 手机app建立通讯后会回调此函数
*/
void (*onPhoneAppInfo)(const void *data, uint32_t length);
/**
* @brief Called when ECSDK wants car to do call operations(dial or hang up) via Bluetooth.
*
* @param type Operation type.
*
* @param name The person's name of corresponding number.
*
* @param number Phone numbers.
*
* @note Phone app is not able to dial or hang up automatically due to the latest system access limitation,
* however, car is able to do it via Bluetooth. Therefore, ECSDK moves the call operations
* to car, which can dial or hang up when this method is called.
* @brief 需要拨打或者挂断蓝牙电话时回调
* @param type 操作类型
* @param name 电话拨打的姓名
* @param number 电话号码
* @note 受限于Android/iOS系统的权限在车机上点击互联投屏的过来的拨打电话ECTiny无法完成电话的拨打和接听操作因此需要依赖于车机系统的蓝牙模块完成。
* 车机的投屏界面上点击拨打蓝牙电话时,此回调函数会把拨打的用户姓名和电话号码传到车机上,由车机蓝牙模块完成电话的拨打
* 1.需要车机端作为蓝牙免提设备Hand-Free-Device
* 2.亿连的蓝牙电话功能需要在车机和手机的HFP保持连接后才可以正常启用。
*/
void (*onCallAction)(ECCallType type, const char *name, const char *number);
/**
* @brief Called when bulk data is received.
*
* @brief 接收手机端发送的数据块
* @param data Buffer of bulk data.
*
* @param length Buffer length.
*
*/
void (*onBulkDataReceived)(const void *data, uint32_t length);
/**
* @brief onRealMirrorSizeChanged
* @param realWidth
* @param realHeight
*
* \note The actual size of the projection screen does not equal the size of the video stream in some cases.
* The surrounding area is filled with black. This message calls back the actual size of the projection screen
* @brief 投屏状态变更
* @param ECVideoInfo 视屏参数
* @note 投屏的实际宽高、横竖屏切换时回调此函数
*/
void (*onMirrorInfoChanged)(const ECVideoInfo *info);
/**
* @brief Called when the license authorization failed. After this interface was called,
* all connections would be forced closed.
*
* @param errCode Error code.
*
* @param errMsg Error message.
* @brief 鉴权失败时回调此函数。ECTiny功能全部不可用
* @param errCode 主要用于亿连后台进行排查的错误码,无需关心具体值。
* @param errMsg 错误信息。
* @note 此回调函数需要处理,当出现激活失败时给与提示。
* 该回调一般出现在互联建立过程中出现时ECTiny会在内部进行释放动作。
* ECTiny使用者需要保证合法的激活校验流程之后重新初始化ECSDK方可使用。
*/
void (*onLicenseAuthFail)(int32_t errCode, const char *errMsg);
/**
* @brief Called when the license authorization succeed.
*
* @param code success code. The code can gain specific meaning by ECAuthSuccessCode.
*
* @param msg success information.
*
* @param msg the description information.
*
* @brief 鉴权成时回调此函数
* @param code 正常错误码,无需关心具体值。
* @param msg 正常激活log信息。
* @note 该接口回调一般出现在互联建立过程中在首次进行激活手机IME号备案激活回调会包含剩余数量等信息SDK使用者可根据具体的使用场景进行相关展示。
*/
void (*onLicenseAuthSuccess)(int32_t code, const char *msg);
/**
* @brief Called when registered command was triggered by VR.
*
* @param carCmd The triggered command.
*
* @note Voice control can be implemented with this method by VR.
*
* @see ECSDK::registerCarCmds
* @brief 当注册的控车指令被vr激活时回调
* @param carCmd 触发的控车指令
* @see EC_registerCarCmds()
*/
void (*onCarCmdNotified)(const ECCarCmd *carCmd);
/**
* @brief Called when phone app request the HU to start input.
*
* @param info relevant parameters about the input.
* @brief 监听手机端文字输入
* @param info 当前需要输入的文字信息包括输入类型文字、数字、电话号码等最大输入长度默认的文字最大行数以及Enter键默认的显示效果及动作。
* @note 监听手机端输入法的开始输入状态,并传递此次输入文字的相关信息。
*/
void (*onInputStart)(const ECInputInfo *info);
/**
* @brief Called when phone app request the HU to cancel input.
* @note 监听手机端输入法的结束或者取消的状态,此时车机端键盘也需要取消。
*/
void (*onInputCancel)();
/**
* @brief Called when phone app tell the selection of input.
* @brief 监听手机端输入光标位置、选择状态信息
* @param start 光标开始的位置
* @param stop 光标结束的位置
* @note 监听手机端输入文字的选择状态,光标状态,车机端并做状态展示。仅对安卓手机有效,苹果手机互联无此回调。
*/
void (*onInputSelection)(int32_t start, int32_t stop);
/**
* @brief Called when phone app tell the text of input.
* @brief 同步当前手机端的文字信息到车机
* @param text 当前手机端输入的文字信息。
* @note 如在手机端也对输入框内的文字进行输入,需要同步至车机端,保持车机端和手机端的状态同步。
*/
void (*onInputText)(const char *text);
/**
* @brief Called when phone app send the text of VR or TTS.
* @brief 对识别内容进行展示
* @param info 手机端语音引擎识别后的文字内容信息。
*/
void (*onVRTextReceived)(const ECVRTextInfo *info);
/**
* @brief Called when phone app tell the page list.
*
* @param pages Array of the struct ECPageInfo.
*
* @param length The length of the array.
* @brief 获取快捷方式列表信息
* @param pages 返回快捷方式的数组,参考 ECTypes.h 的 ECPageInfo 定义主要包含图标的编号、名称、icon的唯一标识信息
* @param length pages数组长度
* @note ECPageInfo::page 字段标识了每一个快捷方式的唯一标识,通过该标识,可以实现两个主要的功能:
* 1. 通过page编号可以通过调用 ECSDK::queryPageIcon 获取快捷方式的图标资源。
* 2. 通过page编号可以通过调用 ECSDK::openAppPage 实现快捷打开对应指定手机APP页面
*/
void (*onPageListReceived)(const ECPageInfo *pages, int32_t length);
/**
* @brief Called when phone app tell the icons.
*
* @param icons Array of the struct ECIconInfo.
*
* @param length The length of the array.
* @brief 手机app回调图标信息
* @param icons 返回快捷方式图标资源的数组,参考 ECTypes.h 的 ECIconInfo 定义主要包含icon的编号、icon的格式、icon图像数据、icon的数据长度
* @param length icons的数组长度。
*/
void (*onPageIconReceived)(const ECIconInfo *icons, int32_t length);
/**
* @brief Called when phone app tell weather.
*
* @param data Buffer of weather information.
*
* @param length Buffer length.
*
* @note data pointed to a json string buffer.
* @brief 回调天气信息
* @param data 天气信息字符串
* @param length 字符串长度
* @note data 是一个固定格式的json字符串
*/
void (*onWeatherReceived)(const char *data, int32_t length);
/**
* @brief Called when phone app tell vr tips.
*
* @param data Buffer of tips information.
*
* @param length Buffer length.
*
* @note data pointed to a json string buffer.
* @brief 请求VR提醒文字
* @param data VR文字
* @param length data长度
* @note data是一个json字符串
* 在使用车机端本地语音助手时,一般需要有一些常驻提示类的使用帮助,这些文字主要通过手机端传输至车机端,由车机端系统完成展示。
*/
void (*onVRTipsReceived)(const char *data, int32_t length);
/**
* @brief Called when the app requests networking
*
* @param clientInfo Mobile phone related information
*
* @note
* @brief 手机app发送到车机的请求组网
* @param clientInfo 手机app的相关信息
* @note 此回调用于BLE组网
*/
void (*onRequestBuildNet)(const ECBTClientInfo *clientInfo);
/**
* @brief Called when canceling networking
*
* @note
* @brief 手机app取消组网时回调
* @note 此回调用于BLE组网
*/
void (*onRequestBuildNetCancel)();
/**
* @brief Called when networking is completed
*
* @note
* @brief 手机app组网完成时回调
* @note 此回调用于BLE组网
*/
void (*onPhoneBuildNetFinish)();
void (*onPhoneBuildNetFinish)(const char* ip);
/**
* @brief Called when app sends AP information
*
* @param netDeviceInfo AP information
*
* @note
* @brief 手机app通知车机手机创建的ap信息
* @param netDeviceInfo AP信息
* @note 此回调用于BLE组网
*/
void (*onPhoneAPInfo)(const ECBTNetInfo* netDeviceInfo);
/**
* @brief Called when mobile phone has a notification message.
* @param notification
* @brief 收到手机消息通知时回调
* @param notification 消息通知
* @note 允许下发手机消息通知功能开启后,当收到短信、微信等消息时,此函数会回调消息到车机
* @see EC_requestPhoneNotification()
*/
void (*onPhoneNotification)(const ECPhoneNotification* notification);
/**
* @brief Called when the phone app sends down HUD lane guidance Picture.
* @param notification
* @brief HUD道路引导图
* @param notification 引导图信息
* @note 下发HUD导航功能开启后导航时有道路引导图时此函数会回调
* @see EC_enableDownloadPhoneAppHud()
*/
void (*onPhoneAppHUDLaneGuidancePicture)(const ECHudLaneGuidancePictureInfo * data);
/**
* @brief Called when checkOTAUpdate was called, it will tell the result of checkOTAUpdate.
*
* @param downloadableSoftwares It pointer to a array of ECOTAUpdateSoftware, which is downloadable software.
*
* @param downloadableLength The length of the downloadable array, if downloadableLength < 0, means check occur error, downloadableLength is error value of ECOTAUpdateErrorCode.
*
* @param downloadedSoftwares It pointer to a array of ECOTAUpdateSoftware, which is downloaded software.
*
* @param downloadedLength The length of the downloaded array.
* @brief 检测更新函数 EC_checkOTAUpdate()调用后, 此回调函数返回结果
* @param downloadableSoftwares 可下载的软件包数组
* @param downloadableLength 可下载的软件包数组大小, 如果 downloadableLength < 0 标识出现错误, 错误码参考ECOTAUpdateErrorCode.
* @param downloadedSoftwares 已下载的软件包数组
* @param downloadedLength 已下载的软件包数组大小
*/
void (*onOTAUpdateCheckResult)(const ECOTAUpdateSoftware* downloadableSoftwares, const int32_t downloadableLength, const ECOTAUpdateSoftware* downloadedSoftwares, const uint32_t downloadedLength);
/**
* @brief Called when remote downloadable software has been downloaded to phone.
*
* @param downloadableSoftwares It pointer to a array of ECOTAUpdateSoftware, which has been in phone, can be downloaded from phone to HU.
*
* @param downloadableLength The length of the downloadable array.
* @brief 有软件包请求下载手机时回调
* @param downloadableSoftwares 可下载的软件包数组
* @param downloadableLength 可下载软件包数组大小
* @note 软件包已存在手机,请求下载到车机
*/
void (*onOTAUpdateRequestDownload)(const ECOTAUpdateSoftware* downloadableSoftwares, const uint32_t downloadableLength);
/**
* @brief Called when startOTAUpdate is called, it will notify the progress of downloading.
*
* @param downloadingSoftwareId The id of the downloading software.
*
* @param progress The progress of the downloading software,which is a percentage.
*
* @param softwareLeftTime The left time of the downloading software.
*
* @param otaLeftTime The left time of all the specified software by startOTAUpdate.
* @brief EC_startOTAUpdate()调用之后, 此回调函数会回调下载进度
* @param downloadingSoftwareId 下载的软件ID
* @param progress 下载的进度
* @param softwareLeftTime 剩余下载时间
* @param otaLeftTime OTA剩余时间
*/
void (*onOTAUpdateProgress)(const char* downloadingSoftwareId, float progress, uint32_t softwareLeftTime, uint32_t otaLeftTime);
/**
* @brief Called when startOTAUpdate is called, it will notify software is downloaded.
*
* @param downloadedSoftwareId The id of the downloaded software.
*
* @param md5Path The md5 file path.
*
* @param packagePath The software path.
*
* @param iconPath The icon path.
*
* @param leftSoftwareNum The amount of software remaining to be downloaded.
* @brief EC_startOTAUpdate()调用之后, 下载完成时回调此函数
* @param downloadedSoftwareId 下载的软件ID
* @param md5Path md5文件路径
* @param packagePath 升级包路径
* @param iconPath 图标路径
* @param leftSoftwareNum 剩余下载数量
*/
void (*onOTAUpdateCompleted)(const char* downloadedSoftwareId, const char* md5Path, const char* packagePath, const char* iconPath, uint32_t leftSoftwareNum);
/**
* @brief Called when checkOTAUpdate or startOTAUpdate failed.
*
* @param errCode error code, see ECOTAUpdateErrorCode.
*
* @param softwarId the id of software.
* @brief EC_checkOTAUpdate() 或者 EC_startOTAUpdate() 调用过程出错回调此函数
* @param errCode 错误码, 参考ECOTAUpdateErrorCode.
* @param softwarId 软件id
*/
void (*onOTAUpdateError)(int32_t errCode, const char* softwareId);
@ -815,7 +786,7 @@ const char* EC_generateQRCodeUrl(ECQRInfo* info);
* @param enable 0禁止 1允许
* @return EC_OK 为成功,其余值为失败。
*/
int32_t EC_requestPhoneNotification(int32_t enable);
int32_t EC_requestPhoneNotification(uint32_t enable);
/**
* @brief 检测OTA升级

View File

@ -194,6 +194,18 @@ enum ECProjectFlavor
};
typedef enum ECProjectFlavor ECProjectFlavor;
/**
* @enum ECAuthCheckMode
*
*/
enum ECAuthCheckMode {
EC_AUTH_CHECK_DEFAULT = 0, ///< default check auth on phone
EC_AUTH_CHECK_ON_CAR_NETWORK = 1, ///< check auth on car network
EC_AUTH_CHECK_SCAN_CODE_TO_ACTIVATE_FOR_SUDING = 2, ///< scan the code to activate the certificate for suding
EC_AUTH_CHECK_SCAN_CODE_TO_ACTIVATE = 4, ///< scan the code to activate the certificate
};
typedef enum ECAuthCheckMode ECAuthCheckMode;
/**
* @struct ECAuthentication
*
@ -205,7 +217,7 @@ struct ECAuthentication
char pwd[1024]; ///< the specific password for authentication powered by Carbit.
char versionName[1024]; ///< the version name of EasyConn.
uint32_t versionCode; ///< the version code of EasyConn.
uint32_t autoAuthViaCar; ///< specify whether make automatic authentication via car's network.
uint32_t authCheckMode; ///< the value of auth check model refer to ECAuthCheckMode.
ECProjectFlavor flavor; ///< specify the HU Project market for sale,SDK will carry a flavor by default.see enum ECProjectFlavor in ECTypes.h
char reserve[256]; ///< reserve
};
@ -373,11 +385,22 @@ struct ECOptions
ECMirrorMode mirrorMode; ///< tell the app of connected phone which mirror mode would be used.
uint32_t bluetoothPolicy; ///< the policy of A2DP message phone sent to the car.
uint32_t disableShowCallInfo; ///< true:Don't show call info
uint32_t disablePageInRVMap; ///< Block display of some page
uint32_t socketTimeoutPeriod; ///< socket timeout period in seconds
char reserve[256]; ///< reserve
};
typedef struct ECOptions ECOptions;
/**
* @enum ECDisablePageInRVMap
*
*/
enum ECDisablePageInRVMap {
EC_DISABLE_PAGEINRVMAP_CALLPHONE = 0x0001, ///< Block call display
EC_DISABLE_PAGEINRVMAP_MUSIC = 0x0002, ///< Block music display
EC_DISABLE_PAGEINRVMAP_MESSAGE = 0x0004, ///< Block message display
};
/**
* @enum ECTransportType
*

View File

@ -13,8 +13,6 @@
#include "carlink_common.h"
#include "carlink_video.h"
//不支持ble组网
#if CARLINK_EC
#include "ECTiny.h"
#include "ECTypes.h"
@ -36,6 +34,9 @@ static ECQRInfo qr_info;
extern int wps_connect_done;
static bool g_ec_disable = false;
struct ICalinkEventCallbacks gCarlinkECEventCB;
#if ENABLE_EC_DASHCAM
int start_http_camera();
void stop_http_camera();
@ -191,7 +192,7 @@ void onRequestBuildNetCancel()
}
void onPhoneBuildNetFinish()
void onPhoneBuildNetFinish(char const *str)
{
}
@ -544,10 +545,10 @@ void testThread()
{
int ret = carlink_common_init();
ret = carlink_bt_wifi_init();
struct ICalinkEventCallbacks carlinkEventCB = {0};
carlinkEventCB.onEvent = onEventEC;
carlinkEventCB.rfcomm_data_read = ec_ble_data_read;
carlink_register_event_callbacks(&carlinkEventCB);
gCarlinkECEventCB.onEvent = onEventEC;
gCarlinkECEventCB.rfcomm_data_read = ec_ble_data_read;
carlink_register_event_callbacks(&gCarlinkECEventCB);
initECTiny(NULL);
}

View File

@ -343,3 +343,5 @@ int ark_network_init()
return (int)ret;
}

View File

@ -582,15 +582,12 @@ eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t eDHCPPhase,
static BaseType_t carlink_wifi_init()
{
static int wifi_sdio_status = MMCSD_HOST_UNPLUGED;
if (wifi_sdio_status == MMCSD_HOST_PLUGED)
return 0;
int status;
WIFI_Context_init();
WIFI_RegisterEvent(eWiFiEventMax, carlink_wifi_event_handler);
for (;;) {
wifi_sdio_status = mmcsd_wait_sdio_ready((int32_t)portMAX_DELAY);
if (wifi_sdio_status == MMCSD_HOST_PLUGED) {
status = mmcsd_wait_sdio_ready((int32_t)portMAX_DELAY);
if (status == MMCSD_HOST_PLUGED) {
printf("detect sdio device\r\n");
break;
}
@ -616,14 +613,8 @@ static void bt_set_support_carplay_android_auto()//auto + cp
console_send_atcmd(cmd_str, strlen(cmd_str));
}
static void taskInitCarlinkWlanThread(void* param)
{
carlink_start_wlan();
vTaskDelete(NULL);
}
int carlink_bt_wifi_init()
{
int retry_count = 0;
pthread_mutex_lock(&btwifiLocker);
if (g_bt_wifi_init_flag) {
pthread_mutex_unlock(&btwifiLocker);
@ -636,24 +627,14 @@ int carlink_bt_wifi_init()
//bt_set_support_carplay();
bt_set_support_carplay_android_auto();
carlink_bt_open_nolock();
lwip_tcpip_init_done_flag = 0;
xTaskCreate(taskInitCarlinkWlanThread, "initThread", 2048 * 4, NULL, 1, NULL);
while(lwip_tcpip_init_done_flag == 0) {
if (retry_count++ > 50)
break;
vTaskDelay(pdMS_TO_TICKS(300));
}
if (lwip_tcpip_init_done_flag) {
g_bt_wifi_init_flag = 1;
printf("bt wlan init ok\r\n");
} else {
g_bt_wifi_init_flag = 0;
printf("bt wlan init failed\r\n");
}
carlink_start_wlan();
g_bt_wifi_init_flag = 1;
pthread_mutex_unlock(&btwifiLocker);
printf("bt wlan init is ok\r\n");
// app_wifi_update_demo();
wifi_update_init();
printf("app wlan update init ok\r\n");
return 0;
}

View File

@ -103,7 +103,7 @@ void carlink_register_event_callbacks(const struct ICalinkEventCallbacks *pcb)
int carlink_common_init()
{
//FF_Disk_t *sfdisk = NULL;
FF_Disk_t *sfdisk = NULL;
BaseType_t ret = -1;
pthread_mutex_lock(&carlink_com_locker);
@ -120,14 +120,14 @@ int carlink_common_init()
}
pthread_key_system_init();
#if 0
sfdisk = FF_SFDiskInit("/sf");
if (!sfdisk) {
printf("FF_SFDiskInit fail.\r\n");
//return;
}
#endif
ret = xTaskCreate(carlink_event_proc, "cl_ev_proc", 2048, NULL, configMAX_PRIORITIES - 1, NULL);
ret = xTaskCreate(carlink_event_proc, "cl_ev_proc", 2048, NULL, configMAX_PRIORITIES / 5, NULL);
g_comm_init_flag = 1;
exit:

View File

@ -31,11 +31,6 @@ void set_carlink_display_info(int x, int y, int w, int h);//set carlink show are
void set_carlink_display_state(int on); // on: 1.display carlink; 0. display native ui
void set_carlink_active_video_info(int x, int y);//for android auto
void* h264_video_player_init();
void h264_video_player_uninit(void* h264_Handle);
int h264_video_player_proc(void* h264_Handle, const char *h264_buf, int h264_buf_len);
#define WRITE_BE32(ptr, val) \
do { \
uint8_t* __ptr = (uint8_t*)(ptr); \

View File

@ -131,19 +131,6 @@ typedef struct __carplay_cfg_info
}carplay_cfg_info;
typedef struct _carlink_flash_io
{
uint32_t (*get_data_arae_size)(void* ctx);
uint32_t (*get_flash_block_erase_size)(void* ctx);
int32_t (*op_flash)(void* flash_handle, void* ctx, int open);
int32_t (*read_data)(void* flash_handle, void *data, uint32_t length, uint32_t offset, void* ctx);
int32_t (*write_data)(void* flash_handle, void *data, uint32_t length, uint32_t offset, void* ctx);
void* ctx;
void* flash_handle;
} carlink_flash_io;
void register_carlink_flash_io_interface(carlink_flash_io *handle);
#if 0
typedef struct __auto_cfg_info
{
short width;//pixel
@ -155,10 +142,10 @@ typedef struct __auto_cfg_info
bool disable_carplay_audio;
} auto_cfg_info;
#endif
extern carplay_cfg_info *g_link_info;
//extern auto_cfg_info *g_auto_link_info;
extern auto_cfg_info *g_auto_link_info;
#ifdef __cplusplus
}

View File

@ -827,8 +827,8 @@ void awtk_thread(void *data)
carlink_ey_init();
#endif
#if CARLINK_EC
set_carlink_display_info(0, 0, LCD_WIDTH, LCD_HEIGHT);
set_carlink_video_info(LCD_WIDTH, LCD_HEIGHT, 30);
set_carlink_display_info(0, 0, LCD_WIDTH, LCD_HEIGHT-100);
set_carlink_video_info(LCD_WIDTH, LCD_HEIGHT-100, 30);
carlink_ec_init(0, NULL);
#endif

View File

@ -68,10 +68,10 @@ void check_key(void)
gs_keyDat[i].flag_Reset=1;
gs_keyDat[i].keyCnt=0;
// printf("LV_KEY_OPTION key long key\r\n");
if(Get_sys_wifi_state()){
printf("key carplay -----------------maps.\r\n");
request_UI("maps:");
}else
// if(Get_sys_wifi_state()){
// printf("key carplay -----------------maps.\r\n");
// request_UI("maps:");
// }else
Key_Distinction(KEY_LONG_ON,LV_KEY_OPTION);
}
if(i==1 && gs_keyDat[0].flag_Pressed==KEY_OFF)
@ -79,11 +79,11 @@ void check_key(void)
gs_keyDat[i].flag_Reset=1;
gs_keyDat[i].keyCnt=0;
// printf("LV_KEY_SELECT key long key\r\n");
if(Get_sys_wifi_state()){
printf("key carplay -----------------enter.\r\n");
// KnobUpdate(1,0,0,0,0,0);
sendKnobInfo(1, 0, 0, 0, 0, 0);
}else
// if(Get_sys_wifi_state()){
// printf("key carplay -----------------enter.\r\n");
// // KnobUpdate(1,0,0,0,0,0);
// sendKnobInfo(1, 0, 0, 0, 0, 0);
// }else
Key_Distinction(KEY_LONG_ON,LV_KEY_SELECT);
}
@ -109,11 +109,11 @@ void check_key(void)
// // android_auto_send_knob_event(19,1);
// // android_auto_send_knob_event(19,0);
// }else
if(Get_sys_wifi_state()){
printf("key carplay -----------------previos.\r\n");
// KnobUpdate(0,0,0,0,0,1);
sendKnobInfo(0, 0, 0, 0, 0, 1);
}else
// if(Get_sys_wifi_state()){
// printf("key carplay -----------------previos.\r\n");
// // KnobUpdate(0,0,0,0,0,1);
// sendKnobInfo(0, 0, 0, 0, 0, 1);
// }else
Key_Distinction(KEY_SHORT_ON,LV_KEY_OPTION);
}
else if(i==1 && gs_keyDat[0].flag_Pressed==KEY_OFF)
@ -132,11 +132,11 @@ void check_key(void)
// // android_auto_send_knob_event(20,1);
// // android_auto_send_knob_event(20,0);
// }else
if(Get_sys_wifi_state()){
printf("key carplay -----------------next.\r\n");
// KnobUpdate(0,0,0,0,0,-1);
sendKnobInfo(0, 0, 0, 0, 0, -1);
}else
// if(Get_sys_wifi_state()){
// printf("key carplay -----------------next.\r\n");
// // KnobUpdate(0,0,0,0,0,-1);
// sendKnobInfo(0, 0, 0, 0, 0, -1);
// }else
Key_Distinction(KEY_SHORT_ON,LV_KEY_SELECT);
}
}