Open maiermic opened 5 years ago
Hello,
Apart from the setcmd command given in the examples here
https://pysimplebgc.readthedocs.io/en/latest/
I can't get any other result.
What I mean is, I can only make this command to work when the second argument is an empty string "".
device.setcmd(SOMETHING, "")
That means that I need to parse the result for each and every specific result I would need.
Isn't there any way to get a more specific result than getting each time the whole list of dictionaries ?
If someone has found how to use this more specifically, I would gladly hear how.
Thank you for your help
Best
@lweingart FYI, I started implementing my own library in this project. Here is a code snippet on how to use it:
class Gimbal:
# ...
def send_message(self, message: Message):
logger.debug(f'send message: {message}')
self._connection.write(pack_message(message))
# ...
def get_angles(self) -> GetAnglesInCmd:
self.send_message(create_message(CMD_GET_ANGLES))
cmd = read_cmd(self._connection)
assert cmd.id == CMD_GET_ANGLES
return parse_cmd(cmd)
Hey @maiermic, thank you very much for your link and for your work, I'll give it a try :-)
Cheers
There are no outgoing commands specified yet. How are they supposed to be specified?
All current commands have
cmdbodysize
of0
andcmdfmt
of''
. The propertycmdfmt
is never used. Further,setcmd
takescmddata
as a string or at least the default value is''
. What is the format of this string? Shouldn't that be a request object that should be specified similar torespfields
?