+Chasemapper udp support
This commit is contained in:
parent
13134b32f7
commit
afbfde07dd
|
|
@ -24,6 +24,9 @@
|
||||||
#include "src/aprs.h"
|
#include "src/aprs.h"
|
||||||
#include "src/ShFreqImport.h"
|
#include "src/ShFreqImport.h"
|
||||||
#include "src/RS41.h"
|
#include "src/RS41.h"
|
||||||
|
#if FEATURE_CHASEMAPPER
|
||||||
|
#include "src/Chasemapper.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if FEATURE_MQTT
|
#if FEATURE_MQTT
|
||||||
#include "src/mqtt.h"
|
#include "src/mqtt.h"
|
||||||
|
|
@ -738,7 +741,12 @@ struct st_configitems config_list[] = {
|
||||||
{"tcp.port", 0, &sonde.config.tcpfeed.port},
|
{"tcp.port", 0, &sonde.config.tcpfeed.port},
|
||||||
{"tcp.idformat", -2, &sonde.config.tcpfeed.idformat},
|
{"tcp.idformat", -2, &sonde.config.tcpfeed.idformat},
|
||||||
{"tcp.highrate", 0, &sonde.config.tcpfeed.highrate},
|
{"tcp.highrate", 0, &sonde.config.tcpfeed.highrate},
|
||||||
|
#if FEATURE_CHASEMAPPER
|
||||||
|
/* Chasemapper settings */
|
||||||
|
{"cm.active", -3, &sonde.config.cm.active},
|
||||||
|
{"cm.host", 63, &sonde.config.cm.host},
|
||||||
|
{"cm.port", 0, &sonde.config.cm.port},
|
||||||
|
#endif
|
||||||
#if FEATURE_MQTT
|
#if FEATURE_MQTT
|
||||||
/* MQTT */
|
/* MQTT */
|
||||||
{"mqtt.active", 0, &sonde.config.mqtt.active},
|
{"mqtt.active", 0, &sonde.config.mqtt.active},
|
||||||
|
|
@ -2514,6 +2522,11 @@ void loopDecoder() {
|
||||||
Serial.print("sending: "); Serial.println(raw);
|
Serial.print("sending: "); Serial.println(raw);
|
||||||
tncclient.write(raw, rawlen);
|
tncclient.write(raw, rawlen);
|
||||||
}
|
}
|
||||||
|
#if FEATURE_CHASEMAPPER
|
||||||
|
if (sonde.config.cm.active) {
|
||||||
|
Chasemapper::send(udp, s);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#if FEATURE_SONDEHUB
|
#if FEATURE_SONDEHUB
|
||||||
if (sonde.config.sondehub.active) {
|
if (sonde.config.sondehub.active) {
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,10 @@ var cfgs = [
|
||||||
[ "mqtt.username", "MQTT username"],
|
[ "mqtt.username", "MQTT username"],
|
||||||
[ "mqtt.password", "MQTT password"],
|
[ "mqtt.password", "MQTT password"],
|
||||||
[ "mqtt.prefix", "MQTT prefix"],
|
[ "mqtt.prefix", "MQTT prefix"],
|
||||||
|
[ "", "Chasemapper settings"],
|
||||||
|
[ "cm.active", "Chasemapper active (0=disabled, 1=active)"],
|
||||||
|
[ "cm.host", "Chasemapper UDP host"],
|
||||||
|
[ "cm.port", "Chasemapper UDP port"],
|
||||||
[ "", "SondeHub settings"],
|
[ "", "SondeHub settings"],
|
||||||
[ "sondehub.active", "SondeHub reporting (0=disabled, 1=active)"],
|
[ "sondehub.active", "SondeHub reporting (0=disabled, 1=active)"],
|
||||||
[ "sondehub.chase", "SondeHub location reporting (0=off, 1=fixed, 2=chase/GPS, 3=auto)"],
|
[ "sondehub.chase", "SondeHub location reporting (0=off, 1=fixed, 2=chase/GPS, 3=auto)"],
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
/* data feed to sondehubv2 */
|
/* data feed to sondehubv2 */
|
||||||
/* needs about 4k4 code, 200b data, 200b stack, 200b heap */
|
/* needs about 4k4 code, 200b data, 200b stack, 200b heap */
|
||||||
#define FEATURE_SONDEHUB 1
|
#define FEATURE_SONDEHUB 1
|
||||||
#define FEaTURE_CHASEMAPPER 1
|
#define FEATURE_CHASEMAPPER 1
|
||||||
#define FEATURE_MQTT 1
|
#define FEATURE_MQTT 1
|
||||||
|
|
||||||
#define FEATURE_RS92 1
|
#define FEATURE_RS92 1
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ int Chasemapper::send(WiFiUDP &udp, SondeInfo *si) {
|
||||||
sprintf(buf, "{ \"type\": \"PAYLOAD_SUMMARY\","
|
sprintf(buf, "{ \"type\": \"PAYLOAD_SUMMARY\","
|
||||||
"\"callsign\": \"%s\","
|
"\"callsign\": \"%s\","
|
||||||
"\"latitude\": %g,"
|
"\"latitude\": %g,"
|
||||||
"\"longidude\": %g,"
|
"\"longitude\": %g,"
|
||||||
"\"altitude\": %d,"
|
"\"altitude\": %d,"
|
||||||
"\"speed\": %d,"
|
"\"speed\": %d,"
|
||||||
"\"heading\": %d,"
|
"\"heading\": %d,"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
const char *version_name = "rdzTTGOsonde";
|
const char *version_name = "rdzTTGOsonde";
|
||||||
const char *version_id = "devel20210920";
|
const char *version_id = "devel20210921";
|
||||||
const int SPIFFS_MAJOR=2;
|
const int SPIFFS_MAJOR=2;
|
||||||
const int SPIFFS_MINOR=16;
|
const int SPIFFS_MINOR=16;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue