sforkowany z mirror/meshtastic-firmware
				
			Remote hardware overhaul (#2495)
* Update protos * WIP * Param * Has remote hardware * Protos * Initializer * Added new admin message for node remote hardware pins * Badunkatrunk * Init and memcpyraspi-portduino
							rodzic
							
								
									a9fed83d9a
								
							
						
					
					
						commit
						1b68408f2f
					
				|  | @ -1 +1 @@ | ||||||
| Subproject commit 345b3bf103237503459457ac2b74f4fedf2db102 | Subproject commit 6a94e6a77f67d26a8b065c2ea61f07376a5ed142 | ||||||
|  | @ -670,6 +670,7 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() | ||||||
|     deviceMetadata.role = config.device.role; |     deviceMetadata.role = config.device.role; | ||||||
|     deviceMetadata.position_flags = config.position.position_flags; |     deviceMetadata.position_flags = config.position.position_flags; | ||||||
|     deviceMetadata.hw_model = HW_VENDOR; |     deviceMetadata.hw_model = HW_VENDOR; | ||||||
|  |     deviceMetadata.hasRemoteHardware = moduleConfig.remote_hardware.enabled; | ||||||
|     return deviceMetadata; |     return deviceMetadata; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -349,6 +349,11 @@ void NodeDB::init() | ||||||
|     if (channelFileCRC != crc32Buffer(&channelFile, sizeof(channelFile))) |     if (channelFileCRC != crc32Buffer(&channelFile, sizeof(channelFile))) | ||||||
|         saveWhat |= SEGMENT_CHANNELS; |         saveWhat |= SEGMENT_CHANNELS; | ||||||
| 
 | 
 | ||||||
|  |     if (!devicestate.node_remote_hardware_pins) { | ||||||
|  |         meshtastic_NodeRemoteHardwarePin empty[12] = {meshtastic_RemoteHardwarePin_init_default}; | ||||||
|  |         memcpy(devicestate.node_remote_hardware_pins, empty, sizeof(empty)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     saveToDisk(saveWhat); |     saveToDisk(saveWhat); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -12,6 +12,9 @@ PB_BIND(meshtastic_AdminMessage, meshtastic_AdminMessage, 2) | ||||||
| PB_BIND(meshtastic_HamParameters, meshtastic_HamParameters, AUTO) | PB_BIND(meshtastic_HamParameters, meshtastic_HamParameters, AUTO) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | PB_BIND(meshtastic_NodeRemoteHardwarePinsResponse, meshtastic_NodeRemoteHardwarePinsResponse, 2) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -9,6 +9,7 @@ | ||||||
| #include "meshtastic/mesh.pb.h" | #include "meshtastic/mesh.pb.h" | ||||||
| #include "meshtastic/module_config.pb.h" | #include "meshtastic/module_config.pb.h" | ||||||
| #include "meshtastic/connection_status.pb.h" | #include "meshtastic/connection_status.pb.h" | ||||||
|  | #include "meshtastic/deviceonly.pb.h" | ||||||
| 
 | 
 | ||||||
| #if PB_PROTO_HEADER_VERSION != 40 | #if PB_PROTO_HEADER_VERSION != 40 | ||||||
| #error Regenerate this file with the current version of nanopb generator. | #error Regenerate this file with the current version of nanopb generator. | ||||||
|  | @ -70,6 +71,13 @@ typedef struct _meshtastic_HamParameters { | ||||||
|     char short_name[6]; |     char short_name[6]; | ||||||
| } meshtastic_HamParameters; | } meshtastic_HamParameters; | ||||||
| 
 | 
 | ||||||
|  | /* Response envelope for node_remote_hardware_pins */ | ||||||
|  | typedef struct _meshtastic_NodeRemoteHardwarePinsResponse { | ||||||
|  |     /* Nodes and their respective remote hardware GPIO pins */ | ||||||
|  |     pb_size_t node_remote_hardware_pins_count; | ||||||
|  |     meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[12]; | ||||||
|  | } meshtastic_NodeRemoteHardwarePinsResponse; | ||||||
|  | 
 | ||||||
| /* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
 | /* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
 | ||||||
|  This message is used to do settings operations to both remote AND local nodes. |  This message is used to do settings operations to both remote AND local nodes. | ||||||
|  (Prior to 1.2 these operations were done via special ToRadio operations) */ |  (Prior to 1.2 these operations were done via special ToRadio operations) */ | ||||||
|  | @ -111,6 +119,10 @@ typedef struct _meshtastic_AdminMessage { | ||||||
|         meshtastic_DeviceConnectionStatus get_device_connection_status_response; |         meshtastic_DeviceConnectionStatus get_device_connection_status_response; | ||||||
|         /* Setup a node for licensed amateur (ham) radio operation */ |         /* Setup a node for licensed amateur (ham) radio operation */ | ||||||
|         meshtastic_HamParameters set_ham_mode; |         meshtastic_HamParameters set_ham_mode; | ||||||
|  |         /* Get the mesh's nodes with their available gpio pins for RemoteHardware module use */ | ||||||
|  |         bool get_node_remote_hardware_pins_request; | ||||||
|  |         /* Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use */ | ||||||
|  |         meshtastic_NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response; | ||||||
|         /* Set the owner for this node */ |         /* Set the owner for this node */ | ||||||
|         meshtastic_User set_owner; |         meshtastic_User set_owner; | ||||||
|         /* Set channels (using the new API).
 |         /* Set channels (using the new API).
 | ||||||
|  | @ -168,17 +180,21 @@ extern "C" { | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| /* Initializer values for message structs */ | /* Initializer values for message structs */ | ||||||
| #define meshtastic_AdminMessage_init_default     {0, {0}} | #define meshtastic_AdminMessage_init_default     {0, {0}} | ||||||
| #define meshtastic_HamParameters_init_default    {"", 0, 0, ""} | #define meshtastic_HamParameters_init_default    {"", 0, 0, ""} | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_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}} | ||||||
| #define meshtastic_AdminMessage_init_zero        {0, {0}} | #define meshtastic_AdminMessage_init_zero        {0, {0}} | ||||||
| #define meshtastic_HamParameters_init_zero       {"", 0, 0, ""} | #define meshtastic_HamParameters_init_zero       {"", 0, 0, ""} | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_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}} | ||||||
| 
 | 
 | ||||||
| /* Field tags (for use in manual encoding/decoding) */ | /* Field tags (for use in manual encoding/decoding) */ | ||||||
| #define meshtastic_HamParameters_call_sign_tag   1 | #define meshtastic_HamParameters_call_sign_tag   1 | ||||||
| #define meshtastic_HamParameters_tx_power_tag    2 | #define meshtastic_HamParameters_tx_power_tag    2 | ||||||
| #define meshtastic_HamParameters_frequency_tag   3 | #define meshtastic_HamParameters_frequency_tag   3 | ||||||
| #define meshtastic_HamParameters_short_name_tag  4 | #define meshtastic_HamParameters_short_name_tag  4 | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_tag 1 | ||||||
| #define meshtastic_AdminMessage_get_channel_request_tag 1 | #define meshtastic_AdminMessage_get_channel_request_tag 1 | ||||||
| #define meshtastic_AdminMessage_get_channel_response_tag 2 | #define meshtastic_AdminMessage_get_channel_response_tag 2 | ||||||
| #define meshtastic_AdminMessage_get_owner_request_tag 3 | #define meshtastic_AdminMessage_get_owner_request_tag 3 | ||||||
|  | @ -196,6 +212,8 @@ extern "C" { | ||||||
| #define meshtastic_AdminMessage_get_device_connection_status_request_tag 16 | #define meshtastic_AdminMessage_get_device_connection_status_request_tag 16 | ||||||
| #define meshtastic_AdminMessage_get_device_connection_status_response_tag 17 | #define meshtastic_AdminMessage_get_device_connection_status_response_tag 17 | ||||||
| #define meshtastic_AdminMessage_set_ham_mode_tag 18 | #define meshtastic_AdminMessage_set_ham_mode_tag 18 | ||||||
|  | #define meshtastic_AdminMessage_get_node_remote_hardware_pins_request_tag 19 | ||||||
|  | #define meshtastic_AdminMessage_get_node_remote_hardware_pins_response_tag 20 | ||||||
| #define meshtastic_AdminMessage_set_owner_tag    32 | #define meshtastic_AdminMessage_set_owner_tag    32 | ||||||
| #define meshtastic_AdminMessage_set_channel_tag  33 | #define meshtastic_AdminMessage_set_channel_tag  33 | ||||||
| #define meshtastic_AdminMessage_set_config_tag   34 | #define meshtastic_AdminMessage_set_config_tag   34 | ||||||
|  | @ -230,6 +248,8 @@ X(a, STATIC,   ONEOF,    STRING,   (payload_variant,get_ringtone_response,get_ri | ||||||
| X(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_device_connection_status_request,get_device_connection_status_request),  16) \ | X(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_device_connection_status_request,get_device_connection_status_request),  16) \ | ||||||
| X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_device_connection_status_response,get_device_connection_status_response),  17) \ | X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_device_connection_status_response,get_device_connection_status_response),  17) \ | ||||||
| X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_ham_mode,set_ham_mode),  18) \ | X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_ham_mode,set_ham_mode),  18) \ | ||||||
|  | X(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_node_remote_hardware_pins_request,get_node_remote_hardware_pins_request),  19) \ | ||||||
|  | X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_node_remote_hardware_pins_response,get_node_remote_hardware_pins_response),  20) \ | ||||||
| X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_owner,set_owner),  32) \ | X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_owner,set_owner),  32) \ | ||||||
| X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_channel,set_channel),  33) \ | X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_channel,set_channel),  33) \ | ||||||
| X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_config,set_config),  34) \ | X(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_config,set_config),  34) \ | ||||||
|  | @ -253,6 +273,7 @@ X(a, STATIC,   ONEOF,    INT32,    (payload_variant,nodedb_reset,nodedb_reset), | ||||||
| #define meshtastic_AdminMessage_payload_variant_get_device_metadata_response_MSGTYPE meshtastic_DeviceMetadata | #define meshtastic_AdminMessage_payload_variant_get_device_metadata_response_MSGTYPE meshtastic_DeviceMetadata | ||||||
| #define meshtastic_AdminMessage_payload_variant_get_device_connection_status_response_MSGTYPE meshtastic_DeviceConnectionStatus | #define meshtastic_AdminMessage_payload_variant_get_device_connection_status_response_MSGTYPE meshtastic_DeviceConnectionStatus | ||||||
| #define meshtastic_AdminMessage_payload_variant_set_ham_mode_MSGTYPE meshtastic_HamParameters | #define meshtastic_AdminMessage_payload_variant_set_ham_mode_MSGTYPE meshtastic_HamParameters | ||||||
|  | #define meshtastic_AdminMessage_payload_variant_get_node_remote_hardware_pins_response_MSGTYPE meshtastic_NodeRemoteHardwarePinsResponse | ||||||
| #define meshtastic_AdminMessage_payload_variant_set_owner_MSGTYPE meshtastic_User | #define meshtastic_AdminMessage_payload_variant_set_owner_MSGTYPE meshtastic_User | ||||||
| #define meshtastic_AdminMessage_payload_variant_set_channel_MSGTYPE meshtastic_Channel | #define meshtastic_AdminMessage_payload_variant_set_channel_MSGTYPE meshtastic_Channel | ||||||
| #define meshtastic_AdminMessage_payload_variant_set_config_MSGTYPE meshtastic_Config | #define meshtastic_AdminMessage_payload_variant_set_config_MSGTYPE meshtastic_Config | ||||||
|  | @ -266,16 +287,25 @@ X(a, STATIC,   SINGULAR, STRING,   short_name,        4) | ||||||
| #define meshtastic_HamParameters_CALLBACK NULL | #define meshtastic_HamParameters_CALLBACK NULL | ||||||
| #define meshtastic_HamParameters_DEFAULT NULL | #define meshtastic_HamParameters_DEFAULT NULL | ||||||
| 
 | 
 | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_FIELDLIST(X, a) \ | ||||||
|  | X(a, STATIC,   REPEATED, MESSAGE,  node_remote_hardware_pins,   1) | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_CALLBACK NULL | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_DEFAULT NULL | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_MSGTYPE meshtastic_NodeRemoteHardwarePin | ||||||
|  | 
 | ||||||
| extern const pb_msgdesc_t meshtastic_AdminMessage_msg; | extern const pb_msgdesc_t meshtastic_AdminMessage_msg; | ||||||
| extern const pb_msgdesc_t meshtastic_HamParameters_msg; | extern const pb_msgdesc_t meshtastic_HamParameters_msg; | ||||||
|  | extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePinsResponse_msg; | ||||||
| 
 | 
 | ||||||
| /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ | /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ | ||||||
| #define meshtastic_AdminMessage_fields &meshtastic_AdminMessage_msg | #define meshtastic_AdminMessage_fields &meshtastic_AdminMessage_msg | ||||||
| #define meshtastic_HamParameters_fields &meshtastic_HamParameters_msg | #define meshtastic_HamParameters_fields &meshtastic_HamParameters_msg | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_fields &meshtastic_NodeRemoteHardwarePinsResponse_msg | ||||||
| 
 | 
 | ||||||
| /* Maximum encoded size of messages (where known) */ | /* Maximum encoded size of messages (where known) */ | ||||||
| #define meshtastic_AdminMessage_size             234 | #define meshtastic_AdminMessage_size             376 | ||||||
| #define meshtastic_HamParameters_size            32 | #define meshtastic_HamParameters_size            32 | ||||||
|  | #define meshtastic_NodeRemoteHardwarePinsResponse_size 372 | ||||||
| 
 | 
 | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
| } /* extern "C" */ | } /* extern "C" */ | ||||||
|  |  | ||||||
|  | @ -15,5 +15,8 @@ PB_BIND(meshtastic_ChannelFile, meshtastic_ChannelFile, 2) | ||||||
| PB_BIND(meshtastic_OEMStore, meshtastic_OEMStore, 2) | PB_BIND(meshtastic_OEMStore, meshtastic_OEMStore, 2) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | PB_BIND(meshtastic_NodeRemoteHardwarePin, meshtastic_NodeRemoteHardwarePin, AUTO) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ | ||||||
| #include "meshtastic/channel.pb.h" | #include "meshtastic/channel.pb.h" | ||||||
| #include "meshtastic/localonly.pb.h" | #include "meshtastic/localonly.pb.h" | ||||||
| #include "meshtastic/mesh.pb.h" | #include "meshtastic/mesh.pb.h" | ||||||
|  | #include "meshtastic/module_config.pb.h" | ||||||
| 
 | 
 | ||||||
| #if PB_PROTO_HEADER_VERSION != 40 | #if PB_PROTO_HEADER_VERSION != 40 | ||||||
| #error Regenerate this file with the current version of nanopb generator. | #error Regenerate this file with the current version of nanopb generator. | ||||||
|  | @ -24,6 +25,51 @@ typedef enum _meshtastic_ScreenFonts { | ||||||
| } meshtastic_ScreenFonts; | } meshtastic_ScreenFonts; | ||||||
| 
 | 
 | ||||||
| /* Struct definitions */ | /* Struct definitions */ | ||||||
|  | /* 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; | ||||||
|  | 
 | ||||||
|  | /* RemoteHardwarePins associated with a node */ | ||||||
|  | typedef struct _meshtastic_NodeRemoteHardwarePin { | ||||||
|  |     /* The node_num exposing the available gpio pin */ | ||||||
|  |     uint32_t node_num; | ||||||
|  |     /* The the available gpio pin for usage with RemoteHardware module */ | ||||||
|  |     bool has_pin; | ||||||
|  |     meshtastic_RemoteHardwarePin pin; | ||||||
|  | } meshtastic_NodeRemoteHardwarePin; | ||||||
|  | 
 | ||||||
| /* This message is never sent over the wire, but it is used for serializing DB
 | /* This message is never sent over the wire, but it is used for serializing DB
 | ||||||
|  state to flash in the device code |  state to flash in the device code | ||||||
|  FIXME, since we write this each time we enter deep sleep (and have infinite |  FIXME, since we write this each time we enter deep sleep (and have infinite | ||||||
|  | @ -61,44 +107,11 @@ typedef struct _meshtastic_DeviceState { | ||||||
|  Might be null */ |  Might be null */ | ||||||
|     bool has_rx_waypoint; |     bool has_rx_waypoint; | ||||||
|     meshtastic_MeshPacket 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]; | ||||||
| } meshtastic_DeviceState; | } 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 | #ifdef __cplusplus | ||||||
| extern "C" { | extern "C" { | ||||||
|  | @ -114,24 +127,18 @@ extern "C" { | ||||||
| #define meshtastic_OEMStore_oem_font_ENUMTYPE meshtastic_ScreenFonts | #define meshtastic_OEMStore_oem_font_ENUMTYPE meshtastic_ScreenFonts | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| /* Initializer values for message structs */ | /* Initializer values for message structs */ | ||||||
| #define meshtastic_DeviceState_init_default      {false, meshtastic_MyNodeInfo_init_default, false, meshtastic_User_init_default, 0, {meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default}, 0, {meshtastic_MeshPacket_init_default}, false, meshtastic_MeshPacket_init_default, 0, 0, 0, false, meshtastic_MeshPacket_init_default} | #define meshtastic_DeviceState_init_default      {false, meshtastic_MyNodeInfo_init_default, false, meshtastic_User_init_default, 0, {meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_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}} | ||||||
| #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_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_OEMStore_init_default         {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default} | ||||||
| #define meshtastic_DeviceState_init_zero         {false, meshtastic_MyNodeInfo_init_zero, false, meshtastic_User_init_zero, 0, {meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero}, 0, {meshtastic_MeshPacket_init_zero}, false, meshtastic_MeshPacket_init_zero, 0, 0, 0, false, meshtastic_MeshPacket_init_zero} | #define meshtastic_NodeRemoteHardwarePin_init_default {0, false, meshtastic_RemoteHardwarePin_init_default} | ||||||
|  | #define meshtastic_DeviceState_init_zero         {false, meshtastic_MyNodeInfo_init_zero, false, meshtastic_User_init_zero, 0, {meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_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}} | ||||||
| #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_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} | #define meshtastic_OEMStore_init_zero            {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero} | ||||||
|  | #define meshtastic_NodeRemoteHardwarePin_init_zero {0, false, meshtastic_RemoteHardwarePin_init_zero} | ||||||
| 
 | 
 | ||||||
| /* Field tags (for use in manual encoding/decoding) */ | /* Field tags (for use in manual encoding/decoding) */ | ||||||
| #define meshtastic_DeviceState_my_node_tag       2 |  | ||||||
| #define meshtastic_DeviceState_owner_tag         3 |  | ||||||
| #define meshtastic_DeviceState_node_db_tag       4 |  | ||||||
| #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_ChannelFile_channels_tag      1 | #define meshtastic_ChannelFile_channels_tag      1 | ||||||
| #define meshtastic_ChannelFile_version_tag       2 | #define meshtastic_ChannelFile_version_tag       2 | ||||||
| #define meshtastic_OEMStore_oem_icon_width_tag   1 | #define meshtastic_OEMStore_oem_icon_width_tag   1 | ||||||
|  | @ -142,6 +149,18 @@ extern "C" { | ||||||
| #define meshtastic_OEMStore_oem_aes_key_tag      6 | #define meshtastic_OEMStore_oem_aes_key_tag      6 | ||||||
| #define meshtastic_OEMStore_oem_local_config_tag 7 | #define meshtastic_OEMStore_oem_local_config_tag 7 | ||||||
| #define meshtastic_OEMStore_oem_local_module_config_tag 8 | #define meshtastic_OEMStore_oem_local_module_config_tag 8 | ||||||
|  | #define meshtastic_NodeRemoteHardwarePin_node_num_tag 1 | ||||||
|  | #define meshtastic_NodeRemoteHardwarePin_pin_tag 2 | ||||||
|  | #define meshtastic_DeviceState_my_node_tag       2 | ||||||
|  | #define meshtastic_DeviceState_owner_tag         3 | ||||||
|  | #define meshtastic_DeviceState_node_db_tag       4 | ||||||
|  | #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 | ||||||
| 
 | 
 | ||||||
| /* Struct field encoding specification for nanopb */ | /* Struct field encoding specification for nanopb */ | ||||||
| #define meshtastic_DeviceState_FIELDLIST(X, a) \ | #define meshtastic_DeviceState_FIELDLIST(X, a) \ | ||||||
|  | @ -153,7 +172,8 @@ X(a, STATIC,   OPTIONAL, MESSAGE,  rx_text_message,   7) \ | ||||||
| X(a, STATIC,   SINGULAR, UINT32,   version,           8) \ | X(a, STATIC,   SINGULAR, UINT32,   version,           8) \ | ||||||
| X(a, STATIC,   SINGULAR, BOOL,     no_save,           9) \ | X(a, STATIC,   SINGULAR, BOOL,     no_save,           9) \ | ||||||
| X(a, STATIC,   SINGULAR, BOOL,     did_gps_reset,    11) \ | X(a, STATIC,   SINGULAR, BOOL,     did_gps_reset,    11) \ | ||||||
| X(a, STATIC,   OPTIONAL, MESSAGE,  rx_waypoint,      12) | X(a, STATIC,   OPTIONAL, MESSAGE,  rx_waypoint,      12) \ | ||||||
|  | X(a, STATIC,   REPEATED, MESSAGE,  node_remote_hardware_pins,  13) | ||||||
| #define meshtastic_DeviceState_CALLBACK NULL | #define meshtastic_DeviceState_CALLBACK NULL | ||||||
| #define meshtastic_DeviceState_DEFAULT NULL | #define meshtastic_DeviceState_DEFAULT NULL | ||||||
| #define meshtastic_DeviceState_my_node_MSGTYPE meshtastic_MyNodeInfo | #define meshtastic_DeviceState_my_node_MSGTYPE meshtastic_MyNodeInfo | ||||||
|  | @ -162,6 +182,7 @@ X(a, STATIC,   OPTIONAL, MESSAGE,  rx_waypoint,      12) | ||||||
| #define meshtastic_DeviceState_receive_queue_MSGTYPE meshtastic_MeshPacket | #define meshtastic_DeviceState_receive_queue_MSGTYPE meshtastic_MeshPacket | ||||||
| #define meshtastic_DeviceState_rx_text_message_MSGTYPE meshtastic_MeshPacket | #define meshtastic_DeviceState_rx_text_message_MSGTYPE meshtastic_MeshPacket | ||||||
| #define meshtastic_DeviceState_rx_waypoint_MSGTYPE meshtastic_MeshPacket | #define meshtastic_DeviceState_rx_waypoint_MSGTYPE meshtastic_MeshPacket | ||||||
|  | #define meshtastic_DeviceState_node_remote_hardware_pins_MSGTYPE meshtastic_NodeRemoteHardwarePin | ||||||
| 
 | 
 | ||||||
| #define meshtastic_ChannelFile_FIELDLIST(X, a) \ | #define meshtastic_ChannelFile_FIELDLIST(X, a) \ | ||||||
| X(a, STATIC,   REPEATED, MESSAGE,  channels,          1) \ | X(a, STATIC,   REPEATED, MESSAGE,  channels,          1) \ | ||||||
|  | @ -184,19 +205,29 @@ X(a, STATIC,   OPTIONAL, MESSAGE,  oem_local_module_config,   8) | ||||||
| #define meshtastic_OEMStore_oem_local_config_MSGTYPE meshtastic_LocalConfig | #define meshtastic_OEMStore_oem_local_config_MSGTYPE meshtastic_LocalConfig | ||||||
| #define meshtastic_OEMStore_oem_local_module_config_MSGTYPE meshtastic_LocalModuleConfig | #define meshtastic_OEMStore_oem_local_module_config_MSGTYPE meshtastic_LocalModuleConfig | ||||||
| 
 | 
 | ||||||
|  | #define meshtastic_NodeRemoteHardwarePin_FIELDLIST(X, a) \ | ||||||
|  | X(a, STATIC,   SINGULAR, UINT32,   node_num,          1) \ | ||||||
|  | X(a, STATIC,   OPTIONAL, MESSAGE,  pin,               2) | ||||||
|  | #define meshtastic_NodeRemoteHardwarePin_CALLBACK NULL | ||||||
|  | #define meshtastic_NodeRemoteHardwarePin_DEFAULT NULL | ||||||
|  | #define meshtastic_NodeRemoteHardwarePin_pin_MSGTYPE meshtastic_RemoteHardwarePin | ||||||
|  | 
 | ||||||
| extern const pb_msgdesc_t meshtastic_DeviceState_msg; | extern const pb_msgdesc_t meshtastic_DeviceState_msg; | ||||||
| extern const pb_msgdesc_t meshtastic_ChannelFile_msg; | extern const pb_msgdesc_t meshtastic_ChannelFile_msg; | ||||||
| extern const pb_msgdesc_t meshtastic_OEMStore_msg; | extern const pb_msgdesc_t meshtastic_OEMStore_msg; | ||||||
|  | extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePin_msg; | ||||||
| 
 | 
 | ||||||
| /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ | /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ | ||||||
| #define meshtastic_DeviceState_fields &meshtastic_DeviceState_msg | #define meshtastic_DeviceState_fields &meshtastic_DeviceState_msg | ||||||
| #define meshtastic_ChannelFile_fields &meshtastic_ChannelFile_msg | #define meshtastic_ChannelFile_fields &meshtastic_ChannelFile_msg | ||||||
| #define meshtastic_OEMStore_fields &meshtastic_OEMStore_msg | #define meshtastic_OEMStore_fields &meshtastic_OEMStore_msg | ||||||
|  | #define meshtastic_NodeRemoteHardwarePin_fields &meshtastic_NodeRemoteHardwarePin_msg | ||||||
| 
 | 
 | ||||||
| /* Maximum encoded size of messages (where known) */ | /* Maximum encoded size of messages (where known) */ | ||||||
| #define meshtastic_ChannelFile_size              638 | #define meshtastic_ChannelFile_size              638 | ||||||
| #define meshtastic_DeviceState_size              22364 | #define meshtastic_DeviceState_size              22736 | ||||||
| #define meshtastic_OEMStore_size                 3043 | #define meshtastic_NodeRemoteHardwarePin_size    29 | ||||||
|  | #define meshtastic_OEMStore_size                 3137 | ||||||
| 
 | 
 | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
| } /* extern "C" */ | } /* extern "C" */ | ||||||
|  |  | ||||||
|  | @ -157,7 +157,7 @@ extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg; | ||||||
| 
 | 
 | ||||||
| /* Maximum encoded size of messages (where known) */ | /* Maximum encoded size of messages (where known) */ | ||||||
| #define meshtastic_LocalConfig_size              458 | #define meshtastic_LocalConfig_size              458 | ||||||
| #define meshtastic_LocalModuleConfig_size        439 | #define meshtastic_LocalModuleConfig_size        533 | ||||||
| 
 | 
 | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
| } /* extern "C" */ | } /* extern "C" */ | ||||||
|  |  | ||||||
|  | @ -719,6 +719,8 @@ typedef struct _meshtastic_DeviceMetadata { | ||||||
|     uint32_t position_flags; |     uint32_t position_flags; | ||||||
|     /* Device hardware model */ |     /* Device hardware model */ | ||||||
|     meshtastic_HardwareModel hw_model; |     meshtastic_HardwareModel hw_model; | ||||||
|  |     /* Has Remote Hardware enabled */ | ||||||
|  |     bool hasRemoteHardware; | ||||||
| } meshtastic_DeviceMetadata; | } meshtastic_DeviceMetadata; | ||||||
| 
 | 
 | ||||||
| /* Packets from the radio to the phone will appear on the fromRadio characteristic.
 | /* Packets from the radio to the phone will appear on the fromRadio characteristic.
 | ||||||
|  | @ -855,7 +857,7 @@ extern "C" { | ||||||
| #define meshtastic_Compressed_init_default       {_meshtastic_PortNum_MIN, {0, {0}}} | #define meshtastic_Compressed_init_default       {_meshtastic_PortNum_MIN, {0, {0}}} | ||||||
| #define meshtastic_NeighborInfo_init_default     {0, 0, 0, {meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default}} | #define meshtastic_NeighborInfo_init_default     {0, 0, 0, {meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default}} | ||||||
| #define meshtastic_Neighbor_init_default         {0, 0} | #define meshtastic_Neighbor_init_default         {0, 0} | ||||||
| #define meshtastic_DeviceMetadata_init_default   {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN} | #define meshtastic_DeviceMetadata_init_default   {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0} | ||||||
| #define meshtastic_Position_init_zero            {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | #define meshtastic_Position_init_zero            {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | ||||||
| #define meshtastic_User_init_zero                {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0} | #define meshtastic_User_init_zero                {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0} | ||||||
| #define meshtastic_RouteDiscovery_init_zero      {0, {0, 0, 0, 0, 0, 0, 0, 0}} | #define meshtastic_RouteDiscovery_init_zero      {0, {0, 0, 0, 0, 0, 0, 0, 0}} | ||||||
|  | @ -872,7 +874,7 @@ extern "C" { | ||||||
| #define meshtastic_Compressed_init_zero          {_meshtastic_PortNum_MIN, {0, {0}}} | #define meshtastic_Compressed_init_zero          {_meshtastic_PortNum_MIN, {0, {0}}} | ||||||
| #define meshtastic_NeighborInfo_init_zero        {0, 0, 0, {meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero}} | #define meshtastic_NeighborInfo_init_zero        {0, 0, 0, {meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero}} | ||||||
| #define meshtastic_Neighbor_init_zero            {0, 0} | #define meshtastic_Neighbor_init_zero            {0, 0} | ||||||
| #define meshtastic_DeviceMetadata_init_zero      {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN} | #define meshtastic_DeviceMetadata_init_zero      {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0} | ||||||
| 
 | 
 | ||||||
| /* Field tags (for use in manual encoding/decoding) */ | /* Field tags (for use in manual encoding/decoding) */ | ||||||
| #define meshtastic_Position_latitude_i_tag       1 | #define meshtastic_Position_latitude_i_tag       1 | ||||||
|  | @ -987,6 +989,7 @@ extern "C" { | ||||||
| #define meshtastic_DeviceMetadata_role_tag       7 | #define meshtastic_DeviceMetadata_role_tag       7 | ||||||
| #define meshtastic_DeviceMetadata_position_flags_tag 8 | #define meshtastic_DeviceMetadata_position_flags_tag 8 | ||||||
| #define meshtastic_DeviceMetadata_hw_model_tag   9 | #define meshtastic_DeviceMetadata_hw_model_tag   9 | ||||||
|  | #define meshtastic_DeviceMetadata_hasRemoteHardware_tag 10 | ||||||
| #define meshtastic_FromRadio_id_tag              1 | #define meshtastic_FromRadio_id_tag              1 | ||||||
| #define meshtastic_FromRadio_packet_tag          2 | #define meshtastic_FromRadio_packet_tag          2 | ||||||
| #define meshtastic_FromRadio_my_info_tag         3 | #define meshtastic_FromRadio_my_info_tag         3 | ||||||
|  | @ -1210,7 +1213,8 @@ X(a, STATIC,   SINGULAR, BOOL,     hasBluetooth,      5) \ | ||||||
| X(a, STATIC,   SINGULAR, BOOL,     hasEthernet,       6) \ | X(a, STATIC,   SINGULAR, BOOL,     hasEthernet,       6) \ | ||||||
| X(a, STATIC,   SINGULAR, UENUM,    role,              7) \ | X(a, STATIC,   SINGULAR, UENUM,    role,              7) \ | ||||||
| X(a, STATIC,   SINGULAR, UINT32,   position_flags,    8) \ | X(a, STATIC,   SINGULAR, UINT32,   position_flags,    8) \ | ||||||
| X(a, STATIC,   SINGULAR, UENUM,    hw_model,          9) | X(a, STATIC,   SINGULAR, UENUM,    hw_model,          9) \ | ||||||
|  | X(a, STATIC,   SINGULAR, BOOL,     hasRemoteHardware,  10) | ||||||
| #define meshtastic_DeviceMetadata_CALLBACK NULL | #define meshtastic_DeviceMetadata_CALLBACK NULL | ||||||
| #define meshtastic_DeviceMetadata_DEFAULT NULL | #define meshtastic_DeviceMetadata_DEFAULT NULL | ||||||
| 
 | 
 | ||||||
|  | @ -1254,7 +1258,7 @@ extern const pb_msgdesc_t meshtastic_DeviceMetadata_msg; | ||||||
| /* Maximum encoded size of messages (where known) */ | /* Maximum encoded size of messages (where known) */ | ||||||
| #define meshtastic_Compressed_size               243 | #define meshtastic_Compressed_size               243 | ||||||
| #define meshtastic_Data_size                     270 | #define meshtastic_Data_size                     270 | ||||||
| #define meshtastic_DeviceMetadata_size           44 | #define meshtastic_DeviceMetadata_size           46 | ||||||
| #define meshtastic_FromRadio_size                330 | #define meshtastic_FromRadio_size                330 | ||||||
| #define meshtastic_LogRecord_size                81 | #define meshtastic_LogRecord_size                81 | ||||||
| #define meshtastic_MeshPacket_size               321 | #define meshtastic_MeshPacket_size               321 | ||||||
|  |  | ||||||
|  | @ -36,6 +36,10 @@ PB_BIND(meshtastic_ModuleConfig_TelemetryConfig, meshtastic_ModuleConfig_Telemet | ||||||
| PB_BIND(meshtastic_ModuleConfig_CannedMessageConfig, meshtastic_ModuleConfig_CannedMessageConfig, AUTO) | PB_BIND(meshtastic_ModuleConfig_CannedMessageConfig, meshtastic_ModuleConfig_CannedMessageConfig, AUTO) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | PB_BIND(meshtastic_RemoteHardwarePin, meshtastic_RemoteHardwarePin, AUTO) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -10,6 +10,15 @@ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /* Enum definitions */ | /* Enum definitions */ | ||||||
|  | typedef enum _meshtastic_RemoteHardwarePinType { | ||||||
|  |     /* Unset/unused */ | ||||||
|  |     meshtastic_RemoteHardwarePinType_UNKNOWN = 0, | ||||||
|  |     /* GPIO pin can be read (if it is high / low) */ | ||||||
|  |     meshtastic_RemoteHardwarePinType_DIGITAL_READ = 1, | ||||||
|  |     /* GPIO pin can be written to (high / low) */ | ||||||
|  |     meshtastic_RemoteHardwarePinType_DIGITAL_WRITE = 2 | ||||||
|  | } meshtastic_RemoteHardwarePinType; | ||||||
|  | 
 | ||||||
| /* Baudrate for codec2 voice */ | /* Baudrate for codec2 voice */ | ||||||
| typedef enum _meshtastic_ModuleConfig_AudioConfig_Audio_Baud { | typedef enum _meshtastic_ModuleConfig_AudioConfig_Audio_Baud { | ||||||
|     meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT = 0, |     meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT = 0, | ||||||
|  | @ -103,12 +112,6 @@ typedef struct _meshtastic_ModuleConfig_MQTTConfig { | ||||||
|     char root[16]; |     char root[16]; | ||||||
| } meshtastic_ModuleConfig_MQTTConfig; | } meshtastic_ModuleConfig_MQTTConfig; | ||||||
| 
 | 
 | ||||||
| /* RemoteHardwareModule Config */ |  | ||||||
| typedef struct _meshtastic_ModuleConfig_RemoteHardwareConfig { |  | ||||||
|     /* Whether the Module is enabled */ |  | ||||||
|     bool enabled; |  | ||||||
| } meshtastic_ModuleConfig_RemoteHardwareConfig; |  | ||||||
| 
 |  | ||||||
| /* Audio Config for codec2 voice */ | /* Audio Config for codec2 voice */ | ||||||
| typedef struct _meshtastic_ModuleConfig_AudioConfig { | typedef struct _meshtastic_ModuleConfig_AudioConfig { | ||||||
|     /* Whether Audio is enabled */ |     /* Whether Audio is enabled */ | ||||||
|  | @ -262,6 +265,27 @@ typedef struct _meshtastic_ModuleConfig_CannedMessageConfig { | ||||||
|     bool send_bell; |     bool send_bell; | ||||||
| } meshtastic_ModuleConfig_CannedMessageConfig; | } meshtastic_ModuleConfig_CannedMessageConfig; | ||||||
| 
 | 
 | ||||||
|  | /* A GPIO pin definition for remote hardware module */ | ||||||
|  | typedef struct _meshtastic_RemoteHardwarePin { | ||||||
|  |     /* GPIO Pin number (must match Arduino) */ | ||||||
|  |     uint8_t gpio_pin; | ||||||
|  |     /* Name for the GPIO pin (i.e. Front gate, mailbox, etc) */ | ||||||
|  |     char name[15]; | ||||||
|  |     /* Type of GPIO access available to consumers on the mesh */ | ||||||
|  |     meshtastic_RemoteHardwarePinType type; | ||||||
|  | } meshtastic_RemoteHardwarePin; | ||||||
|  | 
 | ||||||
|  | /* RemoteHardwareModule Config */ | ||||||
|  | typedef struct _meshtastic_ModuleConfig_RemoteHardwareConfig { | ||||||
|  |     /* Whether the Module is enabled */ | ||||||
|  |     bool enabled; | ||||||
|  |     /* Whether the Module allows consumers to read / write to pins not defined in available_pins */ | ||||||
|  |     bool allow_undefined_pin_access; | ||||||
|  |     /* Exposes the available pins to the mesh for reading and writing */ | ||||||
|  |     pb_size_t available_pins_count; | ||||||
|  |     meshtastic_RemoteHardwarePin available_pins[4]; | ||||||
|  | } meshtastic_ModuleConfig_RemoteHardwareConfig; | ||||||
|  | 
 | ||||||
| /* Module Config */ | /* Module Config */ | ||||||
| typedef struct _meshtastic_ModuleConfig { | typedef struct _meshtastic_ModuleConfig { | ||||||
|     pb_size_t which_payload_variant; |     pb_size_t which_payload_variant; | ||||||
|  | @ -293,6 +317,10 @@ extern "C" { | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /* Helper constants for enums */ | /* Helper constants for enums */ | ||||||
|  | #define _meshtastic_RemoteHardwarePinType_MIN meshtastic_RemoteHardwarePinType_UNKNOWN | ||||||
|  | #define _meshtastic_RemoteHardwarePinType_MAX meshtastic_RemoteHardwarePinType_DIGITAL_WRITE | ||||||
|  | #define _meshtastic_RemoteHardwarePinType_ARRAYSIZE ((meshtastic_RemoteHardwarePinType)(meshtastic_RemoteHardwarePinType_DIGITAL_WRITE+1)) | ||||||
|  | 
 | ||||||
| #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT | #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT | ||||||
| #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MAX meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B | #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MAX meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B | ||||||
| #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_ARRAYSIZE ((meshtastic_ModuleConfig_AudioConfig_Audio_Baud)(meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B+1)) | #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_ARRAYSIZE ((meshtastic_ModuleConfig_AudioConfig_Audio_Baud)(meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B+1)) | ||||||
|  | @ -325,11 +353,13 @@ extern "C" { | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_ccw_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar | #define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_ccw_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_press_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar | #define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_press_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar | ||||||
| 
 | 
 | ||||||
|  | #define meshtastic_RemoteHardwarePin_type_ENUMTYPE meshtastic_RemoteHardwarePinType | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| /* Initializer values for message structs */ | /* Initializer values for message structs */ | ||||||
| #define meshtastic_ModuleConfig_init_default     {0, {meshtastic_ModuleConfig_MQTTConfig_init_default}} | #define meshtastic_ModuleConfig_init_default     {0, {meshtastic_ModuleConfig_MQTTConfig_init_default}} | ||||||
| #define meshtastic_ModuleConfig_MQTTConfig_init_default {0, "", "", "", 0, 0, 0, ""} | #define meshtastic_ModuleConfig_MQTTConfig_init_default {0, "", "", "", 0, 0, 0, ""} | ||||||
| #define meshtastic_ModuleConfig_RemoteHardwareConfig_init_default {0} | #define meshtastic_ModuleConfig_RemoteHardwareConfig_init_default {0, 0, 0, {meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default}} | ||||||
| #define meshtastic_ModuleConfig_AudioConfig_init_default {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0} | #define meshtastic_ModuleConfig_AudioConfig_init_default {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0} | ||||||
| #define meshtastic_ModuleConfig_SerialConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN} | #define meshtastic_ModuleConfig_SerialConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN} | ||||||
| #define meshtastic_ModuleConfig_ExternalNotificationConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | #define meshtastic_ModuleConfig_ExternalNotificationConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | ||||||
|  | @ -337,9 +367,10 @@ extern "C" { | ||||||
| #define meshtastic_ModuleConfig_RangeTestConfig_init_default {0, 0, 0} | #define meshtastic_ModuleConfig_RangeTestConfig_init_default {0, 0, 0} | ||||||
| #define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 0, 0, 0} | #define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 0, 0, 0} | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0} | #define meshtastic_ModuleConfig_CannedMessageConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0} | ||||||
|  | #define meshtastic_RemoteHardwarePin_init_default {0, "", _meshtastic_RemoteHardwarePinType_MIN} | ||||||
| #define meshtastic_ModuleConfig_init_zero        {0, {meshtastic_ModuleConfig_MQTTConfig_init_zero}} | #define meshtastic_ModuleConfig_init_zero        {0, {meshtastic_ModuleConfig_MQTTConfig_init_zero}} | ||||||
| #define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, ""} | #define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, ""} | ||||||
| #define meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero {0} | #define meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero {0, 0, 0, {meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero}} | ||||||
| #define meshtastic_ModuleConfig_AudioConfig_init_zero {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0} | #define meshtastic_ModuleConfig_AudioConfig_init_zero {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0} | ||||||
| #define meshtastic_ModuleConfig_SerialConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN} | #define meshtastic_ModuleConfig_SerialConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN} | ||||||
| #define meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | #define meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | ||||||
|  | @ -347,6 +378,7 @@ extern "C" { | ||||||
| #define meshtastic_ModuleConfig_RangeTestConfig_init_zero {0, 0, 0} | #define meshtastic_ModuleConfig_RangeTestConfig_init_zero {0, 0, 0} | ||||||
| #define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 0, 0, 0} | #define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 0, 0, 0} | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0} | #define meshtastic_ModuleConfig_CannedMessageConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0} | ||||||
|  | #define meshtastic_RemoteHardwarePin_init_zero   {0, "", _meshtastic_RemoteHardwarePinType_MIN} | ||||||
| 
 | 
 | ||||||
| /* Field tags (for use in manual encoding/decoding) */ | /* Field tags (for use in manual encoding/decoding) */ | ||||||
| #define meshtastic_ModuleConfig_MQTTConfig_enabled_tag 1 | #define meshtastic_ModuleConfig_MQTTConfig_enabled_tag 1 | ||||||
|  | @ -357,7 +389,6 @@ extern "C" { | ||||||
| #define meshtastic_ModuleConfig_MQTTConfig_json_enabled_tag 6 | #define meshtastic_ModuleConfig_MQTTConfig_json_enabled_tag 6 | ||||||
| #define meshtastic_ModuleConfig_MQTTConfig_tls_enabled_tag 7 | #define meshtastic_ModuleConfig_MQTTConfig_tls_enabled_tag 7 | ||||||
| #define meshtastic_ModuleConfig_MQTTConfig_root_tag 8 | #define meshtastic_ModuleConfig_MQTTConfig_root_tag 8 | ||||||
| #define meshtastic_ModuleConfig_RemoteHardwareConfig_enabled_tag 1 |  | ||||||
| #define meshtastic_ModuleConfig_AudioConfig_codec2_enabled_tag 1 | #define meshtastic_ModuleConfig_AudioConfig_codec2_enabled_tag 1 | ||||||
| #define meshtastic_ModuleConfig_AudioConfig_ptt_pin_tag 2 | #define meshtastic_ModuleConfig_AudioConfig_ptt_pin_tag 2 | ||||||
| #define meshtastic_ModuleConfig_AudioConfig_bitrate_tag 3 | #define meshtastic_ModuleConfig_AudioConfig_bitrate_tag 3 | ||||||
|  | @ -412,6 +443,12 @@ extern "C" { | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_enabled_tag 9 | #define meshtastic_ModuleConfig_CannedMessageConfig_enabled_tag 9 | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_allow_input_source_tag 10 | #define meshtastic_ModuleConfig_CannedMessageConfig_allow_input_source_tag 10 | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_send_bell_tag 11 | #define meshtastic_ModuleConfig_CannedMessageConfig_send_bell_tag 11 | ||||||
|  | #define meshtastic_RemoteHardwarePin_gpio_pin_tag 1 | ||||||
|  | #define meshtastic_RemoteHardwarePin_name_tag    2 | ||||||
|  | #define meshtastic_RemoteHardwarePin_type_tag    3 | ||||||
|  | #define meshtastic_ModuleConfig_RemoteHardwareConfig_enabled_tag 1 | ||||||
|  | #define meshtastic_ModuleConfig_RemoteHardwareConfig_allow_undefined_pin_access_tag 2 | ||||||
|  | #define meshtastic_ModuleConfig_RemoteHardwareConfig_available_pins_tag 3 | ||||||
| #define meshtastic_ModuleConfig_mqtt_tag         1 | #define meshtastic_ModuleConfig_mqtt_tag         1 | ||||||
| #define meshtastic_ModuleConfig_serial_tag       2 | #define meshtastic_ModuleConfig_serial_tag       2 | ||||||
| #define meshtastic_ModuleConfig_external_notification_tag 3 | #define meshtastic_ModuleConfig_external_notification_tag 3 | ||||||
|  | @ -458,9 +495,12 @@ X(a, STATIC,   SINGULAR, STRING,   root,              8) | ||||||
| #define meshtastic_ModuleConfig_MQTTConfig_DEFAULT NULL | #define meshtastic_ModuleConfig_MQTTConfig_DEFAULT NULL | ||||||
| 
 | 
 | ||||||
| #define meshtastic_ModuleConfig_RemoteHardwareConfig_FIELDLIST(X, a) \ | #define meshtastic_ModuleConfig_RemoteHardwareConfig_FIELDLIST(X, a) \ | ||||||
| X(a, STATIC,   SINGULAR, BOOL,     enabled,           1) | X(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \ | ||||||
|  | X(a, STATIC,   SINGULAR, BOOL,     allow_undefined_pin_access,   2) \ | ||||||
|  | X(a, STATIC,   REPEATED, MESSAGE,  available_pins,    3) | ||||||
| #define meshtastic_ModuleConfig_RemoteHardwareConfig_CALLBACK NULL | #define meshtastic_ModuleConfig_RemoteHardwareConfig_CALLBACK NULL | ||||||
| #define meshtastic_ModuleConfig_RemoteHardwareConfig_DEFAULT NULL | #define meshtastic_ModuleConfig_RemoteHardwareConfig_DEFAULT NULL | ||||||
|  | #define meshtastic_ModuleConfig_RemoteHardwareConfig_available_pins_MSGTYPE meshtastic_RemoteHardwarePin | ||||||
| 
 | 
 | ||||||
| #define meshtastic_ModuleConfig_AudioConfig_FIELDLIST(X, a) \ | #define meshtastic_ModuleConfig_AudioConfig_FIELDLIST(X, a) \ | ||||||
| X(a, STATIC,   SINGULAR, BOOL,     codec2_enabled,    1) \ | X(a, STATIC,   SINGULAR, BOOL,     codec2_enabled,    1) \ | ||||||
|  | @ -544,6 +584,13 @@ X(a, STATIC,   SINGULAR, BOOL,     send_bell,        11) | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_CALLBACK NULL | #define meshtastic_ModuleConfig_CannedMessageConfig_CALLBACK NULL | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_DEFAULT NULL | #define meshtastic_ModuleConfig_CannedMessageConfig_DEFAULT NULL | ||||||
| 
 | 
 | ||||||
|  | #define meshtastic_RemoteHardwarePin_FIELDLIST(X, a) \ | ||||||
|  | X(a, STATIC,   SINGULAR, UINT32,   gpio_pin,          1) \ | ||||||
|  | X(a, STATIC,   SINGULAR, STRING,   name,              2) \ | ||||||
|  | X(a, STATIC,   SINGULAR, UENUM,    type,              3) | ||||||
|  | #define meshtastic_RemoteHardwarePin_CALLBACK NULL | ||||||
|  | #define meshtastic_RemoteHardwarePin_DEFAULT NULL | ||||||
|  | 
 | ||||||
| extern const pb_msgdesc_t meshtastic_ModuleConfig_msg; | extern const pb_msgdesc_t meshtastic_ModuleConfig_msg; | ||||||
| extern const pb_msgdesc_t meshtastic_ModuleConfig_MQTTConfig_msg; | extern const pb_msgdesc_t meshtastic_ModuleConfig_MQTTConfig_msg; | ||||||
| extern const pb_msgdesc_t meshtastic_ModuleConfig_RemoteHardwareConfig_msg; | extern const pb_msgdesc_t meshtastic_ModuleConfig_RemoteHardwareConfig_msg; | ||||||
|  | @ -554,6 +601,7 @@ extern const pb_msgdesc_t meshtastic_ModuleConfig_StoreForwardConfig_msg; | ||||||
| extern const pb_msgdesc_t meshtastic_ModuleConfig_RangeTestConfig_msg; | extern const pb_msgdesc_t meshtastic_ModuleConfig_RangeTestConfig_msg; | ||||||
| extern const pb_msgdesc_t meshtastic_ModuleConfig_TelemetryConfig_msg; | extern const pb_msgdesc_t meshtastic_ModuleConfig_TelemetryConfig_msg; | ||||||
| extern const pb_msgdesc_t meshtastic_ModuleConfig_CannedMessageConfig_msg; | extern const pb_msgdesc_t meshtastic_ModuleConfig_CannedMessageConfig_msg; | ||||||
|  | extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg; | ||||||
| 
 | 
 | ||||||
| /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ | /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ | ||||||
| #define meshtastic_ModuleConfig_fields &meshtastic_ModuleConfig_msg | #define meshtastic_ModuleConfig_fields &meshtastic_ModuleConfig_msg | ||||||
|  | @ -566,6 +614,7 @@ extern const pb_msgdesc_t meshtastic_ModuleConfig_CannedMessageConfig_msg; | ||||||
| #define meshtastic_ModuleConfig_RangeTestConfig_fields &meshtastic_ModuleConfig_RangeTestConfig_msg | #define meshtastic_ModuleConfig_RangeTestConfig_fields &meshtastic_ModuleConfig_RangeTestConfig_msg | ||||||
| #define meshtastic_ModuleConfig_TelemetryConfig_fields &meshtastic_ModuleConfig_TelemetryConfig_msg | #define meshtastic_ModuleConfig_TelemetryConfig_fields &meshtastic_ModuleConfig_TelemetryConfig_msg | ||||||
| #define meshtastic_ModuleConfig_CannedMessageConfig_fields &meshtastic_ModuleConfig_CannedMessageConfig_msg | #define meshtastic_ModuleConfig_CannedMessageConfig_fields &meshtastic_ModuleConfig_CannedMessageConfig_msg | ||||||
|  | #define meshtastic_RemoteHardwarePin_fields &meshtastic_RemoteHardwarePin_msg | ||||||
| 
 | 
 | ||||||
| /* Maximum encoded size of messages (where known) */ | /* Maximum encoded size of messages (where known) */ | ||||||
| #define meshtastic_ModuleConfig_AudioConfig_size 19 | #define meshtastic_ModuleConfig_AudioConfig_size 19 | ||||||
|  | @ -573,11 +622,12 @@ extern const pb_msgdesc_t meshtastic_ModuleConfig_CannedMessageConfig_msg; | ||||||
| #define meshtastic_ModuleConfig_ExternalNotificationConfig_size 40 | #define meshtastic_ModuleConfig_ExternalNotificationConfig_size 40 | ||||||
| #define meshtastic_ModuleConfig_MQTTConfig_size  220 | #define meshtastic_ModuleConfig_MQTTConfig_size  220 | ||||||
| #define meshtastic_ModuleConfig_RangeTestConfig_size 10 | #define meshtastic_ModuleConfig_RangeTestConfig_size 10 | ||||||
| #define meshtastic_ModuleConfig_RemoteHardwareConfig_size 2 | #define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96 | ||||||
| #define meshtastic_ModuleConfig_SerialConfig_size 26 | #define meshtastic_ModuleConfig_SerialConfig_size 26 | ||||||
| #define meshtastic_ModuleConfig_StoreForwardConfig_size 22 | #define meshtastic_ModuleConfig_StoreForwardConfig_size 22 | ||||||
| #define meshtastic_ModuleConfig_TelemetryConfig_size 26 | #define meshtastic_ModuleConfig_TelemetryConfig_size 26 | ||||||
| #define meshtastic_ModuleConfig_size             223 | #define meshtastic_ModuleConfig_size             223 | ||||||
|  | #define meshtastic_RemoteHardwarePin_size        21 | ||||||
| 
 | 
 | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
| } /* extern "C" */ | } /* extern "C" */ | ||||||
|  |  | ||||||
|  | @ -50,6 +50,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta | ||||||
|     // if handled == false, then let others look at this message also if they want
 |     // if handled == false, then let others look at this message also if they want
 | ||||||
|     bool handled = false; |     bool handled = false; | ||||||
|     assert(r); |     assert(r); | ||||||
|  |     bool fromOthers = mp.from != 0 && mp.from != nodeDB.getNodeNum(); | ||||||
| 
 | 
 | ||||||
|     switch (r->which_payload_variant) { |     switch (r->which_payload_variant) { | ||||||
| 
 | 
 | ||||||
|  | @ -175,6 +176,14 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta | ||||||
|         handleGetDeviceConnectionStatus(mp); |         handleGetDeviceConnectionStatus(mp); | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
|  |     case meshtastic_AdminMessage_get_module_config_response_tag: { | ||||||
|  |         LOG_INFO("Client is receiving a get_module_config response.\n"); | ||||||
|  |         if (fromOthers && r->get_module_config_response.which_payload_variant == | ||||||
|  |                               meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG) { | ||||||
|  |             handleGetModuleConfigResponse(mp, r); | ||||||
|  |         } | ||||||
|  |         break; | ||||||
|  |     } | ||||||
| #ifdef ARCH_PORTDUINO | #ifdef ARCH_PORTDUINO | ||||||
|     case meshtastic_AdminMessage_exit_simulator_tag: |     case meshtastic_AdminMessage_exit_simulator_tag: | ||||||
|         LOG_INFO("Exiting simulator\n"); |         LOG_INFO("Exiting simulator\n"); | ||||||
|  | @ -205,6 +214,29 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta | ||||||
|     return handled; |     return handled; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void AdminModule::handleGetModuleConfigResponse(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *r) | ||||||
|  | { | ||||||
|  |     // Skip if it's disabled or no pins are exposed
 | ||||||
|  |     if (!r->get_module_config_response.payload_variant.remote_hardware.enabled || | ||||||
|  |         !r->get_module_config_response.payload_variant.remote_hardware.available_pins) { | ||||||
|  |         LOG_DEBUG("Remote hardware module disabled or no vailable_pins. Skipping...\n"); | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  |     for (uint8_t i = 0; i < devicestate.node_remote_hardware_pins_count; i++) { | ||||||
|  |         if (devicestate.node_remote_hardware_pins[i].node_num == 0 || !devicestate.node_remote_hardware_pins[i].has_pin) { | ||||||
|  |             continue; | ||||||
|  |         } | ||||||
|  |         for (uint8_t j = 0; j < sizeof(r->get_module_config_response.payload_variant.remote_hardware.available_pins); j++) { | ||||||
|  |             auto availablePin = r->get_module_config_response.payload_variant.remote_hardware.available_pins[j]; | ||||||
|  |             if (i < devicestate.node_remote_hardware_pins_count) { | ||||||
|  |                 devicestate.node_remote_hardware_pins[i].node_num = mp.from; | ||||||
|  |                 devicestate.node_remote_hardware_pins[i].pin = availablePin; | ||||||
|  |             } | ||||||
|  |             i++; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| /**
 | /**
 | ||||||
|  * Setter methods |  * Setter methods | ||||||
|  */ |  */ | ||||||
|  | @ -487,6 +519,16 @@ void AdminModule::handleGetModuleConfig(const meshtastic_MeshPacket &req, const | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void AdminModule::handleGetNodeRemoteHardwarePins(const meshtastic_MeshPacket &req) | ||||||
|  | { | ||||||
|  |     // We create the reply here
 | ||||||
|  |     meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default; | ||||||
|  |     memcpy(r.get_node_remote_hardware_pins_response.node_remote_hardware_pins, devicestate.node_remote_hardware_pins, | ||||||
|  |            sizeof(devicestate.node_remote_hardware_pins)); | ||||||
|  |     r.which_payload_variant = meshtastic_AdminMessage_get_node_remote_hardware_pins_response_tag; | ||||||
|  |     myReply = allocDataProtobuf(r); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void AdminModule::handleGetDeviceMetadata(const meshtastic_MeshPacket &req) | void AdminModule::handleGetDeviceMetadata(const meshtastic_MeshPacket &req) | ||||||
| { | { | ||||||
|     meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default; |     meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default; | ||||||
|  |  | ||||||
|  | @ -26,15 +26,18 @@ class AdminModule : public ProtobufModule<meshtastic_AdminMessage> | ||||||
|     bool hasOpenEditTransaction = false; |     bool hasOpenEditTransaction = false; | ||||||
| 
 | 
 | ||||||
|     void saveChanges(int saveWhat, bool shouldReboot = true); |     void saveChanges(int saveWhat, bool shouldReboot = true); | ||||||
|  | 
 | ||||||
|     /**
 |     /**
 | ||||||
|      * Getters |      * Getters | ||||||
|      */ |      */ | ||||||
|  |     void handleGetModuleConfigResponse(const meshtastic_MeshPacket &req, meshtastic_AdminMessage *p); | ||||||
|     void handleGetOwner(const meshtastic_MeshPacket &req); |     void handleGetOwner(const meshtastic_MeshPacket &req); | ||||||
|     void handleGetConfig(const meshtastic_MeshPacket &req, uint32_t configType); |     void handleGetConfig(const meshtastic_MeshPacket &req, uint32_t configType); | ||||||
|     void handleGetModuleConfig(const meshtastic_MeshPacket &req, uint32_t configType); |     void handleGetModuleConfig(const meshtastic_MeshPacket &req, uint32_t configType); | ||||||
|     void handleGetChannel(const meshtastic_MeshPacket &req, uint32_t channelIndex); |     void handleGetChannel(const meshtastic_MeshPacket &req, uint32_t channelIndex); | ||||||
|     void handleGetDeviceMetadata(const meshtastic_MeshPacket &req); |     void handleGetDeviceMetadata(const meshtastic_MeshPacket &req); | ||||||
|     void handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &req); |     void handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &req); | ||||||
|  |     void handleGetNodeRemoteHardwarePins(const meshtastic_MeshPacket &req); | ||||||
|     /**
 |     /**
 | ||||||
|      * Setters |      * Setters | ||||||
|      */ |      */ | ||||||
|  |  | ||||||
|  | @ -53,7 +53,7 @@ bool RemoteHardwareModule::handleReceivedProtobuf(const meshtastic_MeshPacket &r | ||||||
| { | { | ||||||
|     if (moduleConfig.remote_hardware.enabled) { |     if (moduleConfig.remote_hardware.enabled) { | ||||||
|         auto p = *pptr; |         auto p = *pptr; | ||||||
|         LOG_INFO("Received RemoteHardware typ=%d\n", p.type); |         LOG_INFO("Received RemoteHardware type=%d\n", p.type); | ||||||
| 
 | 
 | ||||||
|         switch (p.type) { |         switch (p.type) { | ||||||
|         case meshtastic_HardwareMessage_Type_WRITE_GPIOS: |         case meshtastic_HardwareMessage_Type_WRITE_GPIOS: | ||||||
|  |  | ||||||
		Ładowanie…
	
		Reference in New Issue
	
	 Ben Meadors
						Ben Meadors