mian
This commit is contained in:
@ -59,11 +59,12 @@ void onReceiveEvent(int bytes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 更新传感器状态和数据
|
// 更新传感器状态和数据
|
||||||
|
unsigned long last_gps_data_time = 0;
|
||||||
static uint8_t last_receive_cnt = 0;
|
static uint8_t last_receive_cnt = 0;
|
||||||
void update_sensor_data() {
|
void update_sensor_data() {
|
||||||
//gps
|
//gps
|
||||||
//if (millis() > 5000 && gps.charsProcessed() < 10 && digitalRead(GPS_POWER_PIN) == HIGH)
|
//if (millis() > 5000 && gps.charsProcessed() < 10 && digitalRead(GPS_POWER_PIN) == HIGH)
|
||||||
if (millis() > 5000 && gps.charsProcessed() < 10) {
|
if (gps.charsProcessed() < 10) {
|
||||||
sensor_data.gps_sta = 0x00; // 无设备
|
sensor_data.gps_sta = 0x00; // 无设备
|
||||||
sensor_data.gps_lat = 0.0f;
|
sensor_data.gps_lat = 0.0f;
|
||||||
sensor_data.gps_lon = 0.0f;
|
sensor_data.gps_lon = 0.0f;
|
||||||
|
|||||||
Reference in New Issue
Block a user