Skip to content

Commit db693cc

Browse files
committed
Fixes
1 parent 26ed60d commit db693cc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

deploy/src/icm42688.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,11 @@ end
426426
Read raw accelerometer values (X, Y, Z) as signed 16-bit integers.
427427
"""
428428
function read_accel_raw(imu::ICM42688)
429-
buf = @view imu.rx_buf[1:6]
430-
read_regs!(imu, ICM42688Registers.ACCEL_DATA_X1, buf)
431-
ax = parse_int16_be(buf[1], buf[2])
432-
ay = parse_int16_be(buf[3], buf[4])
433-
az = parse_int16_be(buf[5], buf[6])
429+
read_regs!(imu, ICM42688Registers.ACCEL_DATA_X1, 6)
430+
buf = imu.rx_buf
431+
ax = parse_int16_be(buf[2], buf[3])
432+
ay = parse_int16_be(buf[4], buf[5])
433+
az = parse_int16_be(buf[6], buf[7])
434434
return (ax, ay, az)
435435
end
436436

deploy/src/shift_driver.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ function shift_register_program(; ser_pin::Integer, clk_pin::Integer, rclk_pin::
1010
Label(:bitloop),
1111
Out(Pins(), 1; sideset=0),
1212
Jmp{:x_dec}(:bitloop; sideset=1),
13-
Set(Pins(), 1; sideset=0),
14-
Set(Pins(), 0; sideset=0),
13+
PIOLib.Set(Pins(), 1; sideset=0),
14+
PIOLib.Set(Pins(), 0; sideset=0),
1515
Wrap(),
1616
]; sideset_bits=1)
1717

@@ -29,7 +29,7 @@ function shift_register_program(; ser_pin::Integer, clk_pin::Integer, rclk_pin::
2929
end
3030

3131
function setup_shift_register!(sm::StateMachine, nbits::Integer)
32-
exec!(sm, Set(RegY(), nbits - 1))
32+
exec!(sm, PIOLib.Set(RegY(), nbits - 1))
3333
end
3434

3535
shift_out!(sm::StateMachine, data::UInt32) = put!(sm, data)

0 commit comments

Comments
 (0)