Fixed flight mode reading/writing

This commit is contained in:
Raphael Coeffic
2021-11-10 11:07:01 +01:00
parent b9b510e367
commit 7b6749ebee
2 changed files with 3 additions and 3 deletions
@@ -441,7 +441,7 @@ static bool w_swtchSrc(const YamlNode* node, uint32_t val, yaml_writer_func wf,
&& sval <= SWSRC_LAST_FLIGHT_MODE) {
wf(opaque, "FM", 2);
str = yaml_unsigned2str(sval - SWSRC_FIRST_FLIGHT_MODE + 1);
str = yaml_unsigned2str(sval - SWSRC_FIRST_FLIGHT_MODE);
return wf(opaque,str, strlen(str));
}
else if (sval >= SWSRC_FIRST_SENSOR