Skip to content

Commit

Permalink
Merge pull request betaflight#7282 from etracer65/cli_uint32_range_fix
Browse files Browse the repository at this point in the history
Fix CLI allowed range display for VAR_UINT32 type
  • Loading branch information
mikeller authored Dec 27, 2018
2 parents dfc0f34 + 9be4035 commit 3631e41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/interface/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,11 @@ static void cliPrintVarRange(const clivalue_t *var)
{
switch (var->type & VALUE_MODE_MASK) {
case (MODE_DIRECT): {
cliPrintLinef("Allowed range: %d - %d", var->config.minmax.min, var->config.minmax.max);
if ((var->type & VALUE_TYPE_MASK) == VAR_UINT32) {
cliPrintLinef("Allowed range: %d - %d", 0, var->config.u32_max);
} else {
cliPrintLinef("Allowed range: %d - %d", var->config.minmax.min, var->config.minmax.max);
}
}
break;
case (MODE_LOOKUP): {
Expand Down

0 comments on commit 3631e41

Please sign in to comment.