log and fly class
Posted: Wed Oct 07, 2020 2:19 pm
Hello,
In the questions I have asked in the previous post I made I received help in trying to log and fly at the same time. This works great!
I was able to make many drones fly at the same time and log their data.
But the next thing I was trying to do is to set up the code from:
https://www.bitcraze.io/documentation/r ... commander/
in a class.
But when I put everything in:
if __name__ == '__main__':
in a class __init__() part of a class
and all the function declarations as part of the class
I kept running into the issue that since those function are passed and not directly declared I could not get it to work.
I would have to add self. in front of the param_deck_flow for example
scf.cf.param.add_update_callback(group='deck', name='bcFlow2',
cb=self.param_deck_flow)
but that leads me to get the issue that the program says I need to pass the argument of the function
Would anyone know how to work around this?
Does my question make sense?
In the questions I have asked in the previous post I made I received help in trying to log and fly at the same time. This works great!
I was able to make many drones fly at the same time and log their data.
But the next thing I was trying to do is to set up the code from:
https://www.bitcraze.io/documentation/r ... commander/
in a class.
But when I put everything in:
if __name__ == '__main__':
in a class __init__() part of a class
and all the function declarations as part of the class
I kept running into the issue that since those function are passed and not directly declared I could not get it to work.
I would have to add self. in front of the param_deck_flow for example
scf.cf.param.add_update_callback(group='deck', name='bcFlow2',
cb=self.param_deck_flow)
but that leads me to get the issue that the program says I need to pass the argument of the function
Would anyone know how to work around this?
Does my question make sense?