sxpert / PyATEM

Python ATEM mixer control library
19 stars 15 forks source link

Trying to catch values from a joystick on a blackMagic Atem #1

Open TheLLspectre opened 6 years ago

TheLLspectre commented 6 years ago

Hi ! I'm trying to catch values from the joystick on my ATEM, the only think i know is the signal passed by the CCdP method from but i need something like x Axis and y Axis from this joystick. So i need to know what values are inside this method. How I can do that with pyAtem ??

sxpert commented 6 years ago

no idea, haven't worked on this for ages ;-)

TheLLspectre commented 6 years ago

OK right ! So i'm going to try to find this by myself and i will tell you if i find something ;)

sxpert commented 6 years ago

do you wish to be added as a contributor ?

TheLLspectre commented 6 years ago

Not now ! just wait if i find something and it could be ok ;)

TheLLspectre commented 6 years ago

Ok ! so from the mraerino's pyATEM and like i said the joystick's signal passed through CCdP method. And thanks the variable "feature" i saw the feature number 128 from the Joystick. I tried to find something about this signal and i found this:

elif feature == 128: val = val_translated = struct.unpack('!h', data[16:18])[0] tab = tab_translated = struct.unpack('!h', data[18:20])[0] print(str(val) + " " + str(tab))

This print the value from joystick's axis, so X Axis is between -2048 and 2048, and it's the same for the Y Axis but i don't find the signal from the rotation on the "Z" Axis

sxpert commented 6 years ago

you can get more info on the protocol from here : http://skaarhoj.com/fileadmin/BMDPROTOCOL.html https://github.com/petersimonsson/libqatemcontrol

TheLLspectre commented 6 years ago

Yeah, but in the protocol there is nothing about an eventual joystick.

sxpert commented 6 years ago

ah, ok ;-) then it's some yet undocumented part of said protocol ;-)