kopia lustrzana https://github.com/meshtastic/firmware
Merge 61b64fb0e2
into a93d779ec0
commit
5f1dd00661
|
@ -336,6 +336,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define MESHTASTIC_EXCLUDE_SERIAL 1
|
||||
#define MESHTASTIC_EXCLUDE_POWERSTRESS 1
|
||||
#define MESHTASTIC_EXCLUDE_ADMIN 1
|
||||
#define MESHTASTIC_EXCLUDE_FISHEYESTATEROUTING 1
|
||||
#endif
|
||||
|
||||
// // Turn off wifi even if HW supports wifi (webserver relies on wifi and is also disabled)
|
||||
|
|
|
@ -66,6 +66,9 @@ bool FloodingRouter::isRebroadcaster()
|
|||
void FloodingRouter::perhapsRebroadcast(const meshtastic_MeshPacket *p)
|
||||
{
|
||||
if (!isToUs(p) && (p->hop_limit > 0) && !isFromUs(p)) {
|
||||
if((moduleConfig.has_fish_eye_state_routing && moduleConfig.fish_eye_state_routing.enabled && (config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState)) && (p->decoded.portnum == meshtastic_PortNum_FISHEYESTATEROUTING_APP)){
|
||||
return; // Don't want to rebroadcast LSP-Packages beyond 0-Hop-Neighborhood
|
||||
}
|
||||
if (p->id != 0) {
|
||||
if (isRebroadcaster()) {
|
||||
meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); // keep a copy because we will be sending it
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "power.h"
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
#include "modules/FishEyeStateRoutingModule.h"
|
||||
|
||||
#if ARCH_PORTDUINO
|
||||
#include "PortduinoGlue.h"
|
||||
|
@ -232,6 +233,16 @@ ErrorCode MeshService::sendQueueStatusToPhone(const meshtastic_QueueStatus &qs,
|
|||
|
||||
void MeshService::sendToMesh(meshtastic_MeshPacket *p, RxSource src, bool ccToPhone)
|
||||
{
|
||||
if(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.fish_eye_state_routing.enabled){
|
||||
if(p->to != 0 && p->to != NODENUM_BROADCAST && !isToUs(p)){
|
||||
p->decoded.dest = fishEyeStateRoutingModule->getNextHopForID(p->to);
|
||||
}else if ((p->to == 0) && (p->decoded.dest != 0) && (p->decoded.dest != NODENUM_BROADCAST ) && (p->decoded.dest != nodeDB->getNodeNum()))
|
||||
{
|
||||
p->to = p->decoded.dest;
|
||||
p->decoded.dest = fishEyeStateRoutingModule->getNextHopForID(p->to);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t mesh_packet_id = p->id;
|
||||
nodeDB->updateFrom(*p); // update our local DB for this packet (because phone might have sent position packets etc...)
|
||||
|
||||
|
|
|
@ -761,6 +761,10 @@ void NodeDB::installDefaultModuleConfig()
|
|||
moduleConfig.has_neighbor_info = true;
|
||||
moduleConfig.neighbor_info.enabled = false;
|
||||
|
||||
moduleConfig.has_fish_eye_state_routing = true;
|
||||
moduleConfig.fish_eye_state_routing.enabled = false; // Works only in Combination with Neighbor info Module
|
||||
config.network.routingAlgorithm = meshtastic_Config_RoutingConfig_FishEyeState;
|
||||
|
||||
moduleConfig.has_detection_sensor = true;
|
||||
moduleConfig.detection_sensor.enabled = false;
|
||||
moduleConfig.detection_sensor.detection_trigger_type = meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH;
|
||||
|
@ -817,6 +821,7 @@ void NodeDB::installRoleDefaults(meshtastic_Config_DeviceConfig_Role role)
|
|||
config.position.position_broadcast_smart_enabled = false;
|
||||
config.position.position_broadcast_secs = UINT32_MAX;
|
||||
moduleConfig.neighbor_info.update_interval = UINT32_MAX;
|
||||
moduleConfig.fish_eye_state_routing.enabled = false;
|
||||
moduleConfig.telemetry.device_update_interval = UINT32_MAX;
|
||||
moduleConfig.telemetry.environment_update_interval = UINT32_MAX;
|
||||
moduleConfig.telemetry.air_quality_interval = UINT32_MAX;
|
||||
|
@ -1286,6 +1291,7 @@ bool NodeDB::saveToDiskNoRetry(int saveWhat)
|
|||
moduleConfig.has_ambient_lighting = true;
|
||||
moduleConfig.has_audio = true;
|
||||
moduleConfig.has_paxcounter = true;
|
||||
moduleConfig.has_fish_eye_state_routing = true;
|
||||
|
||||
success &=
|
||||
saveProto(moduleConfigFileName, meshtastic_LocalModuleConfig_size, &meshtastic_LocalModuleConfig_msg, &moduleConfig);
|
||||
|
|
|
@ -366,6 +366,11 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;
|
||||
fromRadioScratch.moduleConfig.payload_variant.neighbor_info = moduleConfig.neighbor_info;
|
||||
break;
|
||||
case meshtastic_ModuleConfig_fish_eye_state_routing_tag:
|
||||
LOG_DEBUG("Send module config: FishEyeStateRouting");
|
||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_fish_eye_state_routing_tag;
|
||||
fromRadioScratch.moduleConfig.payload_variant.fish_eye_state_routing = moduleConfig.fish_eye_state_routing;
|
||||
break;
|
||||
case meshtastic_ModuleConfig_detection_sensor_tag:
|
||||
LOG_DEBUG("Send module config: detection sensor");
|
||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_detection_sensor_tag;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "mesh-pb-constants.h"
|
||||
#include "meshUtils.h"
|
||||
#include "modules/RoutingModule.h"
|
||||
#include "modules/FishEyeStateRoutingModule.h"
|
||||
#if !MESHTASTIC_EXCLUDE_MQTT
|
||||
#include "mqtt/MQTT.h"
|
||||
#endif
|
||||
|
@ -652,6 +653,18 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
|
|||
if (!skipHandle) {
|
||||
MeshModule::callModules(*p, src);
|
||||
|
||||
if(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.fish_eye_state_routing.enabled && (!isToUs(p) && (p->decoded.dest == nodeDB->getNodeNum()) && (p->to != 0) && (p->to != NODENUM_BROADCAST))){
|
||||
meshtastic_MeshPacket *copy = allocForSending();
|
||||
copy->decoded = p->decoded;
|
||||
copy->to = p->to;
|
||||
copy->decoded.dest = fishEyeStateRoutingModule->getNextHopForID(copy->to);
|
||||
copy->from = nodeDB->getNodeNum();
|
||||
char * logout = "";
|
||||
sprintf(logout, "Forwarding Package to Node %u to Next-Hop %u",copy->to,copy->decoded.dest);
|
||||
LOG_DEBUG(logout);
|
||||
service->sendToMesh(copy);
|
||||
}
|
||||
|
||||
#if !MESHTASTIC_EXCLUDE_MQTT
|
||||
// Mark as pki_encrypted if it is not yet decoded and MQTT encryption is also enabled, hash matches and it's a DM not to
|
||||
// us (because we would be able to decrypt it)
|
||||
|
|
|
@ -67,7 +67,9 @@ typedef enum _meshtastic_AdminMessage_ModuleConfigType {
|
|||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_DETECTIONSENSOR_CONFIG = 11,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG = 12
|
||||
meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG = 12,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_FISHEYESTATEROUTING_CONFIG = 13
|
||||
} meshtastic_AdminMessage_ModuleConfigType;
|
||||
|
||||
typedef enum _meshtastic_AdminMessage_BackupLocation {
|
||||
|
|
|
@ -302,6 +302,12 @@ typedef enum _meshtastic_Config_BluetoothConfig_PairingMode {
|
|||
meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN = 2
|
||||
} meshtastic_Config_BluetoothConfig_PairingMode;
|
||||
|
||||
typedef enum _meshtastic_Config_RoutingConfig_RoutingAlgo {
|
||||
meshtastic_Config_RoutingConfig_Flooding = 0,
|
||||
meshtastic_Config_RoutingConfig_FishEyeState = 1,
|
||||
meshtastic_Config_RoutingConfig_Ad_hoc_On_Demand_Distance_Vector = 2
|
||||
} meshtastic_Config_RoutingConfig_RoutingAlgo;
|
||||
|
||||
/* Struct definitions */
|
||||
/* Configuration */
|
||||
typedef struct _meshtastic_Config_DeviceConfig {
|
||||
|
@ -439,6 +445,8 @@ typedef struct _meshtastic_Config_NetworkConfig {
|
|||
char rsyslog_server[33];
|
||||
/* Flags for enabling/disabling network protocols */
|
||||
uint32_t enabled_protocols;
|
||||
/* Set used Routing Algorithm */
|
||||
meshtastic_Config_RoutingConfig_RoutingAlgo routingAlgorithm;
|
||||
} meshtastic_Config_NetworkConfig;
|
||||
|
||||
/* Display Config */
|
||||
|
@ -671,6 +679,8 @@ extern "C" {
|
|||
|
||||
#define meshtastic_Config_NetworkConfig_address_mode_ENUMTYPE meshtastic_Config_NetworkConfig_AddressMode
|
||||
|
||||
#define meshtastic_Config_NetworkConfig_routingAlgorithm_ENUMTYPE meshtastic_Config_RoutingConfig_RoutingAlgo
|
||||
|
||||
|
||||
#define meshtastic_Config_DisplayConfig_gps_format_ENUMTYPE meshtastic_Config_DisplayConfig_GpsCoordinateFormat
|
||||
#define meshtastic_Config_DisplayConfig_units_ENUMTYPE meshtastic_Config_DisplayConfig_DisplayUnits
|
||||
|
@ -691,7 +701,7 @@ extern "C" {
|
|||
#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||
#define meshtastic_Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
||||
#define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Config_NetworkConfig_init_default {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, "", 0}
|
||||
#define meshtastic_Config_NetworkConfig_init_default {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, "", 0, meshtastic_Config_RoutingConfig_Flooding}
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0}
|
||||
#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN, 0}
|
||||
#define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0}
|
||||
|
@ -702,7 +712,7 @@ extern "C" {
|
|||
#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||
#define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
||||
#define meshtastic_Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Config_NetworkConfig_init_zero {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, "", 0}
|
||||
#define meshtastic_Config_NetworkConfig_init_zero {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, "", 0, meshtastic_Config_RoutingConfig_Flooding}
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN, 0}
|
||||
#define meshtastic_Config_LoRaConfig_init_zero {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0}
|
||||
|
@ -887,7 +897,8 @@ X(a, STATIC, SINGULAR, BOOL, eth_enabled, 6) \
|
|||
X(a, STATIC, SINGULAR, UENUM, address_mode, 7) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, ipv4_config, 8) \
|
||||
X(a, STATIC, SINGULAR, STRING, rsyslog_server, 9) \
|
||||
X(a, STATIC, SINGULAR, UINT32, enabled_protocols, 10)
|
||||
X(a, STATIC, SINGULAR, UINT32, enabled_protocols, 10)\
|
||||
X(a, STATIC, SINGULAR, UENUM, routingAlgorithm, 11)
|
||||
#define meshtastic_Config_NetworkConfig_CALLBACK NULL
|
||||
#define meshtastic_Config_NetworkConfig_DEFAULT NULL
|
||||
#define meshtastic_Config_NetworkConfig_ipv4_config_MSGTYPE meshtastic_Config_NetworkConfig_IpV4Config
|
||||
|
@ -993,7 +1004,7 @@ extern const pb_msgdesc_t meshtastic_Config_SessionkeyConfig_msg;
|
|||
#define meshtastic_Config_DisplayConfig_size 32
|
||||
#define meshtastic_Config_LoRaConfig_size 85
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_size 20
|
||||
#define meshtastic_Config_NetworkConfig_size 202
|
||||
#define meshtastic_Config_NetworkConfig_size 206
|
||||
#define meshtastic_Config_PositionConfig_size 62
|
||||
#define meshtastic_Config_PowerConfig_size 52
|
||||
#define meshtastic_Config_SecurityConfig_size 178
|
||||
|
|
|
@ -87,6 +87,9 @@ typedef struct _meshtastic_LocalModuleConfig {
|
|||
/* Paxcounter Config */
|
||||
bool has_paxcounter;
|
||||
meshtastic_ModuleConfig_PaxcounterConfig paxcounter;
|
||||
/* The part of the config that is specific to the FisheyeState-Routing module */
|
||||
bool has_fish_eye_state_routing;
|
||||
meshtastic_ModuleConfig_FishEyeStateRoutingConfig fish_eye_state_routing;
|
||||
} meshtastic_LocalModuleConfig;
|
||||
|
||||
|
||||
|
@ -96,9 +99,9 @@ extern "C" {
|
|||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_LocalConfig_init_default {false, meshtastic_Config_DeviceConfig_init_default, false, meshtastic_Config_PositionConfig_init_default, false, meshtastic_Config_PowerConfig_init_default, false, meshtastic_Config_NetworkConfig_init_default, false, meshtastic_Config_DisplayConfig_init_default, false, meshtastic_Config_LoRaConfig_init_default, false, meshtastic_Config_BluetoothConfig_init_default, 0, false, meshtastic_Config_SecurityConfig_init_default}
|
||||
#define meshtastic_LocalModuleConfig_init_default {false, meshtastic_ModuleConfig_MQTTConfig_init_default, false, meshtastic_ModuleConfig_SerialConfig_init_default, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_default, false, meshtastic_ModuleConfig_StoreForwardConfig_init_default, false, meshtastic_ModuleConfig_RangeTestConfig_init_default, false, meshtastic_ModuleConfig_TelemetryConfig_init_default, false, meshtastic_ModuleConfig_CannedMessageConfig_init_default, 0, false, meshtastic_ModuleConfig_AudioConfig_init_default, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_default, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_default, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_default, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_default, false, meshtastic_ModuleConfig_PaxcounterConfig_init_default}
|
||||
#define meshtastic_LocalModuleConfig_init_default {false, meshtastic_ModuleConfig_MQTTConfig_init_default, false, meshtastic_ModuleConfig_SerialConfig_init_default, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_default, false, meshtastic_ModuleConfig_StoreForwardConfig_init_default, false, meshtastic_ModuleConfig_RangeTestConfig_init_default, false, meshtastic_ModuleConfig_TelemetryConfig_init_default, false, meshtastic_ModuleConfig_CannedMessageConfig_init_default, 0, false, meshtastic_ModuleConfig_AudioConfig_init_default, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_default, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_default, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_default, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_default, false, meshtastic_ModuleConfig_PaxcounterConfig_init_default, false, meshtastic_ModuleConfig_FishEyeStateRoutingConfig_init_default}
|
||||
#define meshtastic_LocalConfig_init_zero {false, meshtastic_Config_DeviceConfig_init_zero, false, meshtastic_Config_PositionConfig_init_zero, false, meshtastic_Config_PowerConfig_init_zero, false, meshtastic_Config_NetworkConfig_init_zero, false, meshtastic_Config_DisplayConfig_init_zero, false, meshtastic_Config_LoRaConfig_init_zero, false, meshtastic_Config_BluetoothConfig_init_zero, 0, false, meshtastic_Config_SecurityConfig_init_zero}
|
||||
#define meshtastic_LocalModuleConfig_init_zero {false, meshtastic_ModuleConfig_MQTTConfig_init_zero, false, meshtastic_ModuleConfig_SerialConfig_init_zero, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero, false, meshtastic_ModuleConfig_StoreForwardConfig_init_zero, false, meshtastic_ModuleConfig_RangeTestConfig_init_zero, false, meshtastic_ModuleConfig_TelemetryConfig_init_zero, false, meshtastic_ModuleConfig_CannedMessageConfig_init_zero, 0, false, meshtastic_ModuleConfig_AudioConfig_init_zero, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_zero, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_zero, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_zero, false, meshtastic_ModuleConfig_PaxcounterConfig_init_zero}
|
||||
#define meshtastic_LocalModuleConfig_init_zero {false, meshtastic_ModuleConfig_MQTTConfig_init_zero, false, meshtastic_ModuleConfig_SerialConfig_init_zero, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero, false, meshtastic_ModuleConfig_StoreForwardConfig_init_zero, false, meshtastic_ModuleConfig_RangeTestConfig_init_zero, false, meshtastic_ModuleConfig_TelemetryConfig_init_zero, false, meshtastic_ModuleConfig_CannedMessageConfig_init_zero, 0, false, meshtastic_ModuleConfig_AudioConfig_init_zero, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_zero, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_zero, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_zero, false, meshtastic_ModuleConfig_PaxcounterConfig_init_zero, false, meshtastic_ModuleConfig_FishEyeStateRoutingConfig_init_zero}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_LocalConfig_device_tag 1
|
||||
|
@ -124,6 +127,7 @@ extern "C" {
|
|||
#define meshtastic_LocalModuleConfig_ambient_lighting_tag 12
|
||||
#define meshtastic_LocalModuleConfig_detection_sensor_tag 13
|
||||
#define meshtastic_LocalModuleConfig_paxcounter_tag 14
|
||||
#define meshtastic_LocalModuleConfig_fish_eye_state_routing_tag 15
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_LocalConfig_FIELDLIST(X, a) \
|
||||
|
@ -161,7 +165,8 @@ X(a, STATIC, OPTIONAL, MESSAGE, remote_hardware, 10) \
|
|||
X(a, STATIC, OPTIONAL, MESSAGE, neighbor_info, 11) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, ambient_lighting, 12) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, detection_sensor, 13) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, paxcounter, 14)
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, paxcounter, 14) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, fish_eye_state_routing, 15)
|
||||
#define meshtastic_LocalModuleConfig_CALLBACK NULL
|
||||
#define meshtastic_LocalModuleConfig_DEFAULT NULL
|
||||
#define meshtastic_LocalModuleConfig_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig
|
||||
|
@ -177,6 +182,7 @@ X(a, STATIC, OPTIONAL, MESSAGE, paxcounter, 14)
|
|||
#define meshtastic_LocalModuleConfig_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig
|
||||
#define meshtastic_LocalModuleConfig_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig
|
||||
#define meshtastic_LocalModuleConfig_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig
|
||||
#define meshtastic_LocalModuleConfig_fish_eye_state_routing_MSGTYPE meshtastic_ModuleConfig_FishEyeStateRoutingConfig
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_LocalConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
||||
|
|
|
@ -63,6 +63,9 @@ PB_BIND(meshtastic_NeighborInfo, meshtastic_NeighborInfo, AUTO)
|
|||
PB_BIND(meshtastic_Neighbor, meshtastic_Neighbor, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_FishEyeStateRouting, meshtastic_FishEyeStateRouting, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_DeviceMetadata, meshtastic_DeviceMetadata, AUTO)
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "meshtastic/telemetry.pb.h"
|
||||
#include "meshtastic/xmodem.pb.h"
|
||||
#include "meshtastic/device_ui.pb.h"
|
||||
#include <ctime>
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
|
@ -326,7 +327,9 @@ typedef enum _meshtastic_ExcludedModules {
|
|||
/* Detection Sensor module */
|
||||
meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG = 2048,
|
||||
/* Paxcounter module */
|
||||
meshtastic_ExcludedModules_PAXCOUNTER_CONFIG = 4096
|
||||
meshtastic_ExcludedModules_PAXCOUNTER_CONFIG = 4096,
|
||||
/* Fisheye StateRouting Module */
|
||||
meshtastic_ExcludedModules_FISHEYESTATEROUTING_CONFIG = 8192
|
||||
} meshtastic_ExcludedModules;
|
||||
|
||||
/* How the location was acquired: manual, onboard GPS, external (EUD) GPS */
|
||||
|
@ -944,8 +947,23 @@ typedef struct _meshtastic_NeighborInfo {
|
|||
/* The list of out edges from this node */
|
||||
pb_size_t neighbors_count;
|
||||
meshtastic_Neighbor neighbors[10];
|
||||
/* UNIX-Timestamp of Creation*/
|
||||
uint32_t creation;
|
||||
} meshtastic_NeighborInfo;
|
||||
|
||||
/* Struct for an FishEyeState/ Link-State-Package */
|
||||
typedef struct _meshtastic_FishEyeStateRouting {
|
||||
/* The node ID of the node of origin */
|
||||
uint32_t node_id;
|
||||
/* Number of Hops, this LSP-Package alredy traveled */
|
||||
uint32_t traveledHops;
|
||||
/* The list of out edges from this node */
|
||||
pb_size_t neighbors_count;
|
||||
meshtastic_Neighbor neighbors[10];
|
||||
/* UNIX-Timestamp of Creation*/
|
||||
uint32_t creation;
|
||||
} meshtastic_FishEyeStateRouting;
|
||||
|
||||
/* Device metadata response */
|
||||
typedef struct _meshtastic_DeviceMetadata {
|
||||
/* Device firmware version string */
|
||||
|
@ -1206,7 +1224,8 @@ extern "C" {
|
|||
#define meshtastic_FileInfo_init_default {"", 0}
|
||||
#define meshtastic_ToRadio_init_default {0, {meshtastic_MeshPacket_init_default}}
|
||||
#define meshtastic_Compressed_init_default {_meshtastic_PortNum_MIN, {0, {0}}}
|
||||
#define meshtastic_NeighborInfo_init_default {0, 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, 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},0}
|
||||
#define meshtastic_FishEyeStateRouting_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},0}
|
||||
#define meshtastic_Neighbor_init_default {0, 0, 0, 0}
|
||||
#define meshtastic_DeviceMetadata_init_default {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0, 0, 0}
|
||||
#define meshtastic_Heartbeat_init_default {0}
|
||||
|
@ -1231,7 +1250,8 @@ extern "C" {
|
|||
#define meshtastic_FileInfo_init_zero {"", 0}
|
||||
#define meshtastic_ToRadio_init_zero {0, {meshtastic_MeshPacket_init_zero}}
|
||||
#define meshtastic_Compressed_init_zero {_meshtastic_PortNum_MIN, {0, {0}}}
|
||||
#define meshtastic_NeighborInfo_init_zero {0, 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, 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},0}
|
||||
#define meshtastic_FishEyeStateRouting_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},0}
|
||||
#define meshtastic_Neighbor_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_DeviceMetadata_init_zero {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0, 0, 0}
|
||||
#define meshtastic_Heartbeat_init_zero {0}
|
||||
|
@ -1360,6 +1380,11 @@ extern "C" {
|
|||
#define meshtastic_NeighborInfo_last_sent_by_id_tag 2
|
||||
#define meshtastic_NeighborInfo_node_broadcast_interval_secs_tag 3
|
||||
#define meshtastic_NeighborInfo_neighbors_tag 4
|
||||
#define meshtastic_NeighborInfo_creation_tag 5
|
||||
#define meshtastic_FishEyeStateRouting_node_tag 1
|
||||
#define meshtastic_FishEyeStateRouting_traveledHops_tag 2
|
||||
#define meshtastic_FishEyeStateRouting_neighbors_tag 3
|
||||
#define meshtastic_FishEyeStateRouting_creation_tag 4
|
||||
#define meshtastic_DeviceMetadata_firmware_version_tag 1
|
||||
#define meshtastic_DeviceMetadata_device_state_version_tag 2
|
||||
#define meshtastic_DeviceMetadata_canShutdown_tag 3
|
||||
|
@ -1638,11 +1663,21 @@ X(a, STATIC, SINGULAR, BYTES, data, 2)
|
|||
X(a, STATIC, SINGULAR, UINT32, node_id, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, last_sent_by_id, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, node_broadcast_interval_secs, 3) \
|
||||
X(a, STATIC, REPEATED, MESSAGE, neighbors, 4)
|
||||
X(a, STATIC, REPEATED, MESSAGE, neighbors, 4)\
|
||||
X(a, STATIC, SINGULAR, UINT32, creation, 5)
|
||||
#define meshtastic_NeighborInfo_CALLBACK NULL
|
||||
#define meshtastic_NeighborInfo_DEFAULT NULL
|
||||
#define meshtastic_NeighborInfo_neighbors_MSGTYPE meshtastic_Neighbor
|
||||
|
||||
#define meshtastic_FishEyeStateRouting_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, node_id, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, traveledHops, 2) \
|
||||
X(a, STATIC, REPEATED, MESSAGE, neighbors, 3)\
|
||||
X(a, STATIC, SINGULAR, UINT32, creation, 4)
|
||||
#define meshtastic_FishEyeStateRouting_CALLBACK NULL
|
||||
#define meshtastic_FishEyeStateRouting_DEFAULT NULL
|
||||
#define meshtastic_FishEyeStateRouting_neighbors_MSGTYPE meshtastic_Neighbor
|
||||
|
||||
#define meshtastic_Neighbor_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, node_id, 1) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, snr, 2) \
|
||||
|
@ -1719,6 +1754,7 @@ extern const pb_msgdesc_t meshtastic_FileInfo_msg;
|
|||
extern const pb_msgdesc_t meshtastic_ToRadio_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Compressed_msg;
|
||||
extern const pb_msgdesc_t meshtastic_NeighborInfo_msg;
|
||||
extern const pb_msgdesc_t meshtastic_FishEyeStateRouting_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Neighbor_msg;
|
||||
extern const pb_msgdesc_t meshtastic_DeviceMetadata_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Heartbeat_msg;
|
||||
|
@ -1746,6 +1782,7 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||
#define meshtastic_ToRadio_fields &meshtastic_ToRadio_msg
|
||||
#define meshtastic_Compressed_fields &meshtastic_Compressed_msg
|
||||
#define meshtastic_NeighborInfo_fields &meshtastic_NeighborInfo_msg
|
||||
#define meshtastic_FishEyeStateRouting_fields &meshtastic_FishEyeStateRouting_msg
|
||||
#define meshtastic_Neighbor_fields &meshtastic_Neighbor_msg
|
||||
#define meshtastic_DeviceMetadata_fields &meshtastic_DeviceMetadata_msg
|
||||
#define meshtastic_Heartbeat_fields &meshtastic_Heartbeat_msg
|
||||
|
@ -1770,7 +1807,8 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||
#define meshtastic_MeshPacket_size 378
|
||||
#define meshtastic_MqttClientProxyMessage_size 501
|
||||
#define meshtastic_MyNodeInfo_size 77
|
||||
#define meshtastic_NeighborInfo_size 258
|
||||
#define meshtastic_NeighborInfo_size 262
|
||||
#define meshtastic_FishEyeStateRouting_size 258
|
||||
#define meshtastic_Neighbor_size 22
|
||||
#define meshtastic_NodeInfo_size 319
|
||||
#define meshtastic_NodeRemoteHardwarePin_size 29
|
||||
|
|
|
@ -54,6 +54,9 @@ PB_BIND(meshtastic_ModuleConfig_AmbientLightingConfig, meshtastic_ModuleConfig_A
|
|||
PB_BIND(meshtastic_RemoteHardwarePin, meshtastic_RemoteHardwarePin, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_FishEyeStateRoutingConfig, meshtastic_ModuleConfig_FishEyeStateRoutingConfig, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -160,6 +160,12 @@ typedef struct _meshtastic_ModuleConfig_NeighborInfoConfig {
|
|||
bool transmit_over_lora;
|
||||
} meshtastic_ModuleConfig_NeighborInfoConfig;
|
||||
|
||||
/* FishEyeStateRouting Config */
|
||||
typedef struct _meshtastic_ModuleConfig_FishEyeStateRoutingConfig {
|
||||
/* Whether the Module is enabled */
|
||||
bool enabled;
|
||||
} meshtastic_ModuleConfig_FishEyeStateRoutingConfig;
|
||||
|
||||
/* Detection Sensor Module Config */
|
||||
typedef struct _meshtastic_ModuleConfig_DetectionSensorConfig {
|
||||
/* Whether the Module is enabled */
|
||||
|
@ -441,6 +447,8 @@ typedef struct _meshtastic_ModuleConfig {
|
|||
meshtastic_ModuleConfig_DetectionSensorConfig detection_sensor;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_PaxcounterConfig paxcounter;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_FishEyeStateRoutingConfig fish_eye_state_routing;
|
||||
} payload_variant;
|
||||
} meshtastic_ModuleConfig;
|
||||
|
||||
|
@ -505,6 +513,7 @@ extern "C" {
|
|||
#define meshtastic_ModuleConfig_MapReportSettings_init_default {0, 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_NeighborInfoConfig_init_default {0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_FishEyeStateRoutingConfig_init_default {0}
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_init_default {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}
|
||||
#define meshtastic_ModuleConfig_AudioConfig_init_default {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_init_default {0, 0, 0, 0}
|
||||
|
@ -521,6 +530,7 @@ extern "C" {
|
|||
#define meshtastic_ModuleConfig_MapReportSettings_init_zero {0, 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_NeighborInfoConfig_init_zero {0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_FishEyeStateRoutingConfig_init_zero {0}
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_init_zero {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}
|
||||
#define meshtastic_ModuleConfig_AudioConfig_init_zero {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_init_zero {0, 0, 0, 0}
|
||||
|
@ -550,6 +560,7 @@ extern "C" {
|
|||
#define meshtastic_ModuleConfig_NeighborInfoConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_update_interval_tag 2
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_transmit_over_lora_tag 3
|
||||
#define meshtastic_ModuleConfig_FishEyeStateRoutingConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_minimum_broadcast_secs_tag 2
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_state_broadcast_secs_tag 3
|
||||
|
@ -649,6 +660,7 @@ extern "C" {
|
|||
#define meshtastic_ModuleConfig_ambient_lighting_tag 11
|
||||
#define meshtastic_ModuleConfig_detection_sensor_tag 12
|
||||
#define meshtastic_ModuleConfig_paxcounter_tag 13
|
||||
#define meshtastic_ModuleConfig_fish_eye_state_routing_tag 14
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_ModuleConfig_FIELDLIST(X, a) \
|
||||
|
@ -664,7 +676,8 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,remote_hardware,payload_vari
|
|||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,neighbor_info,payload_variant.neighbor_info), 10) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,ambient_lighting,payload_variant.ambient_lighting), 11) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,detection_sensor,payload_variant.detection_sensor), 12) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,paxcounter,payload_variant.paxcounter), 13)
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,paxcounter,payload_variant.paxcounter), 13)\
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,fish_eye_state_routing,payload_variant.fish_eye_state_routing), 14)
|
||||
#define meshtastic_ModuleConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_DEFAULT NULL
|
||||
#define meshtastic_ModuleConfig_payload_variant_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig
|
||||
|
@ -680,6 +693,7 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,paxcounter,payload_variant.p
|
|||
#define meshtastic_ModuleConfig_payload_variant_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_fish_eye_state_routing_MSGTYPE meshtastic_ModuleConfig_FishEyeStateRoutingConfig
|
||||
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
|
@ -718,6 +732,11 @@ X(a, STATIC, SINGULAR, BOOL, transmit_over_lora, 3)
|
|||
#define meshtastic_ModuleConfig_NeighborInfoConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_FishEyeStateRoutingConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1)
|
||||
#define meshtastic_ModuleConfig_FishEyeStateRoutingConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_FishEyeStateRoutingConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, minimum_broadcast_secs, 2) \
|
||||
|
@ -861,6 +880,7 @@ 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_AmbientLightingConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_FishEyeStateRoutingConfig_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_ModuleConfig_fields &meshtastic_ModuleConfig_msg
|
||||
|
@ -879,6 +899,7 @@ extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
|||
#define meshtastic_ModuleConfig_CannedMessageConfig_fields &meshtastic_ModuleConfig_CannedMessageConfig_msg
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_fields &meshtastic_ModuleConfig_AmbientLightingConfig_msg
|
||||
#define meshtastic_RemoteHardwarePin_fields &meshtastic_RemoteHardwarePin_msg
|
||||
#define meshtastic_ModuleConfig_FishEyeStateRoutingConfig_fields &meshtastic_ModuleConfig_FishEyeStateRoutingConfig_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_MAX_SIZE meshtastic_ModuleConfig_size
|
||||
|
@ -898,6 +919,7 @@ extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
|||
#define meshtastic_ModuleConfig_TelemetryConfig_size 46
|
||||
#define meshtastic_ModuleConfig_size 225
|
||||
#define meshtastic_RemoteHardwarePin_size 21
|
||||
#define meshtastic_ModuleConfig_FishEyeStateRoutingConfig_size 3
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
|
@ -84,6 +84,7 @@ typedef enum _meshtastic_PortNum {
|
|||
/* Paxcounter lib included in the firmware
|
||||
ENCODING: protobuf */
|
||||
meshtastic_PortNum_PAXCOUNTER_APP = 34,
|
||||
|
||||
/* Provides a hardware serial interface to send and receive from the Meshtastic network.
|
||||
Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic
|
||||
network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network.
|
||||
|
@ -128,9 +129,12 @@ typedef enum _meshtastic_PortNum {
|
|||
meshtastic_PortNum_MAP_REPORT_APP = 73,
|
||||
/* PowerStress based monitoring support (for automated power consumption testing) */
|
||||
meshtastic_PortNum_POWERSTRESS_APP = 74,
|
||||
/* FishEyeStateRouting-Module */
|
||||
meshtastic_PortNum_FISHEYESTATEROUTING_APP = 75,
|
||||
/* Reticulum Network Stack Tunnel App
|
||||
ENCODING: Fragmented RNS Packet. Handled by Meshtastic RNS interface */
|
||||
meshtastic_PortNum_RETICULUM_TUNNEL_APP = 76,
|
||||
|
||||
/* Private applications should use portnums >= 256.
|
||||
To simplify initial development and testing you can use "PRIVATE_APP"
|
||||
in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh)) */
|
||||
|
|
|
@ -771,6 +771,11 @@ bool AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c)
|
|||
}
|
||||
moduleConfig.neighbor_info = c.payload_variant.neighbor_info;
|
||||
break;
|
||||
case meshtastic_ModuleConfig_fish_eye_state_routing_tag:
|
||||
LOG_INFO("Set module config: FishEyeStateRouting");
|
||||
moduleConfig.has_fish_eye_state_routing = true;
|
||||
moduleConfig.fish_eye_state_routing = c.payload_variant.fish_eye_state_routing;
|
||||
break;
|
||||
case meshtastic_ModuleConfig_detection_sensor_tag:
|
||||
LOG_INFO("Set module config: Detection Sensor");
|
||||
moduleConfig.has_detection_sensor = true;
|
||||
|
@ -944,6 +949,11 @@ void AdminModule::handleGetModuleConfig(const meshtastic_MeshPacket &req, const
|
|||
res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;
|
||||
res.get_module_config_response.payload_variant.neighbor_info = moduleConfig.neighbor_info;
|
||||
break;
|
||||
case meshtastic_AdminMessage_ModuleConfigType_FISHEYESTATEROUTING_CONFIG:
|
||||
LOG_INFO("Get module config: FishEyeStateRouting");
|
||||
res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_fish_eye_state_routing_tag;
|
||||
res.get_module_config_response.payload_variant.fish_eye_state_routing = moduleConfig.fish_eye_state_routing;
|
||||
break;
|
||||
case meshtastic_AdminMessage_ModuleConfigType_DETECTIONSENSOR_CONFIG:
|
||||
LOG_INFO("Get module config: Detection Sensor");
|
||||
res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_detection_sensor_tag;
|
||||
|
|
|
@ -0,0 +1,279 @@
|
|||
#include "FishEyeStateRoutingModule.h"
|
||||
#include "Default.h"
|
||||
#include "MeshService.h"
|
||||
#include "NodeDB.h"
|
||||
#include "RTC.h"
|
||||
#include <Throttle.h>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
|
||||
FishEyeStateRoutingModule *fishEyeStateRoutingModule;
|
||||
|
||||
|
||||
/*
|
||||
* check if Extension is enabled
|
||||
*/
|
||||
FishEyeStateRoutingModule::FishEyeStateRoutingModule()
|
||||
: ProtobufModule("fishEyeStateRouting", meshtastic_PortNum_FISHEYESTATEROUTING_APP, &meshtastic_FishEyeStateRouting_msg),
|
||||
concurrency::OSThread("FishEyeStateRoutingModule")
|
||||
{
|
||||
|
||||
if(!(moduleConfig.fish_eye_state_routing.enabled && config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.has_neighbor_info && moduleConfig.neighbor_info.enabled)){
|
||||
LOG_DEBUG("FishEyeStateRouting Module is disabled");
|
||||
disable();
|
||||
nextLSPPckg = UINT32_MAX;
|
||||
}else {
|
||||
nextLSPPckg = getTime() + moduleConfig.neighbor_info.update_interval;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare two meshtastic_FishEyeStateRouting Structs
|
||||
* Criteria: Neighbor cout, Node ID, neighbors list (only by ID)
|
||||
*/
|
||||
bool FishEyeStateRoutingModule::isequal(const meshtastic_FishEyeStateRouting &s1, const meshtastic_FishEyeStateRouting &s2){
|
||||
if((s1.neighbors_count == s2.neighbors_count) && (s1.node_id == s2.node_id)){
|
||||
bool diff = false;
|
||||
for(int i = 0; i < s1.neighbors_count; i++){
|
||||
if(s1.neighbors[i].node_id != s2.neighbors[i].node_id){
|
||||
diff = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return !diff;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* returns next-Hop for a Message to a given NodeID, if Node is unknwon BroadcastID is returned
|
||||
*/
|
||||
uint32_t FishEyeStateRoutingModule::getNextHopForID(uint32_t dest){
|
||||
if (dest == nodeDB->getNodeNum()){
|
||||
return dest;}
|
||||
auto it = NextHopTable.find(dest);
|
||||
if(it == NextHopTable.end()){
|
||||
return NODENUM_BROADCAST;
|
||||
}else{
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* handels incomming LSP-Packages
|
||||
*/
|
||||
bool FishEyeStateRoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_FishEyeStateRouting *lsp)
|
||||
{
|
||||
if(lsp->node_id == nodeDB->getNodeNum()){return true;} // Don't calculate Path to us
|
||||
auto it = LSPDB.find(lsp->node_id);
|
||||
if(it != LSPDB.end()){ //Node already in LSPDB
|
||||
if(it->second.LSP.creation < lsp->creation){
|
||||
|
||||
bool diff = isequal(it->second.LSP,*lsp);
|
||||
it->second.LSP = *lsp;
|
||||
it->second.LSP.traveledHops += 1;
|
||||
if(it->second.forwarded){ //calculate Timeout
|
||||
it->second.forwarded = false;
|
||||
it->second.timeout = (uint32_t) (((int64_t) getTime()) + (((int64_t) moduleConfig.neighbor_info.update_interval) *((int64_t) std::pow((int64_t) it->second.LSP.traveledHops, alpha))));
|
||||
}else{
|
||||
it->second.timeout = min(it->second.timeout, (uint32_t) (((int64_t) getTime()) + (((int64_t) moduleConfig.neighbor_info.update_interval) *((int64_t) std::pow((int64_t) it->second.LSP.traveledHops, alpha)))));
|
||||
}
|
||||
if(!diff && moduleConfig.fish_eye_state_routing.enabled){calcNextHop();}
|
||||
}
|
||||
|
||||
}else{ //Node not in LSPDB
|
||||
|
||||
LSPDBEntry entry; //create a new LSPDB entry
|
||||
entry.forwarded = false;
|
||||
entry.LSP = *lsp;
|
||||
entry.LSP.traveledHops += 1;
|
||||
entry.timeout = (uint32_t) (((int64_t) getTime()) + (((int64_t) moduleConfig.neighbor_info.update_interval) *((int64_t) std::pow((int64_t) entry.LSP.traveledHops, alpha))));
|
||||
LSPDB.insert(std::make_pair(entry.LSP.node_id,entry));
|
||||
if(moduleConfig.fish_eye_state_routing.enabled){calcNextHop();}
|
||||
}
|
||||
char * logout = "";
|
||||
sprintf(logout, "Received LSP-Pckg of Node %u: ",lsp->node_id);
|
||||
for(int i = 0; i< lsp->neighbors_count; i++){
|
||||
sprintf(logout,"%u, ", lsp->neighbors[i].node_id);
|
||||
}
|
||||
LOG_DEBUG(logout);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* sends the initial LSP-Package
|
||||
*/
|
||||
void FishEyeStateRoutingModule::sendInitialLSP(){
|
||||
LOG_DEBUG("Sending own Neighborhood ...");
|
||||
meshtastic_FishEyeStateRouting LSPInfo;
|
||||
LSPInfo.creation = getTime();
|
||||
LSPInfo.node_id = nodeDB->getNodeNum();
|
||||
LSPInfo.traveledHops = 0;
|
||||
LSPInfo.neighbors_count = neighborhood.size();
|
||||
for(int i = 0; i < neighborhood.size(); i++){
|
||||
meshtastic_Neighbor entry;
|
||||
entry.last_rx_time = 0;
|
||||
entry.node_broadcast_interval_secs = 0;
|
||||
entry.snr = 0;
|
||||
entry.node_id = neighborhood[i].node_id;
|
||||
LSPInfo.neighbors[i] = entry;
|
||||
}
|
||||
meshtastic_MeshPacket *p = allocDataProtobuf(LSPInfo);
|
||||
p->to = NODENUM_BROADCAST;
|
||||
p->decoded.want_response = false;
|
||||
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
|
||||
p->decoded.portnum = meshtastic_PortNum_FISHEYESTATEROUTING_APP;
|
||||
service->sendToMesh(p,RX_SRC_LOCAL,true);
|
||||
nextLSPPckg = getTime() + moduleConfig.neighbor_info.update_interval;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints the Entrys of the LSP-Database
|
||||
*/
|
||||
void FishEyeStateRoutingModule::printLSPDB(){
|
||||
printf("LSPDB:\n");
|
||||
for(auto etr : LSPDB){
|
||||
printf("Node: %u, Neighbors: %u: ", etr.first -16,etr.second.LSP.neighbors_count);
|
||||
for(int i = 0; i< etr.second.LSP.neighbors_count;i++){
|
||||
printf("%u, ", etr.second.LSP.neighbors[i].node_id -16);
|
||||
}
|
||||
printf(" Timeout: %u, forwarded: %d\n",(uint32_t) (((int64_t) etr.second.timeout) - ((int64_t) getTime())),etr.second.forwarded);
|
||||
}
|
||||
printf("Total: %lu\n",LSPDB.size());
|
||||
}
|
||||
|
||||
/*
|
||||
* broadcast all Packages, that weren't broadcastet and whose timeout is expired
|
||||
*/
|
||||
int32_t FishEyeStateRoutingModule::runOnce(){
|
||||
if(((int64_t) getTime()) > ((int64_t) nextLSPPckg)){
|
||||
sendInitialLSP();
|
||||
}
|
||||
//printLSPDB();
|
||||
|
||||
auto it = LSPDB.begin();
|
||||
uint32_t min = UINT32_MAX;
|
||||
while (it != LSPDB.end()) //iterate over every Entry
|
||||
{
|
||||
if(((((int64_t) getTime())-((int64_t) it->second.timeout)) >= 0) && (!(it->second.forwarded))){ //Timeout expired?
|
||||
meshtastic_MeshPacket *p = allocDataProtobuf(it->second.LSP);
|
||||
p->to = NODENUM_BROADCAST;
|
||||
p->decoded.want_response = false;
|
||||
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
|
||||
p->decoded.portnum = meshtastic_PortNum_FISHEYESTATEROUTING_APP;
|
||||
service->sendToMesh(p,RX_SRC_LOCAL,true);
|
||||
it->second.forwarded = true;
|
||||
char * logout = "";
|
||||
sprintf(logout,"Forwarded LSP-Package of Node %u", it->second.LSP.node_id);
|
||||
LOG_DEBUG(logout);
|
||||
|
||||
}else if((getTime() < it->second.timeout) && (!(it->second.forwarded)) && (it->second.timeout < min)){
|
||||
min = it->second.timeout;
|
||||
}
|
||||
++it;
|
||||
|
||||
}
|
||||
|
||||
if ((min != UINT32_MAX) && ((((int64_t) min) - ((int64_t) getTime())) < 300000)){
|
||||
return ((int32_t) (((int64_t) min) - ((int64_t) getTime()))) * 1000; // We need seconds here
|
||||
}
|
||||
return{300000};
|
||||
}
|
||||
|
||||
bool FishEyeStateRoutingModule::setOwnNeighborhood(meshtastic_NeighborInfo Ninfo){
|
||||
bool diff = false;
|
||||
for(int i = 0; i<min((uint32_t) Ninfo.neighbors_count,(uint32_t) neighborhood.size()); i++){
|
||||
if(neighborhood[i].node_id != Ninfo.neighbors[i].node_id){diff = true;}
|
||||
}
|
||||
if(Ninfo.neighbors_count != neighborhood.size()){diff = true;}
|
||||
neighborhood.clear();
|
||||
for(int i = 0; i< Ninfo.neighbors_count; i++){
|
||||
neighborhood.push_back(Ninfo.neighbors[i]);
|
||||
}
|
||||
if(diff && moduleConfig.fish_eye_state_routing.enabled){
|
||||
calcNextHop();
|
||||
}
|
||||
return diff;
|
||||
}
|
||||
|
||||
bool FishEyeStateRoutingModule::setOwnNeighborhood(std::vector<meshtastic_Neighbor> n){
|
||||
bool diff = false;
|
||||
for(int i = 0; i<min((uint32_t) n.size(), (uint32_t) neighborhood.size()); i++){
|
||||
if(neighborhood[i].node_id != n[i].node_id){diff = true;}
|
||||
}
|
||||
if(n.size() != neighborhood.size()){diff = true;}
|
||||
neighborhood.clear();
|
||||
for(int i = 0; i< n.size(); i++){
|
||||
neighborhood.push_back(n[i]);
|
||||
}
|
||||
if(diff && moduleConfig.fish_eye_state_routing.enabled){
|
||||
calcNextHop();
|
||||
}
|
||||
return diff;
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculates the Next-Hops
|
||||
*/
|
||||
bool FishEyeStateRoutingModule::calcNextHop(){
|
||||
|
||||
struct nodeIDwithPrev{
|
||||
uint32_t nodeID;
|
||||
uint32_t prev;
|
||||
};
|
||||
|
||||
uint32_t ownID = (uint32_t) nodeDB->getNodeNum();
|
||||
std::queue<nodeIDwithPrev> waitingqueue; //unprocessed Nodes
|
||||
std::set<uint32_t> alreadyProcessed;
|
||||
for(auto nbr : neighborhood){ //add our neighborhood
|
||||
nodeIDwithPrev entry;
|
||||
entry.nodeID = nbr.node_id;
|
||||
entry.prev = ownID;
|
||||
waitingqueue.push(entry);
|
||||
}
|
||||
alreadyProcessed.insert(ownID);
|
||||
|
||||
|
||||
while(waitingqueue.size() != 0){
|
||||
|
||||
nodeIDwithPrev n = waitingqueue.front();
|
||||
if(alreadyProcessed.find(n.nodeID) == alreadyProcessed.end()){
|
||||
uint32_t nextHopForN; //calculate NextHop
|
||||
if(n.prev == ownID){
|
||||
nextHopForN = n.nodeID;
|
||||
}else{
|
||||
auto it = NextHopTable.find(n.prev);
|
||||
if(it == NextHopTable.end()){
|
||||
nextHopForN = NODENUM_BROADCAST;
|
||||
}else{
|
||||
nextHopForN = it->second;
|
||||
}
|
||||
}
|
||||
alreadyProcessed.insert(n.nodeID); //Node we just Handeled ist now Porcessed
|
||||
|
||||
if(NextHopTable.find(n.nodeID) == NextHopTable.end()){ //insert NextHop in Storage
|
||||
NextHopTable.insert(std::make_pair(n.nodeID,nextHopForN));
|
||||
}else{
|
||||
NextHopTable.find(n.nodeID)->second = nextHopForN;
|
||||
}
|
||||
|
||||
|
||||
auto it = LSPDB.find(n.nodeID); //discover new Nodes and push them in waitingqueue, if we haven't processed them yet (e.g. they aren't in the alreadyProcessed-Set)
|
||||
if(it != LSPDB.end()){
|
||||
for(int i = 0; i < (it->second.LSP.neighbors_count); i++){
|
||||
if(alreadyProcessed.find(it->second.LSP.neighbors[i].node_id) == alreadyProcessed.end()){
|
||||
nodeIDwithPrev entry;
|
||||
entry.nodeID = it->second.LSP.neighbors[i].node_id;
|
||||
entry.prev = n.nodeID;
|
||||
waitingqueue.push(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
waitingqueue.pop();
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
#pragma once
|
||||
#include "ProtobufModule.h"
|
||||
#include <unordered_map>
|
||||
#include <functional>
|
||||
|
||||
/*
|
||||
* FishEyeStateRouting Module, for Routing in the Mesh
|
||||
*/
|
||||
class FishEyeStateRoutingModule : public ProtobufModule<meshtastic_FishEyeStateRouting>, private concurrency::OSThread
|
||||
{
|
||||
public:
|
||||
/*
|
||||
* Expose the constructor
|
||||
*/
|
||||
FishEyeStateRoutingModule();
|
||||
|
||||
/*
|
||||
* Get Next-Hop for Package to dest
|
||||
*/
|
||||
uint32_t getNextHopForID(uint32_t dest);
|
||||
|
||||
/*
|
||||
* To set own Neighborhood
|
||||
*/
|
||||
bool setOwnNeighborhood(meshtastic_NeighborInfo Ninfo);
|
||||
bool setOwnNeighborhood(std::vector<meshtastic_Neighbor> n);
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
/*
|
||||
* Called to handle an incomming LSP-Package, adds it to it's collection
|
||||
* and calculates an offset for it
|
||||
*/
|
||||
virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_FishEyeStateRouting *lsp) override;
|
||||
|
||||
/*
|
||||
* Check whether we have to forward an LSP-Package an does so if necessary
|
||||
*/
|
||||
int32_t runOnce() override;
|
||||
|
||||
private:
|
||||
|
||||
float alpha = 1.4; // Factor that determines the strenght of blurring towards outer nodes
|
||||
uint32_t nextLSPPckg = 0;
|
||||
std::vector<meshtastic_Neighbor> neighborhood; // own Neighborhood as Basis for NextHop Calculation
|
||||
std::unordered_map<uint32_t,uint32_t> NextHopTable; // saves for every reachable known Node the optimal (SSSP) NextHop
|
||||
|
||||
struct LSPDBEntry{ // Structure which describes the Structure of an Entry of the LSP-Database
|
||||
uint32_t timeout;
|
||||
bool forwarded;
|
||||
meshtastic_FishEyeStateRouting LSP;
|
||||
};
|
||||
|
||||
/*
|
||||
* Comparing two LSP-Structs
|
||||
*/
|
||||
bool isequal(const meshtastic_FishEyeStateRouting &s1, const meshtastic_FishEyeStateRouting &s2);
|
||||
|
||||
/*
|
||||
* Database for the received LSP-Packages and their Next-Hop
|
||||
*/
|
||||
std::unordered_map<uint32_t,LSPDBEntry> LSPDB;
|
||||
|
||||
/*
|
||||
* Calculate nextHop and distance from this node all other nodes an updates Next-Hop tabel
|
||||
*/
|
||||
bool calcNextHop();
|
||||
|
||||
/*
|
||||
* Send own NeighborInfo to 0-Hop Neighborhood
|
||||
*/
|
||||
void sendInitialLSP();
|
||||
|
||||
/*
|
||||
* prints the Contents of the LSP-Database
|
||||
*/
|
||||
void printLSPDB();
|
||||
|
||||
};
|
||||
extern FishEyeStateRoutingModule *fishEyeStateRoutingModule;
|
|
@ -30,6 +30,9 @@
|
|||
#if !MESHTASTIC_EXCLUDE_NODEINFO
|
||||
#include "modules/NodeInfoModule.h"
|
||||
#endif
|
||||
#if !MESHTASTIC_EXCLUDE_FISHEYESTATEROUTING
|
||||
#include "modules/FishEyeStateRoutingModule.h"
|
||||
#endif
|
||||
#if !MESHTASTIC_EXCLUDE_GPS
|
||||
#include "modules/PositionModule.h"
|
||||
#endif
|
||||
|
@ -107,6 +110,9 @@ void setupModules()
|
|||
#if !MESHTASTIC_EXCLUDE_NODEINFO
|
||||
nodeInfoModule = new NodeInfoModule();
|
||||
#endif
|
||||
#if !MESHTASTIC_EXCLUDE_FISHEYESTATEROUTING
|
||||
fishEyeStateRoutingModule = new FishEyeStateRoutingModule();
|
||||
#endif
|
||||
#if !MESHTASTIC_EXCLUDE_GPS
|
||||
positionModule = new PositionModule();
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "NodeDB.h"
|
||||
#include "RTC.h"
|
||||
#include <Throttle.h>
|
||||
#include "FishEyeStateRoutingModule.h"
|
||||
|
||||
NeighborInfoModule *neighborInfoModule;
|
||||
|
||||
|
@ -77,6 +78,9 @@ uint32_t NeighborInfoModule::collectNeighborInfo(meshtastic_NeighborInfo *neighb
|
|||
}
|
||||
}
|
||||
printNodeDBNeighbors();
|
||||
if(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.fish_eye_state_routing.enabled){
|
||||
fishEyeStateRoutingModule->setOwnNeighborhood(*neighborInfo);
|
||||
}
|
||||
return neighborInfo->neighbors_count;
|
||||
}
|
||||
|
||||
|
@ -105,6 +109,7 @@ void NeighborInfoModule::sendNeighborInfo(NodeNum dest, bool wantReplies)
|
|||
{
|
||||
meshtastic_NeighborInfo neighborInfo = meshtastic_NeighborInfo_init_zero;
|
||||
collectNeighborInfo(&neighborInfo);
|
||||
neighborInfo.creation = getTime();
|
||||
meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo);
|
||||
// send regardless of whether or not we have neighbors in our DB,
|
||||
// because we want to get neighbors for the next cycle
|
||||
|
@ -213,5 +218,8 @@ meshtastic_Neighbor *NeighborInfoModule::getOrCreateNeighbor(NodeNum originalSen
|
|||
neighbors.erase(neighbors.begin());
|
||||
neighbors.push_back(new_nbr);
|
||||
}
|
||||
if(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.fish_eye_state_routing.enabled){
|
||||
fishEyeStateRoutingModule->setOwnNeighborhood(neighbors);
|
||||
}
|
||||
return &neighbors.back();
|
||||
}
|
Ładowanie…
Reference in New Issue