From 655e58f42482f6d92e6fc3bd837c17f40ab94592 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 07:49:58 -0500 Subject: [PATCH 1/4] [create-pull-request] automated change (#5058) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/device_ui.pb.h | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/protobufs b/protobufs index 49ebc4783..30ba09034 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 49ebc4783275f108a9f8723ca52a6edf0a954c55 +Subproject commit 30ba090346c6e67fcfed0fef1ad52c0844101382 diff --git a/src/mesh/generated/meshtastic/device_ui.pb.h b/src/mesh/generated/meshtastic/device_ui.pb.h index 014be465d..469fe6f11 100644 --- a/src/mesh/generated/meshtastic/device_ui.pb.h +++ b/src/mesh/generated/meshtastic/device_ui.pb.h @@ -32,7 +32,15 @@ typedef enum _meshtastic_Language { /* Portuguese */ meshtastic_Language_PORTUGUESE = 4, /* Spanish */ - meshtastic_Language_SPANISH = 5 + meshtastic_Language_SPANISH = 5, + /* Swedish */ + meshtastic_Language_SWEDISH = 6, + /* Finnish */ + meshtastic_Language_FINNISH = 7, + /* Polish */ + meshtastic_Language_POLISH = 8, + /* Turkish */ + meshtastic_Language_TURKISH = 9 } meshtastic_Language; /* Struct definitions */ @@ -96,8 +104,8 @@ extern "C" { #define _meshtastic_Theme_ARRAYSIZE ((meshtastic_Theme)(meshtastic_Theme_RED+1)) #define _meshtastic_Language_MIN meshtastic_Language_ENGLISH -#define _meshtastic_Language_MAX meshtastic_Language_SPANISH -#define _meshtastic_Language_ARRAYSIZE ((meshtastic_Language)(meshtastic_Language_SPANISH+1)) +#define _meshtastic_Language_MAX meshtastic_Language_TURKISH +#define _meshtastic_Language_ARRAYSIZE ((meshtastic_Language)(meshtastic_Language_TURKISH+1)) #define meshtastic_DeviceUIConfig_theme_ENUMTYPE meshtastic_Theme #define meshtastic_DeviceUIConfig_language_ENUMTYPE meshtastic_Language From 89c1e041e1abe135d4509c68a1fc7b843451b2e3 Mon Sep 17 00:00:00 2001 From: Tom <116762865+Nestpebble@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:59:38 +0100 Subject: [PATCH 2/4] Add in RF95 support to Pro-micro DIY (#5055) * Add in RF95 support Added in lines to enable RF95 modules. Tested on SX1262 by NomDeTom/ @Nestpebble . Tested with RA02 by Ludovic / @lboue * Trunk --- .../diy/nrf52_promicro_diy_tcxo/variant.h | 86 +++++++++++-------- 1 file changed, 52 insertions(+), 34 deletions(-) diff --git a/variants/diy/nrf52_promicro_diy_tcxo/variant.h b/variants/diy/nrf52_promicro_diy_tcxo/variant.h index 05d4a088c..5c535ba1e 100644 --- a/variants/diy/nrf52_promicro_diy_tcxo/variant.h +++ b/variants/diy/nrf52_promicro_diy_tcxo/variant.h @@ -22,26 +22,26 @@ extern "C" { /* NRF52 PRO MICRO PIN ASSIGNMENT -| Pin | Function | | Pin | Function | -|-------|------------|---|---------|-------------| -| Gnd | | | vbat | | -| P0.06 | Serial2 RX | | vbat | | -| P0.08 | Serial2 TX | | Gnd | | -| Gnd | | | reset | | -| Gnd | | | ext_vcc | *see 0.13 | -| P0.17 | RXEN | | P0.31 | BATTERY_PIN | -| P0.20 | GPS_RX | | P0.29 | BUSY | -| P0.22 | GPS_TX | | P0.02 | MISO | -| P0.24 | GPS_EN | | P1.15 | MOSI | -| P1.00 | BUTTON_PIN | | P1.13 | CS | -| P0.11 | SCL | | P1.11 | SCK | -| P1.04 | SDA | | P0.10 | DIO1/IRQ | -| P1.06 | Free pin | | P0.09 | RESET | -| | | | | | -| | Mid board | | | Internal | -| P1.01 | Free pin | | 0.15 | LED | -| P1.02 | Free pin | | 0.13 | 3V3_EN | -| P1.07 | Free pin | | | | +| Pin   | Function   |   | Pin     | Function     | RF95 | +| ----- | ----------- | --- | -------- | ------------ | ----- | +| Gnd   |             |   | vbat     |             | | +| P0.06 | Serial2 RX |   | vbat     |             | | +| P0.08 | Serial2 TX |   | Gnd     |             | | +| Gnd   |             |   | reset   |             | | +| Gnd   |             |   | ext_vcc | *see 0.13   | | +| P0.17 | RXEN       |   | P0.31   | BATTERY_PIN | | +| P0.20 | GPS_RX     |   | P0.29   | BUSY         | DIO0 | +| P0.22 | GPS_TX     |   | P0.02   | MISO | MISO | +| P0.24 | GPS_EN     |   | P1.15   | MOSI         | MOSI | +| P1.00 | BUTTON_PIN |   | P1.13   | CS           | CS   | +| P0.11 | SCL         |   | P1.11   | SCK         | SCK | +| P1.04 | SDA         |   | P0.10   | DIO1/IRQ     | DIO1 | +| P1.06 | Free pin   |   | P0.09   | RESET       | RST | +|       |             |   |         |             | | +|       | Mid board   |   |         | Internal     | | +| P1.01 | Free pin   |   | 0.15     | LED         | | +| P1.02 | Free pin   |   | 0.13     | 3V3_EN       | | +| P1.07 | Free pin   |   |         |             | | */ // Number of pins defined in PinDescription array @@ -112,13 +112,28 @@ NRF52 PRO MICRO PIN ASSIGNMENT #define PIN_SPI_MOSI (32 + 15) // P1.15 #define PIN_SPI_SCK (32 + 11) // P1.11 +#define LORA_MISO PIN_SPI_MISO +#define LORA_MOSI PIN_SPI_MOSI +#define LORA_SCK PIN_SPI_SCK +#define LORA_CS (32 + 13) // P1.13 + // LORA MODULES #define USE_LLCC68 #define USE_SX1262 -// #define USE_RF95 +#define USE_RF95 #define USE_SX1268 -// LORA CONFIG +// RF95 CONFIG + +#define LORA_DIO0 (0 + 29) // P0.10 IRQ +#define LORA_DIO1 (0 + 10) // P0.10 IRQ +#define LORA_RESET (0 + 9) // P0.09 + +// RX/TX for RFM95/SX127x +#define RF95_RXEN (0 + 17) // P0.17 +#define RF95_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin. If not, TXEN must be connected. + +// SX126X CONFIG #define SX126X_CS (32 + 13) // P1.13 FIXME - we really should define LORA_CS instead #define SX126X_DIO1 (0 + 10) // P0.10 IRQ #define SX126X_DIO2_AS_RF_SWITCH // Note for E22 modules: DIO2 is not attached internally to TXEN for automatic TX/RX switching, @@ -134,18 +149,21 @@ NRF52 PRO MICRO PIN ASSIGNMENT On the SX1262, DIO3 sets the voltage for an external TCXO, if one is present. If one is not present, use TCXO_OPTIONAL to try both settings. -| Mfr | Module | TCXO | RF Switch | Notes | -| ---------- | ---------------- | ---- | --------- | -------------------------------------------- | -| Ebyte | E22-900M22S | Yes | Ext | | -| Ebyte | E22-900MM22S | No | Ext | | -| Ebyte | E22-900M30S | Yes | Ext | | -| Ebyte | E22-900M33S | Yes | Ext | MAX_POWER must be set to 8 for this | -| Ebyte | E220-900M22S | No | Ext | LLCC68, looks like DIO3 not connected at all | -| AI-Thinker | RA-01SH | No | Int | | -| Heltec | HT-RA62 | Yes | Int | | -| NiceRF | Lora1262 | yes | Int | | -| Waveshare | Core1262-HF | yes | Ext | | -| Waveshare | LoRa Node Module | yes | Int | | +| Mfr | Module | TCXO | RF Switch | Notes | +| ------------ | ---------------- | ---- | --------- | ------------------------------------- | +| Ebyte | E22-900M22S | Yes | Ext | | +| Ebyte | E22-900MM22S | No | Ext | | +| Ebyte | E22-900M30S | Yes | Ext | | +| Ebyte | E22-900M33S | Yes | Ext | MAX_POWER must be set to 8 for this | +| Ebyte | E220-900M22S | No | Ext | LLCC68, looks like DIO3 not connected | +| AI-Thinker | RA-01SH | No | Int | SX1262 | +| Heltec | HT-RA62 | Yes | Int | | +| NiceRF | Lora1262 | yes | Int | | +| Waveshare | Core1262-HF | yes | Ext | | +| Waveshare | LoRa Node Module | yes | Int | | +| Seeed | Wio-SX1262 | yes | Int | Sooooo cute! | +| AI-Thinker | RA-02 | No | Int | SX1278 **433mhz band only** | +| RF Solutions | RFM95 | No | Int | Untested | */ From e49e584ae1e7a2641e06086a4e79eb611169d14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 14 Oct 2024 19:39:07 +0200 Subject: [PATCH 3/4] drop oem.proto support in favor of userprefs --- src/graphics/Screen.cpp | 70 ----------------------------------------- src/mesh/Channels.cpp | 17 +--------- src/mesh/NodeDB.cpp | 16 ---------- src/mesh/NodeDB.h | 2 -- 4 files changed, 1 insertion(+), 104 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 0b6760446..efa3ec78f 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -186,56 +186,6 @@ static void drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDispl display->setTextAlignment(TEXT_ALIGN_LEFT); // Restore left align, just to be kind to any other unsuspecting code } -static void drawOEMIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -{ - // draw an xbm image. - // Please note that everything that should be transitioned - // needs to be drawn relative to x and y - - // draw centered icon left to right and centered above the one line of app text - display->drawXbm(x + (SCREEN_WIDTH - oemStore.oem_icon_width) / 2, - y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - oemStore.oem_icon_height) / 2 + 2, oemStore.oem_icon_width, - oemStore.oem_icon_height, (const uint8_t *)oemStore.oem_icon_bits.bytes); - - switch (oemStore.oem_font) { - case 0: - display->setFont(FONT_SMALL); - break; - case 2: - display->setFont(FONT_LARGE); - break; - default: - display->setFont(FONT_MEDIUM); - break; - } - - display->setTextAlignment(TEXT_ALIGN_LEFT); - const char *title = oemStore.oem_text; - display->drawString(x + getStringCenteredX(title), y + SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM, title); - display->setFont(FONT_SMALL); - - // Draw region in upper left - if (upperMsg) - display->drawString(x + 0, y + 0, upperMsg); - - // Draw version and shortname in upper right - char buf[25]; - snprintf(buf, sizeof(buf), "%s\n%s", xstr(APP_VERSION_SHORT), haveGlyphs(owner.short_name) ? owner.short_name : ""); - - display->setTextAlignment(TEXT_ALIGN_RIGHT); - display->drawString(x + SCREEN_WIDTH, y + 0, buf); - screen->forceDisplay(); - - display->setTextAlignment(TEXT_ALIGN_LEFT); // Restore left align, just to be kind to any other unsuspecting code -} - -static void drawOEMBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -{ - // Draw region in upper left - const char *region = myRegion ? myRegion->name : NULL; - drawOEMIconScreen(region, display, state, x, y); -} - void Screen::drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *message) { uint16_t x_offset = display->width() / 2; @@ -1699,9 +1649,6 @@ void Screen::setup() // Set the utf8 conversion function dispdev->setFontTableLookupFunction(customFontTableLookup); - if (strlen(oemStore.oem_text) > 0) - logo_timeout *= 2; - // Add frames. EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); alertFrames[0] = [this](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { @@ -1847,23 +1794,6 @@ int32_t Screen::runOnce() showingBootScreen = false; } - // If we have an OEM Boot screen, toggle after logo_timeout seconds - if (strlen(oemStore.oem_text) > 0) { - static bool showingOEMBootScreen = true; - if (showingOEMBootScreen && (millis() > ((logo_timeout / 2) + serialSinceMsec))) { - LOG_INFO("Switch to OEM screen..."); - // Change frames. - static FrameCallback bootOEMFrames[] = {drawOEMBootScreen}; - static const int bootOEMFrameCount = sizeof(bootOEMFrames) / sizeof(bootOEMFrames[0]); - ui->setFrames(bootOEMFrames, bootOEMFrameCount); - ui->update(); -#ifndef USE_EINK - ui->update(); -#endif - showingOEMBootScreen = false; - } - } - #ifndef DISABLE_WELCOME_UNSET if (showingNormalScreen && config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET) { setWelcomeFrames(); diff --git a/src/mesh/Channels.cpp b/src/mesh/Channels.cpp index b42655175..211d9afd4 100644 --- a/src/mesh/Channels.cpp +++ b/src/mesh/Channels.cpp @@ -187,22 +187,7 @@ CryptoKey Channels::getKey(ChannelIndex chIndex) LOG_DEBUG("Expanding short PSK #%d", pskIndex); if (pskIndex == 0) k.length = 0; // Turn off encryption - else if (oemStore.oem_aes_key.size > 1) { - // Use the OEM key - LOG_DEBUG("Using OEM Key with %d bytes", oemStore.oem_aes_key.size); - memcpy(k.bytes, oemStore.oem_aes_key.bytes, oemStore.oem_aes_key.size); - k.length = oemStore.oem_aes_key.size; - // Bump up the last byte of PSK as needed - uint8_t *last = k.bytes + oemStore.oem_aes_key.size - 1; - *last = *last + pskIndex - 1; // index of 1 means no change vs defaultPSK - if (k.length < 16) { - LOG_WARN("OEM provided a too short AES128 key - padding"); - k.length = 16; - } else if (k.length < 32 && k.length != 16) { - LOG_WARN("OEM provided a too short AES256 key - padding"); - k.length = 32; - } - } else { + else { memcpy(k.bytes, defaultpsk, sizeof(defaultpsk)); k.length = sizeof(defaultpsk); // Bump up the last byte of PSK as needed diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 2ff688a02..371cea413 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -55,8 +55,6 @@ meshtastic_MyNodeInfo &myNodeInfo = devicestate.my_node; meshtastic_LocalConfig config; meshtastic_LocalModuleConfig moduleConfig; meshtastic_ChannelFile channelFile; -meshtastic_OEMStore oemStore; -static bool hasOemStore = false; bool meshtastic_DeviceState_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field) { @@ -684,7 +682,6 @@ static const char *prefFileName = "/prefs/db.proto"; static const char *configFileName = "/prefs/config.proto"; static const char *moduleConfigFileName = "/prefs/module.proto"; static const char *channelFileName = "/prefs/channels.proto"; -static const char *oemConfigFile = "/oem/oem.proto"; /** Load a protobuf from a file, return LoadFileResult */ LoadFileResult NodeDB::loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields, @@ -785,12 +782,6 @@ void NodeDB::loadFromDisk() } } - state = loadProto(oemConfigFile, meshtastic_OEMStore_size, sizeof(meshtastic_OEMStore), &meshtastic_OEMStore_msg, &oemStore); - if (state == LoadFileResult::LOAD_SUCCESS) { - LOG_INFO("Loaded OEMStore"); - hasOemStore = true; - } - // 2.4.X - configuration migration to update new default intervals if (moduleConfig.version < 23) { LOG_DEBUG("ModuleConfig version %d is stale, upgrading to new default intervals", moduleConfig.version); @@ -897,11 +888,6 @@ bool NodeDB::saveToDiskNoRetry(int saveWhat) saveProto(moduleConfigFileName, meshtastic_LocalModuleConfig_size, &meshtastic_LocalModuleConfig_msg, &moduleConfig); } - // We might need to rewrite the OEM data if we are reformatting the FS - if ((saveWhat & SEGMENT_OEM) && hasOemStore) { - success &= saveProto(oemConfigFile, meshtastic_OEMStore_size, &meshtastic_OEMStore_msg, &oemStore); - } - if (saveWhat & SEGMENT_CHANNELS) { success &= saveChannelsToDisk(); } @@ -922,8 +908,6 @@ bool NodeDB::saveToDisk(int saveWhat) #ifdef ARCH_NRF52 // @geeksville is not ready yet to say we should do this on other platforms. See bug #4184 discussion FSCom.format(); - // We need to rewrite the OEM data if we are reformatting the FS - saveWhat |= SEGMENT_OEM; #endif success = saveToDiskNoRetry(saveWhat); diff --git a/src/mesh/NodeDB.h b/src/mesh/NodeDB.h index cfab1d438..eb33a2f6d 100644 --- a/src/mesh/NodeDB.h +++ b/src/mesh/NodeDB.h @@ -21,7 +21,6 @@ DeviceState versions used to be defined in the .proto file but really only this #define SEGMENT_MODULECONFIG 2 #define SEGMENT_DEVICESTATE 4 #define SEGMENT_CHANNELS 8 -#define SEGMENT_OEM 16 #define DEVICESTATE_CUR_VER 23 #define DEVICESTATE_MIN_VER 22 @@ -31,7 +30,6 @@ extern meshtastic_ChannelFile channelFile; extern meshtastic_MyNodeInfo &myNodeInfo; extern meshtastic_LocalConfig config; extern meshtastic_LocalModuleConfig moduleConfig; -extern meshtastic_OEMStore oemStore; extern meshtastic_User &owner; extern meshtastic_Position localPosition; From 1212969ff798d608b6c11d15fefd67365056ae38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 14:10:19 -0500 Subject: [PATCH 4/4] [create-pull-request] automated change (#5062) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- .../generated/meshtastic/deviceonly.pb.cpp | 5 -- src/mesh/generated/meshtastic/deviceonly.pb.h | 82 +------------------ 3 files changed, 2 insertions(+), 87 deletions(-) diff --git a/protobufs b/protobufs index 30ba09034..e22381a3c 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 30ba090346c6e67fcfed0fef1ad52c0844101382 +Subproject commit e22381a3c6bbdd428f127ed8c0aa0a37789c3907 diff --git a/src/mesh/generated/meshtastic/deviceonly.pb.cpp b/src/mesh/generated/meshtastic/deviceonly.pb.cpp index 135634762..92853f00d 100644 --- a/src/mesh/generated/meshtastic/deviceonly.pb.cpp +++ b/src/mesh/generated/meshtastic/deviceonly.pb.cpp @@ -21,9 +21,4 @@ PB_BIND(meshtastic_DeviceState, meshtastic_DeviceState, 2) PB_BIND(meshtastic_ChannelFile, meshtastic_ChannelFile, 2) -PB_BIND(meshtastic_OEMStore, meshtastic_OEMStore, 2) - - - - diff --git a/src/mesh/generated/meshtastic/deviceonly.pb.h b/src/mesh/generated/meshtastic/deviceonly.pb.h index 2aa8fda8e..a90e72244 100644 --- a/src/mesh/generated/meshtastic/deviceonly.pb.h +++ b/src/mesh/generated/meshtastic/deviceonly.pb.h @@ -6,7 +6,6 @@ #include #include #include "meshtastic/channel.pb.h" -#include "meshtastic/localonly.pb.h" #include "meshtastic/mesh.pb.h" #include "meshtastic/telemetry.pb.h" #include "meshtastic/config.pb.h" @@ -15,17 +14,6 @@ #error Regenerate this file with the current version of nanopb generator. #endif -/* Enum definitions */ -/* Font sizes for the device screen */ -typedef enum _meshtastic_ScreenFonts { - /* TODO: REPLACE */ - meshtastic_ScreenFonts_FONT_SMALL = 0, - /* TODO: REPLACE */ - meshtastic_ScreenFonts_FONT_MEDIUM = 1, - /* TODO: REPLACE */ - meshtastic_ScreenFonts_FONT_LARGE = 2 -} meshtastic_ScreenFonts; - /* Struct definitions */ /* Position with static location information only for NodeDBLite */ typedef struct _meshtastic_PositionLite { @@ -154,65 +142,22 @@ typedef struct _meshtastic_ChannelFile { uint32_t version; } meshtastic_ChannelFile; -typedef PB_BYTES_ARRAY_T(2048) meshtastic_OEMStore_oem_icon_bits_t; -typedef PB_BYTES_ARRAY_T(32) meshtastic_OEMStore_oem_aes_key_t; -/* This can be used for customizing the firmware distribution. If populated, - show a secondary bootup screen with custom logo and text for 2.5 seconds. */ -typedef struct _meshtastic_OEMStore { - /* The Logo width in Px */ - uint32_t oem_icon_width; - /* The Logo height in Px */ - uint32_t oem_icon_height; - /* The Logo in XBM bytechar format */ - meshtastic_OEMStore_oem_icon_bits_t oem_icon_bits; - /* Use this font for the OEM text. */ - meshtastic_ScreenFonts oem_font; - /* Use this font for the OEM text. */ - char oem_text[40]; - /* The default device encryption key, 16 or 32 byte */ - meshtastic_OEMStore_oem_aes_key_t oem_aes_key; - /* A Preset LocalConfig to apply during factory reset */ - bool has_oem_local_config; - meshtastic_LocalConfig oem_local_config; - /* A Preset LocalModuleConfig to apply during factory reset */ - bool has_oem_local_module_config; - meshtastic_LocalModuleConfig oem_local_module_config; -} meshtastic_OEMStore; - #ifdef __cplusplus extern "C" { #endif -/* Helper constants for enums */ -#define _meshtastic_ScreenFonts_MIN meshtastic_ScreenFonts_FONT_SMALL -#define _meshtastic_ScreenFonts_MAX meshtastic_ScreenFonts_FONT_LARGE -#define _meshtastic_ScreenFonts_ARRAYSIZE ((meshtastic_ScreenFonts)(meshtastic_ScreenFonts_FONT_LARGE+1)) - -#define meshtastic_PositionLite_location_source_ENUMTYPE meshtastic_Position_LocSource - -#define meshtastic_UserLite_hw_model_ENUMTYPE meshtastic_HardwareModel -#define meshtastic_UserLite_role_ENUMTYPE meshtastic_Config_DeviceConfig_Role - - - - -#define meshtastic_OEMStore_oem_font_ENUMTYPE meshtastic_ScreenFonts - - /* Initializer values for message structs */ #define meshtastic_PositionLite_init_default {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN} #define meshtastic_UserLite_init_default {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}} #define meshtastic_NodeInfoLite_init_default {0, false, meshtastic_UserLite_init_default, false, meshtastic_PositionLite_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0} #define meshtastic_DeviceState_init_default {false, meshtastic_MyNodeInfo_init_default, false, meshtastic_User_init_default, 0, {meshtastic_MeshPacket_init_default}, false, meshtastic_MeshPacket_init_default, 0, 0, 0, false, meshtastic_MeshPacket_init_default, 0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}, {0}} #define meshtastic_ChannelFile_init_default {0, {meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default}, 0} -#define meshtastic_OEMStore_init_default {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default} #define meshtastic_PositionLite_init_zero {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN} #define meshtastic_UserLite_init_zero {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}} #define meshtastic_NodeInfoLite_init_zero {0, false, meshtastic_UserLite_init_zero, false, meshtastic_PositionLite_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0} #define meshtastic_DeviceState_init_zero {false, meshtastic_MyNodeInfo_init_zero, false, meshtastic_User_init_zero, 0, {meshtastic_MeshPacket_init_zero}, false, meshtastic_MeshPacket_init_zero, 0, 0, 0, false, meshtastic_MeshPacket_init_zero, 0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}, {0}} #define meshtastic_ChannelFile_init_zero {0, {meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero}, 0} -#define meshtastic_OEMStore_init_zero {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_PositionLite_latitude_i_tag 1 @@ -249,14 +194,6 @@ extern "C" { #define meshtastic_DeviceState_node_db_lite_tag 14 #define meshtastic_ChannelFile_channels_tag 1 #define meshtastic_ChannelFile_version_tag 2 -#define meshtastic_OEMStore_oem_icon_width_tag 1 -#define meshtastic_OEMStore_oem_icon_height_tag 2 -#define meshtastic_OEMStore_oem_icon_bits_tag 3 -#define meshtastic_OEMStore_oem_font_tag 4 -#define meshtastic_OEMStore_oem_text_tag 5 -#define meshtastic_OEMStore_oem_aes_key_tag 6 -#define meshtastic_OEMStore_oem_local_config_tag 7 -#define meshtastic_OEMStore_oem_local_module_config_tag 8 /* Struct field encoding specification for nanopb */ #define meshtastic_PositionLite_FIELDLIST(X, a) \ @@ -325,26 +262,11 @@ X(a, STATIC, SINGULAR, UINT32, version, 2) #define meshtastic_ChannelFile_DEFAULT NULL #define meshtastic_ChannelFile_channels_MSGTYPE meshtastic_Channel -#define meshtastic_OEMStore_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UINT32, oem_icon_width, 1) \ -X(a, STATIC, SINGULAR, UINT32, oem_icon_height, 2) \ -X(a, STATIC, SINGULAR, BYTES, oem_icon_bits, 3) \ -X(a, STATIC, SINGULAR, UENUM, oem_font, 4) \ -X(a, STATIC, SINGULAR, STRING, oem_text, 5) \ -X(a, STATIC, SINGULAR, BYTES, oem_aes_key, 6) \ -X(a, STATIC, OPTIONAL, MESSAGE, oem_local_config, 7) \ -X(a, STATIC, OPTIONAL, MESSAGE, oem_local_module_config, 8) -#define meshtastic_OEMStore_CALLBACK NULL -#define meshtastic_OEMStore_DEFAULT NULL -#define meshtastic_OEMStore_oem_local_config_MSGTYPE meshtastic_LocalConfig -#define meshtastic_OEMStore_oem_local_module_config_MSGTYPE meshtastic_LocalModuleConfig - extern const pb_msgdesc_t meshtastic_PositionLite_msg; extern const pb_msgdesc_t meshtastic_UserLite_msg; extern const pb_msgdesc_t meshtastic_NodeInfoLite_msg; extern const pb_msgdesc_t meshtastic_DeviceState_msg; extern const pb_msgdesc_t meshtastic_ChannelFile_msg; -extern const pb_msgdesc_t meshtastic_OEMStore_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define meshtastic_PositionLite_fields &meshtastic_PositionLite_msg @@ -352,14 +274,12 @@ extern const pb_msgdesc_t meshtastic_OEMStore_msg; #define meshtastic_NodeInfoLite_fields &meshtastic_NodeInfoLite_msg #define meshtastic_DeviceState_fields &meshtastic_DeviceState_msg #define meshtastic_ChannelFile_fields &meshtastic_ChannelFile_msg -#define meshtastic_OEMStore_fields &meshtastic_OEMStore_msg /* Maximum encoded size of messages (where known) */ /* meshtastic_DeviceState_size depends on runtime parameters */ -#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_OEMStore_size +#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_ChannelFile_size #define meshtastic_ChannelFile_size 718 #define meshtastic_NodeInfoLite_size 183 -#define meshtastic_OEMStore_size 3578 #define meshtastic_PositionLite_size 28 #define meshtastic_UserLite_size 96