I've been banging my head against the wall for the greater part of yesterday and this evening trying to understand this.
In cfheadless.py (line 92) there's a parameter update callback being added but I don't see that the callback function itself ever gets called.
Code: Select all
def connect_crazyflie(self, link_uri):
"""Connect to a Crazyflie on the given link uri"""
self._cf.connection_failed.add_callback(self._connection_failed)
self._cf.param.add_update_callback(group="imu_sensors", name="HMC5883L",
cb=(lambda name, found:
self._jr.setAltHoldAvailable(eval(found))))
Code: Select all
def add_update_callback(self, group, name=None, cb=None):
"""
Add a callback for a specific parameter name. This callback will be
executed when a new value is read from the Crazyflie.
"""
print "*** add_update_callback() name: {}".format(name)
Code: Select all
def setAltHoldAvailable(self, available):
print "*** setAltHoldAvailable() available: {}".format(available)
self._has_pressure_sensor = available

Are there any CF junkies out there that have a deeper understanding of the cfheadless and python client architecture that can point me in the right direction to figure out what's going on here?