chen
2024-11-04 9ff35110c0d55f0c5f3dbb3453301283a1e8de42
keil/include/src/gps.c
@@ -1,15 +1,14 @@
#include "board.h"
#define GPS_OPEN_TIME_OUT  240
#define GPS_RESTART_TIME1  1200
#define GPS_RESTART_TIME2  120
#define GPS_OPEN_TIME_OUT  48      //1分钟开启
#define GPS_RESTART_TIME1  480  //10分钟
#define GPS_RESTART_TIME2  48      //1分钟
extern uint16_t gps_wait_count;
uint8_t gps_power_state,gps_uwb_flag,gps_4g_flag = 1,gps_timeout_flag,gps_need_data_flag = 1;
uint8_t gps_power_state,gps_uwb_flag,gps_4g_flag,gps_timeout_flag,gps_need_data_flag = 1;
void GPS_Poll(void)
{
    if(gps_4g_flag||gps_uwb_flag) {
        gps_power_state = 1;  //打开GPS电源
        if(!gps_timeout_flag) {
            if(gps_need_data_flag) {
                gps_wait_count++;
@@ -52,6 +51,7 @@
        gps_timeout_flag=0;
        gps_need_data_flag=1;
    }
}
void GpsConrol(uint8_t flag_4g_uwb,uint8_t open_close)
{