You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by potto216 December 14, 2022
When performing a driver check with Console, Alarm, etc .is_success() and .raw_values()
return correct values but I don't understand .to_result()'s meaning
The three methods are located in libtock-rs/apis/console/src/lib.rs
In the discussion this was determined to be a bug which I will submit a PR for. The details are:
Discussed in #441
Originally posted by potto216 December 14, 2022
When performing a driver check with Console, Alarm, etc
.is_success()
and.raw_values()
return correct values but I don't understand
.to_result()
's meaningThe three methods are located in
libtock-rs/apis/console/src/lib.rs
For example for Console
S::command(DRIVER_NUM, command::DRIVER_CHECK, 0, 0).is_success()
returns
true
and
S::command(DRIVER_NUM, command::DRIVER_CHECK, 0, 0).raw_values()
returns
ReturnVariant(128), r1 = 0, r2 = 0, r3 = 0
where
pub const SUCCESS: ReturnVariant = ReturnVariant(128);
But
S::command(DRIVER_NUM, command::DRIVER_CHECK, 0, 0).to_result()
returns
BADRVAL
Is this expected? I would think this is indicating an error.
The text was updated successfully, but these errors were encountered: