fix(tasoller_v2): swap opbtn bits
This commit is contained in:
parent
ade1b8644d
commit
c35990b29d
@ -42,6 +42,7 @@ pub const OUTPUT_MEMORY_SIZE: usize = 240;
|
|||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn jvs_poll(input: &[u8]) -> (u8, u8) {
|
pub fn jvs_poll(input: &[u8]) -> (u8, u8) {
|
||||||
let opbtn = input[3] >> 6;
|
let opbtn = input[3] >> 6;
|
||||||
|
let opbtn = (opbtn & 1) << 1 | (opbtn & 2) >> 1;
|
||||||
let beams = input[3] & 63; // mask for last 6 bits
|
let beams = input[3] & 63; // mask for last 6 bits
|
||||||
|
|
||||||
(opbtn, beams)
|
(opbtn, beams)
|
||||||
|
Loading…
Reference in New Issue
Block a user