kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
Porównaj commity
3 Commity
8ee071de35
...
1687117bec
Autor | SHA1 | Data |
---|---|---|
Hansi, dl9rdz | 1687117bec | |
Hansi, dl9rdz | ff5aec544e | |
Hansi, dl9rdz | 2b88e072ac |
|
@ -304,6 +304,9 @@ int M10M20::decodeframeM10(uint8_t *data) {
|
||||||
Serial.println("Decoding...");
|
Serial.println("Decoding...");
|
||||||
//SondeInfo *si = sonde.si();
|
//SondeInfo *si = sonde.si();
|
||||||
SondeData *si = &(sonde.si()->d);
|
SondeData *si = &(sonde.si()->d);
|
||||||
|
// Set type info to M10
|
||||||
|
memcpy(si->typestr, "M10 ", 5);
|
||||||
|
si->subtype = 1; // subtype 1: M10
|
||||||
|
|
||||||
// Its a M10
|
// Its a M10
|
||||||
// getid...
|
// getid...
|
||||||
|
@ -441,7 +444,7 @@ void M10M20::processM10data(uint8_t dt)
|
||||||
rxsearching = false;
|
rxsearching = false;
|
||||||
rxbitc = 0;
|
rxbitc = 0;
|
||||||
rxp = 0;
|
rxp = 0;
|
||||||
isM20 = false;
|
//isM20 = false;
|
||||||
headerDetected = 1;
|
headerDetected = 1;
|
||||||
#if 1
|
#if 1
|
||||||
int rssi=sx1278.getRSSI();
|
int rssi=sx1278.getRSSI();
|
||||||
|
@ -463,17 +466,17 @@ void M10M20::processM10data(uint8_t dt)
|
||||||
// 64 9F 20 => M10
|
// 64 9F 20 => M10
|
||||||
// 64 49 0x => M10 (?) -- not used here
|
// 64 49 0x => M10 (?) -- not used here
|
||||||
// 45 20 7x => M20
|
// 45 20 7x => M20
|
||||||
if(rxp==2 && dataptr[0]==0x45 && dataptr[1]==0x20) { isM20 = true; }
|
if(rxp==2) {
|
||||||
|
// Update: change type only if valid type information in received data
|
||||||
|
if(dataptr[0]==0x45 && dataptr[1]==0x20) { isM20 = true; }
|
||||||
|
else if(/*dataptr[0]==0x64 &&*/ dataptr[1]==0x9F) { isM20 = false; }
|
||||||
|
}
|
||||||
if(isM20) {
|
if(isM20) {
|
||||||
memcpy(sonde.si()->d.typestr, "M20 ", 5);
|
|
||||||
sonde.si()->d.subtype = 2;
|
|
||||||
if(rxp>=M20_FRAMELEN) {
|
if(rxp>=M20_FRAMELEN) {
|
||||||
rxsearching = true;
|
rxsearching = true;
|
||||||
haveNewFrame = decodeframeM20(dataptr);
|
haveNewFrame = decodeframeM20(dataptr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
memcpy(sonde.si()->d.typestr, "M10 ", 5);
|
|
||||||
sonde.si()->d.subtype = 1;
|
|
||||||
if(rxp>=M10_FRAMELEN) {
|
if(rxp>=M10_FRAMELEN) {
|
||||||
rxsearching = true;
|
rxsearching = true;
|
||||||
haveNewFrame = decodeframeM10(dataptr);
|
haveNewFrame = decodeframeM10(dataptr);
|
||||||
|
@ -578,6 +581,8 @@ int M10M20::decodeframeM20(uint8_t *data) {
|
||||||
|
|
||||||
Serial.println("Decoding...");
|
Serial.println("Decoding...");
|
||||||
// Its a M20
|
// Its a M20
|
||||||
|
memcpy(si->typestr, "M20 ", 5);
|
||||||
|
si->subtype = 2; // subtype 2: M20
|
||||||
// getid...
|
// getid...
|
||||||
// TODO: Adjust ID calculation and serial number reconstruction
|
// TODO: Adjust ID calculation and serial number reconstruction
|
||||||
char ids[11]={'M','E','0','0','0','0','0','0','0','0','0'};
|
char ids[11]={'M','E','0','0','0','0','0','0','0','0','0'};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const char *version_name = "rdzTTGOsonde";
|
const char *version_name = "rdzTTGOsonde";
|
||||||
const char *version_id = "devel20231203";
|
const char *version_id = "devel20231212";
|
||||||
const int SPIFFS_MAJOR=2;
|
const int SPIFFS_MAJOR=2;
|
||||||
const int SPIFFS_MINOR=17;
|
const int SPIFFS_MINOR=17;
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
|
nvs, data, nvs, 0x9000, 0x5000,
|
||||||
|
otadata, data, ota, 0xe000, 0x2000,
|
||||||
|
app0, app, ota_0, 0x10000, 0x140000,
|
||||||
|
app1, app, ota_1, 0x150000,0x140000,
|
||||||
|
spiffs, data, spiffs, 0x290000,0x160000,
|
||||||
|
coredump, data, coredump,0x3F0000,0x10000,
|
|
|
@ -19,14 +19,16 @@ lib_deps_builtin =
|
||||||
lib_deps_external =
|
lib_deps_external =
|
||||||
olikraus/U8g2 @ ^2.35.8
|
olikraus/U8g2 @ ^2.35.8
|
||||||
stevemarple/MicroNMEA @ ^2.0.5
|
stevemarple/MicroNMEA @ ^2.0.5
|
||||||
me-no-dev/ESP Async WebServer @ ^1.2.3
|
; This is an old version with regex support unconditionally compiled in (adds >100k of code)
|
||||||
|
; me-no-dev/ESP Async WebServer @ ^1.2.3
|
||||||
|
https://github.com/me-no-dev/ESPAsyncWebServer/archive/refs/heads/master.zip
|
||||||
; https://github.com/moononournation/Arduino_GFX#v1.1.5
|
; https://github.com/moononournation/Arduino_GFX#v1.1.5
|
||||||
https://github.com/moononournation/Arduino_GFX#v1.2.9
|
https://github.com/moononournation/Arduino_GFX#v1.2.9
|
||||||
https://github.com/dx168b/async-mqtt-client
|
https://github.com/dx168b/async-mqtt-client
|
||||||
|
|
||||||
[env:ttgo-lora32]
|
[env:ttgo-lora32]
|
||||||
platform = https://github.com/platformio/platform-espressif32.git#v3.3.2
|
platform = https://github.com/platformio/platform-espressif32.git#v3.3.2
|
||||||
#platform = https://github.com/platformio/platform-espressif32.git#v6.3.2
|
# platform = https://github.com/platformio/platform-espressif32.git#v6.4.0
|
||||||
#platform = https://github.com/platformio/platform-espressif32.git#v4.4.0
|
#platform = https://github.com/platformio/platform-espressif32.git#v4.4.0
|
||||||
board = ttgo-lora32-v1
|
board = ttgo-lora32-v1
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
@ -36,6 +38,8 @@ lib_deps =
|
||||||
${extra.lib_deps_external}
|
${extra.lib_deps_external}
|
||||||
paulstoffregen/Time@^1.6.0
|
paulstoffregen/Time@^1.6.0
|
||||||
lib_ignore = Time
|
lib_ignore = Time
|
||||||
|
; Same as with ArduinoIDE. Saves around 27k code
|
||||||
|
build_flags = -DCORE_DEBUG_LEVEL=0
|
||||||
|
|
||||||
; Add / remove the following two lines for separate fonts partition in flash
|
; Add / remove the following two lines for separate fonts partition in flash
|
||||||
; after changes:
|
; after changes:
|
||||||
|
@ -48,3 +52,6 @@ lib_ignore = Time
|
||||||
extra_scripts = post:scripts/makefontpartition.py
|
extra_scripts = post:scripts/makefontpartition.py
|
||||||
;board_build.partitions = partition-fonts.csv
|
;board_build.partitions = partition-fonts.csv
|
||||||
|
|
||||||
|
; Uncomment the following if you want to have the partition scheme used in the ESP32 board version 2.0.x of ArduinoIDE
|
||||||
|
; board_build.partitions = partitions-esp32v2.csv
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue