- add RemoteHardware (and the missing S&F config) in

- make the config boundaries automatic
This commit is contained in:
Thomas Göttgens
2022-12-29 21:35:32 +01:00
parent f73b8661de
commit 45e6e86ff9
2 changed files with 23 additions and 5 deletions

View File

@@ -323,8 +323,13 @@ void AdminModule::handleSetModuleConfig(const ModuleConfig &c)
moduleConfig.has_audio = true;
moduleConfig.audio = c.payload_variant.audio;
break;
case ModuleConfig_remote_hardware_tag:
DEBUG_MSG("Setting module config: Remote Hardware\n");
moduleConfig.has_remote_hardware = true;
moduleConfig.remote_hardware = c.payload_variant.remote_hardware;
break;
}
saveChanges(SEGMENT_MODULECONFIG);
}
@@ -453,6 +458,11 @@ void AdminModule::handleGetModuleConfig(const MeshPacket &req, const uint32_t co
res.get_module_config_response.which_payload_variant = ModuleConfig_audio_tag;
res.get_module_config_response.payload_variant.audio = moduleConfig.audio;
break;
case AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG:
DEBUG_MSG("Getting module config: Remote Hardware\n");
res.get_module_config_response.which_payload_variant = ModuleConfig_remote_hardware_tag;
res.get_module_config_response.payload_variant.remote_hardware = moduleConfig.remote_hardware;
break;
}
// NOTE: The phone app needs to know the ls_secsvalue so it can properly expect sleep behavior.