Compare commits
4 Commits
24bc2b9a1c
...
15c5c83604
| Author | SHA1 | Date |
|---|---|---|
|
|
15c5c83604 | |
|
|
985e79aa8f | |
|
|
36c8cb08b6 | |
|
|
d814117a12 |
|
|
@ -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[]={
|
||||
|
|
|
|||
|
|
@ -269,7 +269,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;
|
||||
|
|
@ -85,7 +92,7 @@ int sonde2json(char *buf, int maxlen, SondeInfo *si)
|
|||
s->time,
|
||||
s->sats,
|
||||
si->freq,
|
||||
si->rssi/-2.0,
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue