Register key callbacks do not function

Firmware Version: 4.3.2 AND 3.2.0

Operation System: Win 10

uArm Controlling Method: Python
{‘device_type’: ‘SwiftPro’, ‘hardware_version’: ‘3.3.1’, ‘firmware_version’: ‘4.3.2’, ‘api_version’: ‘4.0.3’, ‘device_unique’: ‘redacted’}
AND
{‘device_type’: ‘SwiftPro’, ‘hardware_version’: ‘3.3.1’, ‘firmware_version’: ‘3.2.0’, ‘api_version’: ‘3.2.0’, ‘device_unique’: ‘redacted’}

These functions are called before connecting, I’ve also tried calling them after connecting but they do not work there either.

swift.register_key0_callback(callback=functools.partial(increase_servo, key='key0'))
swift.register_key1_callback(callback=functools.partial(decrease_servo, key='key0'))

These are the functions they call

def increase_servo(ret, key=None):
    print(ret)
    print(key)
    cur_angle = swift.get_servo_angle(servo_id=0)
    if cur_angle < 180:
        swift.set_wrist(angle=cur_angle + 1, wait=True)


def decrease_servo(ret, key=None):
    print(ret)
    print(key)
    cur_angle = swift.get_servo_angle(servo_id=0)
    if cur_angle < 180:
        swift.set_wrist(angle=cur_angle + 1, wait=True)

No output is produced indicating that the functions do not work.

On firmware 3.2.0 the learn and play functions get triggered by the button presses instead of my functions.
On firmware 4 the buttons do nothing at all.

Hi, yes, the firmware 4.x.x dose not support the buttons callback.

Yes, but it isn’t supported in the 3.2.0 firmware either apparantly.

Why document a feature that doesn’t work in any version of the software?

Hi, pelase check this example: