drivers: lora: shell: fix invalid range in config bw param
'bw' parameter in 'lora config' command has a range of 0 to INT8_MAX. However possible values of 'bw' (125, 250, 500) don't fit this range and we need to extend it to 0 to INT16_MAX. This fix has been tested on custom board with STM32L4 and SX1276. Signed-off-by: Petr Sharshavin <sharshavin@mail.ru>
This commit is contained in:
parent
8959b838bf
commit
2489416ec2
|
@ -161,7 +161,7 @@ static int lora_conf_set(const struct shell *sh, const char *param,
|
|||
modem_config.tx_power = lval;
|
||||
} else if (!strcmp("bw", param)) {
|
||||
if (parse_long_range(&lval, sh, value,
|
||||
"bw", 0, INT8_MAX) < 0) {
|
||||
"bw", 0, INT16_MAX) < 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
switch (lval) {
|
||||
|
|
Loading…
Reference in a new issue