mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-31 07:01:03 +00:00
Add count handling to SFPP
This commit is contained in:
@@ -790,6 +790,7 @@ bool loadConfig(const char *configPath)
|
||||
|
||||
if (yamlConfig["StoreAndForward"]) {
|
||||
portduino_config.sfpp_stratum0 = (yamlConfig["StoreAndForward"]["Stratum0"]).as<bool>(false);
|
||||
portduino_config.initial_sync = (yamlConfig["StoreAndForward"]["InitialSync"]).as<int>(10);
|
||||
}
|
||||
|
||||
if (yamlConfig["General"]) {
|
||||
|
||||
@@ -171,6 +171,7 @@ extern struct portduino_config_struct {
|
||||
|
||||
// Store and Forward++
|
||||
bool sfpp_stratum0 = false;
|
||||
int initial_sync = 10;
|
||||
|
||||
// General
|
||||
std::string mac_address = "";
|
||||
@@ -492,9 +493,11 @@ extern struct portduino_config_struct {
|
||||
}
|
||||
|
||||
// StoreAndForward
|
||||
if (sfpp_stratum0) {
|
||||
if (sfpp_stratum0 || initial_sync != 10) {
|
||||
out << YAML::Key << "StoreAndForward" << YAML::Value << YAML::BeginMap;
|
||||
out << YAML::Key << "Stratum0" << YAML::Value << true;
|
||||
|
||||
out << YAML::Key << "Stratum0" << YAML::Value << sfpp_stratum0;
|
||||
out << YAML::Key << "InitialSync" << YAML::Value << initial_sync;
|
||||
out << YAML::EndMap; // StoreAndForward
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user