Skip to content

Commit 2ed2180

Browse files
committed
Add in some simple logging
1 parent a344549 commit 2ed2180

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

deploy/src/main.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ function (@main)(args)::Cint
172172
put!(timu.request, true) # trigger the IMU request
173173
wait_until(start + ml_update_rate_ns)
174174
imu_data = take!(timu.response)
175+
println(Core.stdout, "IMU response: $(imu_data.accel_x)")
175176
enc_1_cnts = reset!(tenc_1a)
176177
enc_2_cnts = reset!(tenc_2a)
177178
command = BalanceController.balance_car!(ctrl, enc_1_cnts, enc_2_cnts,
@@ -180,9 +181,11 @@ function (@main)(args)::Cint
180181
start = time_ns()
181182
if isnothing(command)
182183
car_stop!(hw)
184+
println(Core.stdout, "motors stopped!")
183185
else
184186
left, right = command
185187
apply_motor_output!(hw, left, right)
188+
println(Core.stdout, "motors run!")
186189
end
187190
end
188191
catch e

0 commit comments

Comments
 (0)