mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-15 17:42:12 +00:00
Add phoneapi plumbing. Need to regen protos on my other machine
This commit is contained in:
parent
1a28225cd5
commit
049c587ca2
@ -1 +1 @@
|
|||||||
Subproject commit 7bf13761bbeebd6cfe0604d851cbce818655999d
|
Subproject commit 0d5b0942fe4a462e3c3c1b214fd4e41c588c9c44
|
@ -249,6 +249,9 @@ void NodeDB::installDefaultModuleConfig()
|
|||||||
strncpy(moduleConfig.mqtt.username, default_mqtt_username, sizeof(moduleConfig.mqtt.username));
|
strncpy(moduleConfig.mqtt.username, default_mqtt_username, sizeof(moduleConfig.mqtt.username));
|
||||||
strncpy(moduleConfig.mqtt.password, default_mqtt_password, sizeof(moduleConfig.mqtt.password));
|
strncpy(moduleConfig.mqtt.password, default_mqtt_password, sizeof(moduleConfig.mqtt.password));
|
||||||
|
|
||||||
|
moduleConfig.has_neighbor_info = true;
|
||||||
|
moduleConfig.neighbor_info.enabled = false;
|
||||||
|
|
||||||
initModuleConfigIntervals();
|
initModuleConfigIntervals();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,6 +275,7 @@ void NodeDB::initModuleConfigIntervals()
|
|||||||
moduleConfig.telemetry.device_update_interval = default_broadcast_interval_secs;
|
moduleConfig.telemetry.device_update_interval = default_broadcast_interval_secs;
|
||||||
moduleConfig.telemetry.environment_update_interval = default_broadcast_interval_secs;
|
moduleConfig.telemetry.environment_update_interval = default_broadcast_interval_secs;
|
||||||
moduleConfig.telemetry.air_quality_interval = default_broadcast_interval_secs;
|
moduleConfig.telemetry.air_quality_interval = default_broadcast_interval_secs;
|
||||||
|
moduleConfig.neighbor_info.update_interval = default_broadcast_interval_secs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeDB::installDefaultChannels()
|
void NodeDB::installDefaultChannels()
|
||||||
|
@ -279,6 +279,10 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.remote_hardware = moduleConfig.remote_hardware;
|
fromRadioScratch.moduleConfig.payload_variant.remote_hardware = moduleConfig.remote_hardware;
|
||||||
break;
|
break;
|
||||||
|
case meshtastic_ModuleConfig_neighbor_info_tag:
|
||||||
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;
|
||||||
|
fromRadioScratch.moduleConfig.payload_variant.neighbor_info = moduleConfig.neighbor_info;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unknown module config type %d\n", config_state);
|
LOG_ERROR("Unknown module config type %d\n", config_state);
|
||||||
}
|
}
|
||||||
|
@ -508,6 +508,11 @@ void AdminModule::handleGetModuleConfig(const meshtastic_MeshPacket &req, const
|
|||||||
res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;
|
res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;
|
||||||
res.get_module_config_response.payload_variant.remote_hardware = moduleConfig.remote_hardware;
|
res.get_module_config_response.payload_variant.remote_hardware = moduleConfig.remote_hardware;
|
||||||
break;
|
break;
|
||||||
|
case meshtastic_AdminMessage_ModuleConfigType_NEIGHBORINFO_CONFIG:
|
||||||
|
LOG_INFO("Getting module config: Remote Hardware\n");
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: The phone app needs to know the ls_secsvalue so it can properly expect sleep behavior.
|
// NOTE: The phone app needs to know the ls_secsvalue so it can properly expect sleep behavior.
|
||||||
|
Loading…
Reference in New Issue
Block a user