yincheng.zhong
2024-08-20 7744fffacb03dc81cc9dbaf9f5d86a0f21e79c03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "mk_4G.h"
#include "global_param.h"
#include "sn74hc595.h"
void bind_reset(void)
{
g_com_map[BIND_DEV_ID]=0x00;//ÖØÖÃĬÈÏÏ·¢ID±£´æ
save_com_map_to_flash();
}
void message_construct()
{
//sprintf(send_buf,"$message,%d,%d,%d,%d,%d,%d,%%f,%lf,%lf,%lf,%lf,%d,%d",Commend_SendDate.messgetype,Commend_SendDate.tagId,Commend_SendDate.bindState,
    //Commend_SendDate.gunLableId,Commend_SendDate.alarmType,Commend_SendDate.power,Commend_SendDate.warnDistance,Commend_SendDate.alarmDistance,Commend_SendDate.lng,Commend_SendDate.lat
    //Commend_SendDate.applyId,Commend_SendDate.result);
    
    //send 4G
}
void message_from_4G_Handler(void)
{
 
 
//sscanf(4G_api_buf,"$%*[^,],%d,%d,%d,%d,%lf,%lf,%d",Commend_Datestruct.type,Commend_Datestruct.applyID,Commend_Datestruct.tagId,
    //Commend_Datestruct.gunLableId,Commend_Datestruct.warnDistance,Commend_Datestruct.alarmDistance,Commend_Datestruct.frequency);
/*¸ù¾ÝÖ¸ÁîÈ¥Ö´ÐÐ
    switch(Commend_Datestruct.type)
    case BIND_SUCCESS:
    {
     g_com_map[DEV_ID]=Commend_Datestruct.tagId;
     g_com_map[BIND_DEV_ID]=Commend_Datestruct.gunLableId;
     g_com_map[STATIONARY_TIME]=Commend_Datestruct.warnDistance;
     g_com_map[ALARM_DISTANCE2]=Commend_Datestruct.alarmDistance;//Õâ¸ö¾àÀëdoubleºÍuint¸ñʽ²»·û
     g_com_map[SEND_4G_FREQUENCY]=1000/Commend_Datestruct.frequency;
    }
    break;
    case UNBIND:
    bind_resetbreak();
    case OPEN_GNSS:
     gnss_forceopen();
    case CLOSE_VIBRATION:
     vibration_close();
    case QUARY_INFORMATION:
    //??
    case CHANGE_POLL_FREQUENCY:
    g_com_map[SEND_4G_FREQUENCY]=Commend_Datestruct.frequency;
    break;
    
    save_com_map_to_flash();
    */
}
void gnss_forceopen(void)
{
gps_air780_power_change(1, air780_power_state);
}