Skip to content

Commit d18e905

Browse files
committed
Set the debug level
1 parent 4289c66 commit d18e905

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

deploy/dev/PiGPIO/src/pi.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,11 @@ function hardware_PWM(self::Pi, gpio, PWMfreq, PWMduty)
10861086
self.sl, _PI_CMD_HP, gpio, PWMfreq, 4, extents))
10871087
end
10881088

1089+
function set_internals(self::Pi, dbgLevel, alertFreq)
1090+
return _u2i(_pigpio_command_ext(
1091+
self.sl, _PI_CMD_CSI, gpio, PWMfreq, dbgLevel | alertFreq, 0))
1092+
end
1093+
10891094
"""
10901095
PiGPIO.get_current_tick(self::Pi)
10911096
@@ -1374,7 +1379,6 @@ function Pi(; host = get(ENV, "PIGPIO_ADDR", ""), port = get(ENV, "PIGPIO_PORT",
13741379
end
13751380
end
13761381

1377-
13781382
"""
13791383
PiGPIO.stop(self::Pi)
13801384

deploy/src/main.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ function (@main)(args)::Cint
7272
println(Core.stdout, "hello world!")
7373
p = Pi()
7474
println(Core.stdout, "pi startup done")
75+
PiGPIO.set_internals(p, 8)
76+
println(Core.stdout, "set debug level")
7577
handle_err(PiGPIO.hardware_PWM(p, PWMA_LEFT, 1000, 0))
7678
handle_err(PiGPIO.hardware_PWM(p, PWMB_RIGHT, 1000, 0)) # use 1kHz pwm for the motor drivers
7779
println(Core.stdout, "pwm startup done")

0 commit comments

Comments
 (0)