From 8e241ba6ae07505f36bb8bf47e1890c1304b4840 Mon Sep 17 00:00:00 2001 From: chenxin Date: Mon, 23 Jun 2025 09:08:11 +0800 Subject: [PATCH] mian --- src/i2c_communication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i2c_communication.cpp b/src/i2c_communication.cpp index 31dbb3a..88ea845 100644 --- a/src/i2c_communication.cpp +++ b/src/i2c_communication.cpp @@ -59,11 +59,12 @@ void onReceiveEvent(int bytes) { } // 更新传感器状态和数据 +unsigned long last_gps_data_time = 0; static uint8_t last_receive_cnt = 0; void update_sensor_data() { //gps //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_lat = 0.0f; sensor_data.gps_lon = 0.0f;