Compare commits
7 Commits
4a1896a35b
...
451f42fc3c
| Author | SHA1 | Date |
|---|---|---|
|
|
451f42fc3c | |
|
|
15c5c83604 | |
|
|
985e79aa8f | |
|
|
36c8cb08b6 | |
|
|
d814117a12 | |
|
|
24bc2b9a1c | |
|
|
a3502c8c89 |
|
|
@ -70,6 +70,10 @@ h2.external-links {
|
|||
}
|
||||
.cfgpanel {
|
||||
}
|
||||
.cfgpanel:hover td, .cfgpanel:active td{
|
||||
background-color: #808080 !important;
|
||||
color: white;
|
||||
}
|
||||
|
||||
th.cfg {
|
||||
padding:5pt
|
||||
|
|
@ -419,6 +423,12 @@ h1{
|
|||
h2{
|
||||
color: white;
|
||||
}
|
||||
.system-info p {
|
||||
color: #bdbdbd;
|
||||
}
|
||||
.status-table th {
|
||||
color: black;
|
||||
}
|
||||
table, th, td, .save, a.active {
|
||||
color: white;
|
||||
border: 1px solid grey;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const char *manufacturer_string[]={"Graw", "Vaisala", "Vaisala", "Meteomodem", "
|
|||
// tiny library printf does not support $ parameters, so remove....
|
||||
// for now, only urls with the right order of parameters are supported, this maybe will change in the future again.
|
||||
//const char *DEFEPH="gssc.esa.int/gnss/data/daily/%1$04d/brdc/brdc%2$03d0.%3$02dn.gz";
|
||||
const char *DEFEPH="gssc.esa.int/gnss/data/daily/%04d/brdc/brdc%03d0.%02dn.gz";
|
||||
const char *DEFEPH="gssc.esa.int/cddis/gnss/data/daily/%04d/brdc/brdc%03d0.%02dn.gz";
|
||||
|
||||
int fingerprintValue[]={ 17, 31, 64, 4, 55, 48, 23, 128+23, 119, 128+119, 95, 79, -1 };
|
||||
const char *fingerprintText[]={
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ void MQTT::publishPacket(SondeInfo *si)
|
|||
|
||||
char payload[1024];
|
||||
payload[0] = '{';
|
||||
int n = sonde2json(payload+1, 1023, si);
|
||||
int n = sonde2json(payload+1, 1023, si, true);
|
||||
if(n<0) {
|
||||
// ERROR
|
||||
LOG_E(TAG, "publishPacket: sonde2json failed, string too long");
|
||||
|
|
|
|||
|
|
@ -83,11 +83,15 @@ String ConnSystem::getStatus() {
|
|||
appendUptime(buf, 1024, uptime - netup_time);
|
||||
appendBatt(buf, 1024);
|
||||
p = strlen(buf);
|
||||
snprintf(buf+p, 1024-p, " <br> rdzwxGO app: %sconnected<br>RS92 RINEX eph state: %s", rdzclient.connected()?"":"not ", rs92);
|
||||
snprintf(buf+p, 1024-p, " <br> rdzwxGO app: %sconnected<br>", rdzclient.connected()?"":"not ");
|
||||
#if FEATURE_RS92
|
||||
p = strlen(buf);
|
||||
snprintf(buf+p, 1024-p, "RS92 RINEX eph state: %s", rdzclient.connected()?"":"not ", rs92);
|
||||
if(ephstate == EPH_GOOD) {
|
||||
p = strlen(buf);
|
||||
snprintf(buf+p, 1024-p, "[%s]", eph_nowstr);
|
||||
}
|
||||
#endif
|
||||
// get DNS info, debug info...
|
||||
String s = WiFi.dnsIP(0).toString();
|
||||
strlcat(buf, "<br>DNS: ", 1024);
|
||||
|
|
|
|||
|
|
@ -33,10 +33,17 @@ int float2json(char **buf, int *maxlen, const char *fmt, float value) {
|
|||
// - MQTT
|
||||
// - rdzJSON (for Android app)
|
||||
// - Web map
|
||||
int sonde2json(char *buf, int maxlen, SondeInfo *si)
|
||||
int sonde2json(char *buf, int maxlen, SondeInfo *si, bool rssi_as_dbm)
|
||||
{
|
||||
SondeData *s = &(si->d);
|
||||
int n;
|
||||
float rssi_conversion = 1.0;
|
||||
|
||||
// this allows callers to get the raw reading and convert it themselves (mobile app)
|
||||
// or to request the conversion to be done internally for the benefit of downstream
|
||||
// consumers (mqtt subsystem, and anything else that calls this function)
|
||||
if (rssi_as_dbm)
|
||||
rssi_conversion = -0.5;
|
||||
|
||||
n = float2json(&buf, &maxlen, "\"lat\": %.5f,", s->lat);
|
||||
if(n<0) return -1;
|
||||
|
|
@ -69,7 +76,7 @@ int sonde2json(char *buf, int maxlen, SondeInfo *si)
|
|||
"\"time\": %u,"
|
||||
"\"sats\": %d,"
|
||||
"\"freq\": %.2f,"
|
||||
"\"rssi\": %d,"
|
||||
"\"rssi\": %.1f,"
|
||||
"\"afc\": %d,"
|
||||
"\"launchKT\": %d,"
|
||||
"\"burstKT\": %d,"
|
||||
|
|
@ -85,7 +92,7 @@ int sonde2json(char *buf, int maxlen, SondeInfo *si)
|
|||
s->time,
|
||||
s->sats,
|
||||
si->freq,
|
||||
si->rssi,
|
||||
si->rssi * rssi_conversion,
|
||||
si->afc,
|
||||
s->launchKT,
|
||||
s->burstKT,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
#include "Sonde.h"
|
||||
|
||||
int sonde2json(char *buf, int maxlen, SondeInfo *si);
|
||||
int sonde2json(char *buf, int maxlen, SondeInfo *si, bool rssi_as_dbm=false);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@
|
|||
#include <WiFi.h>
|
||||
#include <WiFiUdp.h>
|
||||
|
||||
#if USE_BAD_DEBUGGING_CODE
|
||||
extern WiFiUDP udp;
|
||||
#endif
|
||||
|
||||
extern boolean connected;
|
||||
|
||||
|
|
@ -57,10 +59,12 @@ void Logger::sendImprov(int type, int len, const char *data) {
|
|||
buf[9+len+1] = '\n';
|
||||
buf[9+len+2] = 0;
|
||||
Serial.write(buf, 9+len+2);
|
||||
#if USE_BAD_DEBUGGING_CODE
|
||||
udp.beginPacket("192.168.1.3", 12345);
|
||||
udp.write((const uint8_t *)"Reply:",6);
|
||||
udp.write((const uint8_t *)buf, 9+len+2);
|
||||
udp.endPacket();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Logger::sendImprovResult(int replyto, const char *strings[]) {
|
||||
|
|
@ -89,10 +93,12 @@ void Logger::sendImprovResult(int replyto, const char *strings[]) {
|
|||
buf[i++] = '\n';
|
||||
buf[i++] = 0;
|
||||
Serial.write(buf, i-1);
|
||||
#if USE_BAD_DEBUGGING_CODE
|
||||
udp.beginPacket("192.168.1.3", 12345);
|
||||
udp.write((const uint8_t *)"Reply:",6);
|
||||
udp.write((const uint8_t *)buf, i-1);
|
||||
udp.endPacket();
|
||||
#endif
|
||||
}
|
||||
|
||||
int cmdlen = 0;
|
||||
|
|
@ -131,9 +137,11 @@ void Logger::handleImprov() {
|
|||
while(Serial.available()) {
|
||||
cmd[cmdlen] = Serial.read();
|
||||
if(cmd[cmdlen] == '\n') { // check if command
|
||||
#if USE_BAD_DEBUGGING_CODE
|
||||
udp.beginPacket("192.168.1.3", 12345);
|
||||
udp.write((const uint8_t *)cmd, cmdlen+1);
|
||||
udp.endPacket();
|
||||
#endif
|
||||
if(strncmp(cmd, "IMPROV", 6)==0) { // we have a command
|
||||
// TODO: CHeck CRC
|
||||
if(cmd[7]==0x03 && cmd[9]==0x03) { // RPC, get info
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const char *version_name = "rdzTTGOsonde";
|
||||
const char *version_id = "dev20241229";
|
||||
const char *version_id = "dev20250108";
|
||||
const int FS_MAJOR=3;
|
||||
const int FS_MINOR=3;
|
||||
|
|
|
|||
Loading…
Reference in New Issue