latch satview

ublox 10 series output GSV only every 5 seconds
This commit is contained in:
mitxela
2025-08-01 01:22:08 +01:00
parent 74f683c7ba
commit b30b862fda
2 changed files with 7 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ uint16_t buffer_colons_L[200] = {0};
uint16_t buffer_colons_R[200] = {0};
uint8_t nmea[NMEA_BUF_SIZE];
uint8_t GPS_sv = 255, GLONASS_sv = 255;
uint8_t GPS_sv = 255, GLONASS_sv = 255, satview_stale = 0;
time_t currentTime;
bcdStamp_t nextBcd;
@@ -605,6 +605,7 @@ void decodeGSV(void){
uint8_t sv = (nmea[11]-'0')*10 + (nmea[12]-'0');
if (nmea[2] == 'P') {
GPS_sv = sv;
satview_stale = 0;
} else if (nmea[2] == 'L') {
GLONASS_sv = sv;
}

View File

@@ -69,7 +69,7 @@ extern UART_HandleTypeDef huart1;
extern UART_HandleTypeDef huart2;
/* USER CODE BEGIN EV */
extern uint8_t nmea[90];
extern uint8_t GPS_sv, GLONASS_sv;
extern uint8_t GPS_sv, GLONASS_sv, satview_stale;
extern uint16_t buffer_adc[ADC_BUFFER_SIZE];
extern uint16_t buffer_dac[DAC_BUFFER_SIZE];
extern DAC_HandleTypeDef hdac1;
@@ -219,7 +219,10 @@ void PendSV_Handler(void)
if (resendDate) {sendDate(1); resendDate=0;}
GLONASS_sv = 255; GPS_sv = 255;
if (satview_stale>2){
GLONASS_sv = 255;
GPS_sv = 255;
} else satview_stale++;
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */