diff --git a/examples/companion_radio/ui-core/SettingsSchema.h b/examples/companion_radio/ui-core/SettingsSchema.h index e8f5589f..c406448c 100644 --- a/examples/companion_radio/ui-core/SettingsSchema.h +++ b/examples/companion_radio/ui-core/SettingsSchema.h @@ -217,7 +217,7 @@ static void applyRxGain(UiCore& c) { if (c.prefs()) radio_driver.setRxBoos #define SW(label, hint, sec, f, chg) { label, hint, sec, NP_OFF(f), 2, nullptr, chg, nullptr, 1 } #define MAP(label, hint, sec, f, vals, opt, chg) { label, hint, sec, NP_OFF(f), COUNT_OF(vals), opt, chg, vals, NP_SIZE(f) } #define MAPF(label, hint, sec, f, vals, opt) { label, hint, sec, NP_OFF(f), COUNT_OF(vals), opt, nullptr, vals, FLOAT_X100 } -#define BIT(label, hint, sec, f, mask) { label, hint, sec, NP_OFF(f), 2, nullptr, nullptr, nullptr, 1, mask } +#define FLAGBIT(label, hint, sec, f, mask) { label, hint, sec, NP_OFF(f), 2, nullptr, nullptr, nullptr, 1, mask } static const Setting ALL[] = { #ifndef TRAIL_FIXED_MIN_DELTA_M // else every sample past a fixed jitter gate is kept IDX("Point spacing", "Between trail points", SEC_TRAIL, trail_min_delta_idx, @@ -284,12 +284,12 @@ static const Setting ALL[] = { // manual_add_contacts bit 0: 0 adds every node heard, 1 only the types below. IDX("Add heard nodes", "Every node, or only these types", SEC_AUTO_ADD, manual_add_contacts, 2, optAutoAdd, nullptr), - BIT("Companions", nullptr, SEC_AUTO_ADD, autoadd_config, 0x02), - BIT("Repeaters", nullptr, SEC_AUTO_ADD, autoadd_config, 0x04), - BIT("Rooms", nullptr, SEC_AUTO_ADD, autoadd_config, 0x08), - BIT("Sensors", nullptr, SEC_AUTO_ADD, autoadd_config, 0x10), + FLAGBIT("Companions", nullptr, SEC_AUTO_ADD, autoadd_config, 0x02), + FLAGBIT("Repeaters", nullptr, SEC_AUTO_ADD, autoadd_config, 0x04), + FLAGBIT("Rooms", nullptr, SEC_AUTO_ADD, autoadd_config, 0x08), + FLAGBIT("Sensors", nullptr, SEC_AUTO_ADD, autoadd_config, 0x10), MAP("Up to", "How far away a node may be", SEC_AUTO_ADD, autoadd_max_hops, MAX_HOPS, optMaxHops, nullptr), - BIT("Replace oldest", "When the list is full; not favourites", SEC_AUTO_ADD, autoadd_config, 0x01), + FLAGBIT("Replace oldest", "When the list is full; not favourites", SEC_AUTO_ADD, autoadd_config, 0x01), // On / Off / Auto spans two fields (soundctl::setMode): the frontend's own row. IDX("Volume", nullptr, SEC_SOUND, buzzer_volume, 5, optVolume, applySound), @@ -363,7 +363,7 @@ static int indexOf(uint16_t offset) { #undef SW #undef MAP #undef MAPF -#undef BIT +#undef FLAGBIT #undef COUNT_OF #undef NP_SIZE #undef NP_OFF diff --git a/examples/companion_radio/ui-lvgl/LvglPort.h b/examples/companion_radio/ui-lvgl/LvglPort.h index 71847e67..a80b22de 100644 --- a/examples/companion_radio/ui-lvgl/LvglPort.h +++ b/examples/companion_radio/ui-lvgl/LvglPort.h @@ -649,7 +649,7 @@ static int scanResults(char names[][33], int max) { enum { F_IDLE, F_REQUESTED, F_BUSY, F_DONE, F_FAILED }; static volatile int s_fstate = F_IDLE; static volatile int s_fcode = 0; -static char s_furl[200]; +static char s_furl[320]; static uint8_t* s_fbuf = nullptr; static size_t s_fcap = 0; static volatile size_t s_flen = 0; diff --git a/examples/companion_radio/ui-lvgl/map/TileDownloader.h b/examples/companion_radio/ui-lvgl/map/TileDownloader.h index 0e7963c3..1931191f 100644 --- a/examples/companion_radio/ui-lvgl/map/TileDownloader.h +++ b/examples/companion_radio/ui-lvgl/map/TileDownloader.h @@ -306,7 +306,7 @@ public: struct stat st; if (!_force && stat(path, &st) == 0 && (st.st_size > 0 || _layer == 1)) { _skipped++; advance(); continue; } // an empty trails file counts if ((int32_t)(millis() - _last_start) < (int32_t)_gap_ms) return; // be gentle with the server (a retry waits longer) - char url[200]; + char url[320]; buildUrl(url, sizeof(url), _z, _x, _y, _layer); int r = lvport::fetchStart(url); if (r > 0) { _fetching = true; _last_start = millis(); } @@ -346,7 +346,7 @@ private: uint32_t _last_start = 0, _connect_started = 0; uint32_t _placeholder_hash = 0; uint8_t _placeholder_hits = 0; - char _url_tpl[160] = ""; + char _url_tpl[256] = ""; // source.txt line 1: long enough for an API key char _attr[96] = ""; char _host[48] = ""; int _src_zmax = 17; @@ -442,7 +442,7 @@ private: _lv_cur = _lv_q[0]; for (int i = 1; i < _lv_n; i++) _lv_q[i - 1] = _lv_q[i]; _lv_n--; - char url[200]; + char url[320]; buildUrl(url, sizeof(url), _lv_cur.z, _lv_cur.x, _lv_cur.y, _lv_cur.layer); if (lvport::fetchStart(url) > 0) { _lv_fetching = true; _last_start = millis(); } else _lv_q[_lv_n++] = _lv_cur; // fetcher busy: back in the queue @@ -566,7 +566,7 @@ private: char path[64]; snprintf(path, sizeof(path), "%s/source.txt", _root); if (FILE* f = fopen(path, "r")) { - char line[160]; + char line[256]; if (fgets(line, sizeof(line), f)) { trim(line); if (strstr(line, "{z}")) snprintf(_url_tpl, sizeof(_url_tpl), "%s", line); } if (fgets(line, sizeof(line), f)) { trim(line); if (line[0]) snprintf(_attr, sizeof(_attr), "%s", line); } if (fgets(line, sizeof(line), f)) { int z = atoi(line); if (z >= 1 && z <= 22) _src_zmax = z; } diff --git a/src/helpers/esp32/ESPNOWRadio.h b/src/helpers/esp32/ESPNOWRadio.h index f474215a..bda44a7e 100644 --- a/src/helpers/esp32/ESPNOWRadio.h +++ b/src/helpers/esp32/ESPNOWRadio.h @@ -38,7 +38,7 @@ public: * These two functions do nothing for ESP-NOW, but are needed for the * Radio interface. */ - virtual bool setRxBoostedGainMode(bool) { } + virtual bool setRxBoostedGainMode(bool) { return false; } virtual bool getRxBoostedGainMode() const { return false; } uint32_t intID(); diff --git a/src/helpers/sensors/RAK12035_SoilMoisture.cpp b/src/helpers/sensors/RAK12035_SoilMoisture.cpp index 8b291306..ace8cc85 100644 --- a/src/helpers/sensors/RAK12035_SoilMoisture.cpp +++ b/src/helpers/sensors/RAK12035_SoilMoisture.cpp @@ -442,6 +442,7 @@ bool RAK12035_SoilMoisture::sensor_on() delay(10); //delay 10mS } } + return true; } bool RAK12035_SoilMoisture::reset()