diff --git a/README.md b/README.md
index 56c7411..e03d1a9 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ for details on supported boards, and additional setup instructions.
Manufacturer | Model | Position | Temperature | Humidity | Pressure
-------------|-------|----------|-------------|----------|----------
-Vaisala | RS92-SGP/NGP | :heavy_check_mark: | :heavy_check_mark: | :x: | :x:
+Vaisala | RS92-SGP | :heavy_check_mark: | :heavy_check_mark: | :x: | :x:
Vaisala | RS41-SG/SGP/SGM | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: (for -SGP)
Graw | DFM06/09/17 | :heavy_check_mark: | :heavy_check_mark: | :x: | :x:
Meteomodem | M10 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Not Sent
@@ -45,7 +45,7 @@ course be considered for inclusion :-).
You can download the latest binary automated build for the development and testing branches [here](http://rdzsonde.mooo.com/download.html), the binary includes everything including configuration files so any existing settings will be reset.
-To update an existing installatiom to the latest development or master version you can use the [OTA](https://github.com/dl9rdz/rdz_ttgo_sonde/wiki/Other-features#over-the-air-updates) update feature.
+To update an existing installation to the latest development or master version you can use the [OTA](https://github.com/dl9rdz/rdz_ttgo_sonde/wiki/Other-features#over-the-air-updates) update feature.
The downloaded .bin file can be flashed to your ESP32 board using [esptool](https://github.com/espressif/esptool) or [ESP32 Download Tool](https://www.espressif.com/en/support/download/other-tools)
diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino
index 14f2949..de921bf 100644
--- a/RX_FSK/RX_FSK.ino
+++ b/RX_FSK/RX_FSK.ino
@@ -43,7 +43,8 @@ AsyncWebServer server(80);
AXP20X_Class axp;
#define PMU_IRQ 35
SemaphoreHandle_t axpSemaphore;
-bool pmu_irq = false;
+// 0: cleared; 1: set; 2: do not check, also query state of axp via i2c on each loop
+uint8_t pmu_irq = 0;
const char *updateHost = "rdzsonde.mooo.com";
int updatePort = 80;
@@ -75,7 +76,12 @@ const char *dfmSubtypeStrSH[16] = { NULL, NULL, NULL, NULL, NULL, NULL,
"DFM17", // 0x0D
NULL, NULL
};
-
+
+// Times in ms, i.e. station: 10 minutes, mobile: 20 seconds
+#define APRS_STATION_UPDATE_TIME (10*60*1000)
+#define APRS_MOBILE_STATION_UPDATE_TIME (20*1000)
+unsigned long time_last_aprs_update = -APRS_STATION_UPDATE_TIME;
+
#if FEATURE_SONDEHUB
#define SONDEHUB_STATION_UPDATE_TIME (60*60*1000) // 60 min
#define SONDEHUB_MOBILE_STATION_UPDATE_TIME (30*1000) // 30 sec
@@ -83,18 +89,19 @@ WiFiClient shclient; // Sondehub v2
int shImportInterval = 0;
char shImport = 0;
unsigned long time_last_update = 0;
+#endif
/* SH_LOC_OFF: never send position information to SondeHub
SH_LOC_FIXED: send fixed position (if specified in config) to sondehub
SH_LOC_CHASE: always activate chase mode and send GPS position (if available)
SH_LOC_AUTO: if there is no valid GPS position, or GPS position < MIN_LOC_AUTO_DIST away from known fixed position: use FIXED mode
otherwise, i.e. if there is a valid GPS position and (either no fixed position in config, or GPS position is far away from fixed position), use CHASE mode.
*/
+// same constants used for SondeHub and APRS
enum { SH_LOC_OFF, SH_LOC_FIXED, SH_LOC_CHASE, SH_LOC_AUTO };
/* auto mode is chase if valid GPS position and (no fixed location entered OR valid GPS position and distance in lat/lon deg to fixed location > threshold) */
#define MIN_LOC_AUTO_DIST 200 /* meter */
#define SH_LOC_AUTO_IS_CHASE ( gpsPos.valid && ( (isnan(sonde.config.rxlat) || isnan(sonde.config.rxlon) ) || \
calcLatLonDist( gpsPos.lat, gpsPos.lon, sonde.config.rxlat, sonde.config.rxlon ) > MIN_LOC_AUTO_DIST ) )
-#endif
extern float calcLatLonDist(float lat1, float lon1, float lat2, float lon2);
// KISS over TCP for communicating with APRSdroid
@@ -317,25 +324,6 @@ const char *createQRGForm() {
strcat(ptr, "\n");
strcat(ptr, "
");
strcat(ptr, "\n");
-#if 0
- strcat(ptr, "
ID
Active
Freq
Launchsite
Mode
");
- for (int i = 0; i < sonde.config.maxsonde; i++) {
- //String s = sondeTypeSelect(i >= sonde.nSonde ? 2 : sonde.sondeList[i].type);
- String site = sonde.sondeList[i].launchsite;
- sprintf(ptr + strlen(ptr), "
%d
"
- "
"
- "
"
- //"
",
- "
",
- i + 1,
- i + 1, (i < sonde.nSonde && sonde.sondeList[i].active) ? "checked" : "",
- i + 1, i >= sonde.nSonde ? 400.000 : sonde.sondeList[i].freq,
- i + 1, i >= sonde.nSonde ? " " : sonde.sondeList[i].launchsite,
- i + 1, i >= sonde.nSonde ? 2 : sondeTypeChar[sonde.sondeList[i].type] );
- //i + 1, s.c_str());
- }
- strcat(ptr, "