mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2025-01-18 00:31:09 +00:00
protect against unsafe gain changes
This commit is contained in:
parent
adaf3a7837
commit
815a19210b
@ -240,7 +240,10 @@ void parse_command(T_VBVMR_INTERFACE *vmr, char *command)
|
||||
get(vmr, command, &res);
|
||||
if (res.type == FLOAT_T)
|
||||
{
|
||||
set_parameter_float(vmr, command, 1 - res.val.f);
|
||||
if (res.val.f == 1 || res.val.f == 0)
|
||||
set_parameter_float(vmr, command, 1 - res.val.f);
|
||||
else
|
||||
log_warn("%s does not appear to be a boolean parameter", command);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user