A59 -V1.1版本提交
This commit is contained in:
@ -36,6 +36,8 @@ struct carplay_ctx
|
||||
};
|
||||
|
||||
struct carplay_ctx g_cp_handle;
|
||||
static bool g_cp_disable = false;
|
||||
|
||||
|
||||
static void carplay_init_parameter();
|
||||
void start_mdnsd();
|
||||
@ -56,9 +58,22 @@ static void iap2_link_status(void *ctx, IAP2_LINK_STATUS status){}
|
||||
static int iap2_write_data(void *ctx, char *buf, int len)
|
||||
{
|
||||
(void)ctx;
|
||||
printf("iap2_write_data --------------------------\r\n");
|
||||
return carlink_iap_data_write((unsigned char *)buf, len);
|
||||
}
|
||||
static void iap2_msg_time_update(void *ctx, long long time, int zone_offset){}
|
||||
extern uint32_t tire_front_time;
|
||||
extern uint32_t tire_rear_time;
|
||||
extern uint32_t fml_stamp_to_time(uint32_t timep , uint32_t time[]);
|
||||
static void iap2_msg_time_update(void *ctx, long long time, int zone_offset){
|
||||
(void)ctx;
|
||||
printf("iap2_msg_time_update time ======================================== %lld , %d\r\n",time,zone_offset);
|
||||
uint32_t time_transfer[6];
|
||||
uint32_t sum = (uint32_t)time;
|
||||
|
||||
tire_rear_time = sum;
|
||||
tire_front_time = sum;
|
||||
fml_stamp_to_time(sum,time_transfer);
|
||||
}
|
||||
static void iap2_msg_gps(void *ctx, unsigned char session, int start){}
|
||||
static void iap2_msg_gps_gprmc_data_status(void *ctx, int value_a, int value_v, int value_x){}
|
||||
static void iap2_msg_identify(void *ctx, int type, int ok)
|
||||
@ -163,6 +178,9 @@ static void start_cp(struct carplay_ctx* pctx)
|
||||
if (pctx->mCarplayConnected)
|
||||
return;
|
||||
|
||||
if (g_cp_disable)
|
||||
return;
|
||||
|
||||
g_link_info->enable_iap_carplay_sess = 1;
|
||||
g_link_info->is_old_carplay_ver = 0;
|
||||
g_link_info->wifi_passwd = (char *)carlink_get_wifi_passwd();
|
||||
@ -270,6 +288,7 @@ static void taskInitCarlinkCpProc(void* param)
|
||||
|
||||
(void)param;
|
||||
|
||||
|
||||
iap2_callbacks iap2_cbs;
|
||||
memset((void *)&iap2_cbs, 0, sizeof(iap2_cbs));
|
||||
iap2_cbs.iap2_link_status_cb = iap2_link_status;
|
||||
@ -388,8 +407,8 @@ static void carplay_init_parameter()
|
||||
g_link_info->width = CARLINK_VIDEO_WIDTH;//pixel
|
||||
g_link_info->height = CARLINK_VIDEO_HEIGHT;
|
||||
g_link_info->fps = 30;
|
||||
g_link_info->screen_width_phy = PHYSICAL_WIDTH;//mm
|
||||
g_link_info->screen_height_phy = PHYSICAL_HEIGHT;
|
||||
g_link_info->screen_width_phy = CARLINK_VIDEO_WIDTH;
|
||||
g_link_info->screen_height_phy = CARLINK_VIDEO_HEIGHT;
|
||||
|
||||
g_link_info->icurrent = 1000;
|
||||
g_link_info->enable_iap_carplay_sess = 1;
|
||||
@ -424,6 +443,16 @@ int carlink_cp_init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void carlink_cp_enable(int enable)
|
||||
{
|
||||
if (enable) {
|
||||
g_cp_disable = false;
|
||||
} else {
|
||||
g_cp_disable = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//int mdnsd_task();
|
||||
static void taskMdnsdProc(void* param)
|
||||
{
|
||||
@ -442,5 +471,11 @@ int carlink_cp_init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void carlink_cp_enable(int enable)
|
||||
{
|
||||
(void)enable;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user