fix(telemetry): set warning/critical to default values before reading YAML (#2643)

Otherwise, these values will be 0 if either the old or the new tags are not present, which is the case when coming from 2.7.
This commit is contained in:
Raphael Coeffic
2022-10-31 10:38:15 +10:00
committed by GitHub
parent e626a4e911
commit 6ea408230c
2 changed files with 10 additions and 0 deletions
+3
View File
@@ -381,6 +381,9 @@ const char * readModelYaml(const char * filename, uint8_t * buffer, uint32_t siz
// md->swashR.collectiveWeight = 100;
// md->swashR.aileronWeight = 100;
// md->swashR.elevatorWeight = 100;
md->rfAlarms.warning = 45;
md->rfAlarms.critical = 42;
}
return readYamlFile(path, YamlTreeWalker::get_parser_calls(), &tree, NULL);