+Chasemapper udp support

pull/182/head^2
Hansi, dl9rdz 2021-09-21 10:40:21 +02:00
rodzic 13134b32f7
commit afbfde07dd
5 zmienionych plików z 21 dodań i 4 usunięć

Wyświetl plik

@ -24,6 +24,9 @@
#include "src/aprs.h"
#include "src/ShFreqImport.h"
#include "src/RS41.h"
#if FEATURE_CHASEMAPPER
#include "src/Chasemapper.h"
#endif
#if FEATURE_MQTT
#include "src/mqtt.h"
@ -738,7 +741,12 @@ struct st_configitems config_list[] = {
{"tcp.port", 0, &sonde.config.tcpfeed.port},
{"tcp.idformat", -2, &sonde.config.tcpfeed.idformat},
{"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
/* MQTT */
{"mqtt.active", 0, &sonde.config.mqtt.active},
@ -2514,6 +2522,11 @@ void loopDecoder() {
Serial.print("sending: "); Serial.println(raw);
tncclient.write(raw, rawlen);
}
#if FEATURE_CHASEMAPPER
if (sonde.config.cm.active) {
Chasemapper::send(udp, s);
}
#endif
}
#if FEATURE_SONDEHUB
if (sonde.config.sondehub.active) {

Wyświetl plik

@ -54,6 +54,10 @@ var cfgs = [
[ "mqtt.username", "MQTT username"],
[ "mqtt.password", "MQTT password"],
[ "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.active", "SondeHub reporting (0=disabled, 1=active)"],
[ "sondehub.chase", "SondeHub location reporting (0=off, 1=fixed, 2=chase/GPS, 3=auto)"],

Wyświetl plik

@ -5,7 +5,7 @@
/* data feed to sondehubv2 */
/* needs about 4k4 code, 200b data, 200b stack, 200b heap */
#define FEATURE_SONDEHUB 1
#define FEaTURE_CHASEMAPPER 1
#define FEATURE_CHASEMAPPER 1
#define FEATURE_MQTT 1
#define FEATURE_RS92 1

Wyświetl plik

@ -14,7 +14,7 @@ int Chasemapper::send(WiFiUDP &udp, SondeInfo *si) {
sprintf(buf, "{ \"type\": \"PAYLOAD_SUMMARY\","
"\"callsign\": \"%s\","
"\"latitude\": %g,"
"\"longidude\": %g,"
"\"longitude\": %g,"
"\"altitude\": %d,"
"\"speed\": %d,"
"\"heading\": %d,"

Wyświetl plik

@ -1,4 +1,4 @@
const char *version_name = "rdzTTGOsonde";
const char *version_id = "devel20210920";
const char *version_id = "devel20210921";
const int SPIFFS_MAJOR=2;
const int SPIFFS_MINOR=16;