Skip to content

Commit 4e115ce

Browse files
use the same parsing of the return value as in the _pigpio_command (https://github.com/joan2937/pigpio/blob/c33738a320a3e28824af7807edafda440952c05d/pigpio.py#L1014)
1 parent 38d9a5b commit 4e115ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pi.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ function _pigpio_command_ext(sl, cmd, p1, p2, p3, extents, rl=true)
129129

130130
lock(sl.l)
131131
write(sl.s, ext)
132-
msg = reinterpret(Cuint, sl.s)[4]
132+
out = IOBuffer(Base.read(sl.s, _SOCK_CMD_LEN))
133+
res = reinterpret(Cuint, take!(out))[4]
133134
if rl
134135
unlock(sl.l)
135136
end

0 commit comments

Comments
 (0)