Adding/deleting a logConf results in double callbacks, bug?
Posted: Wed Feb 19, 2014 12:11 am
Hey guys, not sure if this is a bug or I missed something, but:
Im playing around with logging etc (designed a new tab to easier configure what should be a logged and at which frequency, etc) and somehow when I add/delete a logConfig the callbacks are called twice.
Some example output from the console with logging enabled:
After starting to log something:
Requested log delete
I thought it must have made a mistake somewhere in my code, but running the cfclient resulted in the following too (small out take):
So once again, it starts logging for each ID twice!
Not sure where to fix this. Any ideas?
This is what I was working on:

It saves configurations between sessions, monitors/sets the frequencies, and shows error messages in case something fails. When its finished one could wrap it in a tab and submit it to the repo. Its currently implemented as a QTreeWidget that takes a Crazyflie as a parameter. However In my application its the only source of logging (wanted to have that centralized) so it might need some work if being added to the cfclient (it doesnt scan for existing logs configs, but that should be easy enough to fix)
Cheers,
-Oliver
[using stock firmware / client]
Im playing around with logging etc (designed a new tab to easier configure what should be a logged and at which frequency, etc) and somehow when I add/delete a logConfig the callbacks are called twice.
Some example output from the console with logging enabled:
After starting to log something:
Code: Select all
INFO:cflib.crazyflie.log:Have successfully started logging for id=1
INFO:cflib.crazyflie.log:Have successfully started logging for id=1
Code: Select all
INFO:cflib.crazyflie.log:Have successfully deleted id=1
INFO:cflib.crazyflie.log:Have successfully deleted id=1
Code: Select all
NFO:cflib.crazyflie:Callback->Connection initialized[radio://0/1/2M]
INFO:cflib.crazyflie:We are connected[radio://0/1/2M], request connection setup
INFO:cflib.crazyflie:Callback->Connected to [radio://0/1/2M]
INFO:cflib.crazyflie.toc:TOC for port [5] found in cache
INFO:cflib.crazyflie:Log TOC finished updating
INFO:cflib.crazyflie.toc:TOC for port [2] found in cache
INFO:cflib.crazyflie:Param TOC finished updating
INFO:cflib.crazyflie:Callback->Connection setup finished [radio://0/1/2M]
INFO:cfclient.utils.logconfigreader:Parsing [stabilizer.json]
INFO:cflib.crazyflie.log:Have successfully started logging for id=1
INFO:cflib.crazyflie.log:Have successfully started logging for id=3
INFO:cflib.crazyflie.log:Have successfully started logging for id=4
INFO:cflib.crazyflie.log:Have successfully started logging for id=5
INFO:cflib.crazyflie.log:Have successfully started logging for id=1
INFO:cflib.crazyflie.log:Have successfully started logging for id=3
INFO:cflib.crazyflie.log:Have successfully started logging for id=4
INFO:cflib.crazyflie.log:Have successfully started logging for id=5
Not sure where to fix this. Any ideas?
This is what I was working on:

It saves configurations between sessions, monitors/sets the frequencies, and shows error messages in case something fails. When its finished one could wrap it in a tab and submit it to the repo. Its currently implemented as a QTreeWidget that takes a Crazyflie as a parameter. However In my application its the only source of logging (wanted to have that centralized) so it might need some work if being added to the cfclient (it doesnt scan for existing logs configs, but that should be easy enough to fix)
Cheers,
-Oliver
[using stock firmware / client]