PyATEM icon indicating copy to clipboard operation
PyATEM copied to clipboard

Trying to catch values from a joystick on a blackMagic Atem

Open TheLLspectre opened this issue 7 years ago • 8 comments

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 ??

TheLLspectre avatar Jun 04 '18 07:06 TheLLspectre

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

sxpert avatar Jun 04 '18 08:06 sxpert

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

TheLLspectre avatar Jun 04 '18 09:06 TheLLspectre

do you wish to be added as a contributor ?

sxpert avatar Jun 05 '18 06:06 sxpert

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

TheLLspectre avatar Jun 05 '18 07:06 TheLLspectre

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

TheLLspectre avatar Jun 07 '18 14:06 TheLLspectre

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

sxpert avatar Jun 07 '18 14:06 sxpert

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

TheLLspectre avatar Jun 07 '18 15:06 TheLLspectre

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

sxpert avatar Jun 09 '18 08:06 sxpert