Hi,
Yes, my Pico is being recognised as a HID device.
In case anybody in the future reads this:
I've just tried an experiment that seems to work quite well.
I open my HID device (please ignore the ID's they aren't official - just for my testing) and can watch for data coming in
handle, rd, rdf, wr, initreport = com.openhid(0xcafe, 0x4004)
event.com(handle, 100, 0, "test_com")
I then use a lua struct library (not sure I actually need to do this) and call one of two functions (taken and modified from the Linda aerosoft a320 code) depending on the sign of the delta
function test_com(hand, datastr, len)
local a,b,c,d,e,f,g,h,i,j,k,l, delta = struct.unpack('bbbbbbbbbbbbb', datastr)
if delta > 0 then
AB_HDG_plus(delta)
end
if delta < 0 then
AB_HDG_minus(-delta)
end
end
This works reasonably well in that the heading changes quite quickly to my rotation of the encoder with very little lag.
I like this solution as it requires fewer bits of code to maintain.
cheers
Mark