* Fix protobuf structs handling (#4140) * Fix protobuf structs handling * Log instead of assert --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> * BLE based logging (#4146) * WIP log characteristic * Bluetooth logging plumbing * Characteristic * Callback * Check for nullptr * Esp32 bluetooth impl * Formatting * Add thread name and log level * Add settings guard * Remove comments * Field name * Fixes esp32 * Open it up * Whoops * Move va_end past our logic * Use `upload_protocol = esptool` as with the other heltec devices instead of `esp-builtin` (#4151) * Standardize lat/lon position logs (#4156) * Standardize lat/lon position logs * Missed sone and condensed logs * [create-pull-request] automated change (#4157) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> * Pause BLE logging during want_config flow (#4162) * Update NimBLE to 1.4.2 (#4163) * Implement replies for all telemetry types based on variant tag (#4164) * Implement replies for all telemetry types based on variant tag * Remove check for `ignoreRequest`: modules can set this, don't need to check --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> * Esptool is better * Explicitly set characteristic * fix INA3221 sensor (#4168) - pass wire to begin() - remove redundant setAddr() (already set in header) * Show compass on waypoint frame; clear when waypoint deleted (#4116) * Clear expired or deleted waypoint frame * Return 0 to CallbackObserver * Add a missing comment * Draw compass for waypoint frame * Display our own waypoints * [create-pull-request] automated change (#4171) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> * Add semihosting support for nrf52 devices (#4137) * Turn off vscode cmake prompt - we don't use cmake on meshtastic * Add rak4631_dap variant for debugging with NanoDAP debug probe device. * The rak device can also run freertos (which is underneath nrf52 arduino) * Add semihosting support for nrf52840 devices Initial platformio.ini file only supports rak4630 Default to non TCP for the semihosting log output for now... Fixes https://github.com/meshtastic/firmware/issues/4135 * fix my botched merge - keep board_level = extra flag for rak3631_dbg --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> * [create-pull-request] automated change (#4174) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> * Display alerts (#4170) * Move static functions into Screen.h, show compass during calibration * Move to _fontHeight macro to avoid collision * Move some alert functions to new alert handler * Catch missed reboot code * ESP32 fixes * Bump esp8266-oled-ssd1306 * Fixes for when a device has no screen * Use new startAlert(char*) helper class * Add EINK bits back to alert handling * Add noop class for no-display devices --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> * Send file system manifest up on want_config (#4176) * Send file system manifest up on want_config * Platform specific methods * Helps to actually make the change * Clear * tell vscode, if formatting, use whatever our trunk formatter wants (#4186) without this flag if the user has set some other formatter (clang) in their user level settings, it will be looking in the wrong directory for the clang options (we want the options in .trunk/clang) Note: formatOnSave is true in master, which means a bunch of our older files are non compliant and if you edit them it will generate lots of formatting related diffs. I guess I'll start letting that happen with my future commits ;-). * fix the build - would loop forever if there were no files to send (#4188) * Show owner.short_name on boot (and E-Ink sleep screen) (#4134) * Show owner.short_name on boot and sleep screen (on e-ink) * Update Screen.cpp - new line for short_name Boot screen short_name now below the region setting. Looks better on small screens. * Draw short_name on right --------- Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com> Co-authored-by: todd-herbert <herbert.todd@gmail.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com> * nrf52 soft device will watchdog if you use ICE while BT on... (#4189) so have debugger disable bluetooth. * correct xiao_ble build preventing sx1262 init (#4191) * Force a compile time failur if FromRadio or ToRadio get larger than (#4190) a BLE packet size. We are actually very close to this threshold so important to make sure we don't accidentally pass it. * Clear vector after complete config state (#4194) * Clear after complete config * Don't collect . entries * Log file name and size * [create-pull-request] automated change (#4200) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> * Make the logs Colorful! (#4199) * Squash needlessly static functions (#4183) * Trim extra vprintf and filter for unprintable characters * Deprecate Router Client role (and make it Client) (#4201) * [create-pull-request] automated change (#4205) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> * Move waypoint (#4202) * Move waypoint screen draw into the waypoint module * Get the observer set up for the waypoint screen draw * Static squashing: screen dimensions Macros moved back to Screen.cpp, as a band-aid until we eventually move all those static functions into the Screen class. * Move getCompassDiam into Screen class (supress compiler warnings) At this stage, the method is still static, because it's used by drawNodeInfo, which has no tidy reference to our screen instance. This is probably just another band-aid until these static functions all move. * Use new getCompassDiam function in AccelerometerThread * Properly gate display code in WaypointModule --------- Co-authored-by: Todd Herbert <herbert.todd@gmail.com> * Fix flakey phone api transition from file manifest to complete (#4209) * Try fix flakey phone api transition from file manifest to complete * Skip * enable colors in platformio serial monitor (#4217) * When talking via serial, encapsulate log messages in protobufs if necessary (#4187) * clean up RedirectablePrint::log so it doesn't have three very different implementations inline. * remove NoopPrint - it is no longer needed * when talking to API clients via serial, don't turn off log msgs instead encapsuate them * fix the build - would loop forever if there were no files to send * don't use Segger code if not talking to a Segger debugger * when encapsulating logs, make sure the strings always has nul terminators * nrf52 soft device will watchdog if you use ICE while BT on... so have debugger disable bluetooth. * Important to not print debug messages while writing to the toPhone scratch buffer * don't include newlines if encapsulating log records as protobufs --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> * [create-pull-request] automated change (#4218) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> * Fix SHT41 support (#4222) * Add SHT41 Serial to I2c Detection Code On the Seeed Wio-WM1110 Dev Kit board, the SHT41 chip was being incorrectly detected as SHT31. This patch adds the necessary serial number for the SHT41 chip to be correctly detected. fixes meshtastic/firmware#4221 * Add missing sensor read for SHT41 * Typo fix in logs - mhz - MHz (#4225) As reported by karamo, a few different places in our logs had incorrect capitalization of MHz. fixes meshtastic/firmware#4126 * New new BLE logging characteristic with LogRecord protos (#4220) * New UUID * New log radio characteristic with LogRecord protobuf * LogRecord * Merge derp * How did you get there * Trunk * Fix length * Remove assert * minor cleanup proposal (#4169) * MESHTASTIC_EXCLUDE_WIFI and HAS_WIFI cleanup... Our code was checking HAS_WIFI and the new MESHTASTIC_EXCLUDE_WIFI flags in various places (even though EXCLUDE_WIFI forces HAS_WIFI to 0). Instead just check HAS_WIFI, only use EXCLUDE_WIFI inside configuration.h * cleanup: use HAS_NETWORKING instead of HAS_WIFI || HAS_ETHERNET We already had HAS_NETWORKING as flag in MQTT to mean 'we have tcpip'. Generallize that and move it into configuration.h so that we can use it elsewhere. * Use #pragma once, because supported by gcc and all modern compilers instead of #ifdef DOTHFILE_H etc... --------- Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz> * Add PowerMon support (#4155) * Turn off vscode cmake prompt - we don't use cmake on meshtastic * Add rak4631_dap variant for debugging with NanoDAP debug probe device. * The rak device can also run freertos (which is underneath nrf52 arduino) * Add semihosting support for nrf52840 devices Initial platformio.ini file only supports rak4630 Default to non TCP for the semihosting log output for now... Fixes https://github.com/meshtastic/firmware/issues/4135 * powermon WIP (for https://github.com/meshtastic/firmware/issues/4136 ) * oops - mean't to mark the _dbg variant as an 'extra' board. * powermon wip * Make serial port on wio-sdk-wm1110 board work By disabling the (inaccessible) adafruit USB * Instrument (radiolib only for now) lora for powermon per https://github.com/meshtastic/firmware/issues/4136 * powermon gps support https://github.com/meshtastic/firmware/issues/4136 * Add CPU deep and light sleep powermon states https://github.com/meshtastic/firmware/issues/4136 * Change the board/swversion bootstring so it is a new "structured" log msg. * powermon wip * add example script for getting esp S3 debugging working Not yet used but I didn't want these nasty tricks to get lost yet. * Add PowerMon reporting for screen and bluetooth pwr. * make power.powermon_enables config setting work. * update to latest protobufs * fix bogus shellcheck warning * make powermon optional (but default enabled because tiny and no runtime impact) * tell vscode, if formatting, use whatever our trunk formatter wants without this flag if the user has set some other formatter (clang) in their user level settings, it will be looking in the wrong directory for the clang options (we want the options in .trunk/clang) Note: formatOnSave is true in master, which means a bunch of our older files are non compliant and if you edit them it will generate lots of formatting related diffs. I guess I'll start letting that happen with my future commits ;-). * add PowerStress module * nrf52 arduino is built upon freertos, so let platformio debug it * don't accidentally try to Segger ICE if we are using another ICE * clean up RedirectablePrint::log so it doesn't have three very different implementations inline. * remove NoopPrint - it is no longer needed * when talking to API clients via serial, don't turn off log msgs instead encapsuate them * fix the build - would loop forever if there were no files to send * don't use Segger code if not talking to a Segger debugger * when encapsulating logs, make sure the strings always has nul terminators * nrf52 soft device will watchdog if you use ICE while BT on... so have debugger disable bluetooth. * Important to not print debug messages while writing to the toPhone scratch buffer * don't include newlines if encapsulating log records as protobufs * update to latest protobufs (needed for powermon goo) * PowerStress WIP * fix linter warning * Cleanup buffer * Merge hex for wm1110 target(s) * Only sdk * Sudo * Fix exclude macros (#4233) * fix MESHTASTIC_EXCLUDE_BLUETOOTH * fix HAS_SCREEN=0 * fix MESHTASTIC_EXCLUDE_GPS * fix typo in build-nrf52.sh (#4231) chmod is the command, '+x' is the argument. * Tidy Wireless Paper variant files (#4238) * Quick tidy of pins_arduino.h Matches requests made at https://github.com/meshtastic/firmware/pull/4226#discussion_r1664183480) * Tidy variant.h * Change deprecated ADC attenuation parameter From 11dB to 12dB. Resolves compiler warning. Allegly, no impact on function: `This is deprecated, it behaves the same as `ADC_ATTEN_DB_12` * Updated raspbian CI to update apt repository ahead of libbluetooth. (#4243) * Fix BLE logging on nrf52 (#4244) * allow ble logrecords to be fetched either by NOTIFY or INDICATE ble types This allows 'lossless' log reading. If client has requested INDICATE (rather than NOTIFY) each log record emitted via log() will have to fetched by the client device before the meshtastic node can continue. * Fix serious problem with nrf52 BLE logging. When doing notifies of LogRecords it is important to use the binary write routines - writing using the 'string' write won't work. Because protobufs can contain \0 nuls inside of them which if being parsed as a string will cause only a portion of the protobuf to be sent. I noticed this because some log messages were not getting through. --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> * Fix build when HAS_NETWORKING is false on nrf52 (#4237) (tested on a rak4631 by setting HAS_ETHERNET false when shrinking image) * If `toPhoneQueue` is full, still increment `fromNum` to avoid client never getting packets (#4246) * Update to SoftDevice 7.3.0 for wio-sdk-wm1110 and wio-tracker-wm1110 (#4248) * Update variant.h * Update wio-tracker-wm1110.json * Update wio-sdk-wm1110.json * Update platformio.ini * Update platformio.ini * Add files via upload * Add files via upload * Update variant.h --------- Co-authored-by: Mike <mikhael.skvortsov@gmail.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Mike G <mkgin@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Co-authored-by: Warren Guy <5602790+warrenguy@users.noreply.github.com> Co-authored-by: todd-herbert <herbert.todd@gmail.com> Co-authored-by: geeksville <kevinh@geeksville.com> Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz> Co-authored-by: Alexander <156134901+Dorn8010@users.noreply.github.com> Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com> Co-authored-by: quimnut <github@dopegoat.com> Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com> Co-authored-by: Agent Blu, 006 <blu006@ucr.edu> Co-authored-by: Mark Trevor Birss <markbirss@gmail.com>
318 lines
17 KiB
C++
318 lines
17 KiB
C++
/* Automatically generated nanopb header */
|
|
/* Generated by nanopb-0.4.8 */
|
|
|
|
#ifndef PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED
|
|
#define PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED
|
|
#include <pb.h>
|
|
#include <vector>
|
|
#include "meshtastic/channel.pb.h"
|
|
#include "meshtastic/localonly.pb.h"
|
|
#include "meshtastic/mesh.pb.h"
|
|
#include "meshtastic/telemetry.pb.h"
|
|
|
|
#if PB_PROTO_HEADER_VERSION != 40
|
|
#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 {
|
|
/* The new preferred location encoding, multiply by 1e-7 to get degrees
|
|
in floating point */
|
|
int32_t latitude_i;
|
|
/* TODO: REPLACE */
|
|
int32_t longitude_i;
|
|
/* In meters above MSL (but see issue #359) */
|
|
int32_t altitude;
|
|
/* This is usually not sent over the mesh (to save space), but it is sent
|
|
from the phone so that the local device can set its RTC If it is sent over
|
|
the mesh (because there are devices on the mesh without GPS), it will only
|
|
be sent by devices which has a hardware GPS clock.
|
|
seconds since 1970 */
|
|
uint32_t time;
|
|
/* TODO: REPLACE */
|
|
meshtastic_Position_LocSource location_source;
|
|
} meshtastic_PositionLite;
|
|
|
|
typedef struct _meshtastic_NodeInfoLite {
|
|
/* The node number */
|
|
uint32_t num;
|
|
/* The user info for this node */
|
|
bool has_user;
|
|
meshtastic_User user;
|
|
/* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.
|
|
Position.time now indicates the last time we received a POSITION from that node. */
|
|
bool has_position;
|
|
meshtastic_PositionLite position;
|
|
/* Returns the Signal-to-noise ratio (SNR) of the last received message,
|
|
as measured by the receiver. Return SNR of the last received message in dB */
|
|
float snr;
|
|
/* Set to indicate the last time we received a packet from this node */
|
|
uint32_t last_heard;
|
|
/* The latest device metrics for the node. */
|
|
bool has_device_metrics;
|
|
meshtastic_DeviceMetrics device_metrics;
|
|
/* local channel index we heard that node on. Only populated if its not the default channel. */
|
|
uint8_t channel;
|
|
/* True if we witnessed the node over MQTT instead of LoRA transport */
|
|
bool via_mqtt;
|
|
/* Number of hops away from us this node is (0 if adjacent) */
|
|
uint8_t hops_away;
|
|
/* True if node is in our favorites list
|
|
Persists between NodeDB internal clean ups */
|
|
bool is_favorite;
|
|
} meshtastic_NodeInfoLite;
|
|
|
|
/* This message is never sent over the wire, but it is used for serializing DB
|
|
state to flash in the device code
|
|
FIXME, since we write this each time we enter deep sleep (and have infinite
|
|
flash) it would be better to use some sort of append only data structure for
|
|
the receive queue and use the preferences store for the other stuff */
|
|
typedef struct _meshtastic_DeviceState {
|
|
/* Read only settings/info about this node */
|
|
bool has_my_node;
|
|
meshtastic_MyNodeInfo my_node;
|
|
/* My owner info */
|
|
bool has_owner;
|
|
meshtastic_User owner;
|
|
/* Received packets saved for delivery to the phone */
|
|
pb_size_t receive_queue_count;
|
|
meshtastic_MeshPacket receive_queue[1];
|
|
/* We keep the last received text message (only) stored in the device flash,
|
|
so we can show it on the screen.
|
|
Might be null */
|
|
bool has_rx_text_message;
|
|
meshtastic_MeshPacket rx_text_message;
|
|
/* A version integer used to invalidate old save files when we make
|
|
incompatible changes This integer is set at build time and is private to
|
|
NodeDB.cpp in the device code. */
|
|
uint32_t version;
|
|
/* Used only during development.
|
|
Indicates developer is testing and changes should never be saved to flash.
|
|
Deprecated in 2.3.1 */
|
|
bool no_save;
|
|
/* Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset. */
|
|
bool did_gps_reset;
|
|
/* We keep the last received waypoint stored in the device flash,
|
|
so we can show it on the screen.
|
|
Might be null */
|
|
bool has_rx_waypoint;
|
|
meshtastic_MeshPacket rx_waypoint;
|
|
/* The mesh's nodes with their available gpio pins for RemoteHardware module */
|
|
pb_size_t node_remote_hardware_pins_count;
|
|
meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[12];
|
|
/* New lite version of NodeDB to decrease memory footprint */
|
|
std::vector<meshtastic_NodeInfoLite> node_db_lite;
|
|
} meshtastic_DeviceState;
|
|
|
|
/* The on-disk saved channels */
|
|
typedef struct _meshtastic_ChannelFile {
|
|
/* The channels our node knows about */
|
|
pb_size_t channels_count;
|
|
meshtastic_Channel channels[8];
|
|
/* A version integer used to invalidate old save files when we make
|
|
incompatible changes This integer is set at build time and is private to
|
|
NodeDB.cpp in the device code. */
|
|
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_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_NodeInfoLite_init_default {0, false, meshtastic_User_init_default, false, meshtastic_PositionLite_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, 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_NodeInfoLite_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_PositionLite_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, 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
|
|
#define meshtastic_PositionLite_longitude_i_tag 2
|
|
#define meshtastic_PositionLite_altitude_tag 3
|
|
#define meshtastic_PositionLite_time_tag 4
|
|
#define meshtastic_PositionLite_location_source_tag 5
|
|
#define meshtastic_NodeInfoLite_num_tag 1
|
|
#define meshtastic_NodeInfoLite_user_tag 2
|
|
#define meshtastic_NodeInfoLite_position_tag 3
|
|
#define meshtastic_NodeInfoLite_snr_tag 4
|
|
#define meshtastic_NodeInfoLite_last_heard_tag 5
|
|
#define meshtastic_NodeInfoLite_device_metrics_tag 6
|
|
#define meshtastic_NodeInfoLite_channel_tag 7
|
|
#define meshtastic_NodeInfoLite_via_mqtt_tag 8
|
|
#define meshtastic_NodeInfoLite_hops_away_tag 9
|
|
#define meshtastic_NodeInfoLite_is_favorite_tag 10
|
|
#define meshtastic_DeviceState_my_node_tag 2
|
|
#define meshtastic_DeviceState_owner_tag 3
|
|
#define meshtastic_DeviceState_receive_queue_tag 5
|
|
#define meshtastic_DeviceState_rx_text_message_tag 7
|
|
#define meshtastic_DeviceState_version_tag 8
|
|
#define meshtastic_DeviceState_no_save_tag 9
|
|
#define meshtastic_DeviceState_did_gps_reset_tag 11
|
|
#define meshtastic_DeviceState_rx_waypoint_tag 12
|
|
#define meshtastic_DeviceState_node_remote_hardware_pins_tag 13
|
|
#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) \
|
|
X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 1) \
|
|
X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 2) \
|
|
X(a, STATIC, SINGULAR, INT32, altitude, 3) \
|
|
X(a, STATIC, SINGULAR, FIXED32, time, 4) \
|
|
X(a, STATIC, SINGULAR, UENUM, location_source, 5)
|
|
#define meshtastic_PositionLite_CALLBACK NULL
|
|
#define meshtastic_PositionLite_DEFAULT NULL
|
|
|
|
#define meshtastic_NodeInfoLite_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, UINT32, num, 1) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, user, 2) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, position, 3) \
|
|
X(a, STATIC, SINGULAR, FLOAT, snr, 4) \
|
|
X(a, STATIC, SINGULAR, FIXED32, last_heard, 5) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, device_metrics, 6) \
|
|
X(a, STATIC, SINGULAR, UINT32, channel, 7) \
|
|
X(a, STATIC, SINGULAR, BOOL, via_mqtt, 8) \
|
|
X(a, STATIC, SINGULAR, UINT32, hops_away, 9) \
|
|
X(a, STATIC, SINGULAR, BOOL, is_favorite, 10)
|
|
#define meshtastic_NodeInfoLite_CALLBACK NULL
|
|
#define meshtastic_NodeInfoLite_DEFAULT NULL
|
|
#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_User
|
|
#define meshtastic_NodeInfoLite_position_MSGTYPE meshtastic_PositionLite
|
|
#define meshtastic_NodeInfoLite_device_metrics_MSGTYPE meshtastic_DeviceMetrics
|
|
|
|
#define meshtastic_DeviceState_FIELDLIST(X, a) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, my_node, 2) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, owner, 3) \
|
|
X(a, STATIC, REPEATED, MESSAGE, receive_queue, 5) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, rx_text_message, 7) \
|
|
X(a, STATIC, SINGULAR, UINT32, version, 8) \
|
|
X(a, STATIC, SINGULAR, BOOL, no_save, 9) \
|
|
X(a, STATIC, SINGULAR, BOOL, did_gps_reset, 11) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, rx_waypoint, 12) \
|
|
X(a, STATIC, REPEATED, MESSAGE, node_remote_hardware_pins, 13) \
|
|
X(a, CALLBACK, REPEATED, MESSAGE, node_db_lite, 14)
|
|
extern bool meshtastic_DeviceState_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field);
|
|
#define meshtastic_DeviceState_CALLBACK meshtastic_DeviceState_callback
|
|
#define meshtastic_DeviceState_DEFAULT NULL
|
|
#define meshtastic_DeviceState_my_node_MSGTYPE meshtastic_MyNodeInfo
|
|
#define meshtastic_DeviceState_owner_MSGTYPE meshtastic_User
|
|
#define meshtastic_DeviceState_receive_queue_MSGTYPE meshtastic_MeshPacket
|
|
#define meshtastic_DeviceState_rx_text_message_MSGTYPE meshtastic_MeshPacket
|
|
#define meshtastic_DeviceState_rx_waypoint_MSGTYPE meshtastic_MeshPacket
|
|
#define meshtastic_DeviceState_node_remote_hardware_pins_MSGTYPE meshtastic_NodeRemoteHardwarePin
|
|
#define meshtastic_DeviceState_node_db_lite_MSGTYPE meshtastic_NodeInfoLite
|
|
|
|
#define meshtastic_ChannelFile_FIELDLIST(X, a) \
|
|
X(a, STATIC, REPEATED, MESSAGE, channels, 1) \
|
|
X(a, STATIC, SINGULAR, UINT32, version, 2)
|
|
#define meshtastic_ChannelFile_CALLBACK NULL
|
|
#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_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
|
|
#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_ChannelFile_size 718
|
|
#define meshtastic_NodeInfoLite_size 166
|
|
#define meshtastic_OEMStore_size 3384
|
|
#define meshtastic_PositionLite_size 28
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif
|