Skip to content

Commit

Permalink
fix(radio): SF/GF pre #3601 not converted correctly (#4498)
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz authored Jan 4, 2024
1 parent 5bed089 commit 2d877d4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions radio/src/storage/yaml/yaml_datastructs_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1600,6 +1600,10 @@ static void r_customFn(void* user, uint8_t* data, uint32_t bitoffs,
break;
}

// Set 'enabled' to handle old format YAML files
// Will be updated if enabled flag is actually present
CFN_ACTIVE(cfn) = 1;

if (eat_comma) {
val += l_sep;
val_len -= l_sep;
Expand All @@ -1615,11 +1619,9 @@ static void r_customFn(void* user, uint8_t* data, uint32_t bitoffs,
if (HAS_REPEAT_PARAM(func)) {
// Check for 2 values to be parsed
uint8_t l_sep = find_sep(val, val_len);
if (!l_sep) {
if (l_sep == val_len) {
// only one more value - assume it is repeat
read_enable_flag = false;
// Set 'enabled'
CFN_ACTIVE(cfn) = 1;
}
}

Expand Down

0 comments on commit 2d877d4

Please sign in to comment.