mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-18 07:47:32 +00:00
Add support for setting API port from the config file (#8435)
* Add support for setting API port from the config file * Update PortduinoGlue.cpp Fix typo in var identifier --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -175,6 +175,7 @@ extern struct portduino_config_struct {
|
||||
std::string mac_address = "";
|
||||
bool mac_address_explicit = false;
|
||||
std::string mac_address_source = "";
|
||||
int api_port = -1;
|
||||
std::string config_directory = "";
|
||||
std::string available_directory = "/etc/meshtasticd/available.d/";
|
||||
int maxtophone = 100;
|
||||
@@ -508,6 +509,8 @@ extern struct portduino_config_struct {
|
||||
out << YAML::Key << "General" << YAML::Value << YAML::BeginMap;
|
||||
if (config_directory != "")
|
||||
out << YAML::Key << "ConfigDirectory" << YAML::Value << config_directory;
|
||||
if (api_port != -1)
|
||||
out << YAML::Key << "TCPPort" << YAML::Value << api_port;
|
||||
if (mac_address_explicit)
|
||||
out << YAML::Key << "MACAddress" << YAML::Value << mac_address;
|
||||
if (mac_address_source != "")
|
||||
@@ -519,4 +522,4 @@ extern struct portduino_config_struct {
|
||||
out << YAML::EndMap; // General
|
||||
return out.c_str();
|
||||
}
|
||||
} portduino_config;
|
||||
} portduino_config;
|
||||
|
||||
Reference in New Issue
Block a user