I am running into issue on setting the analog mapping endpoint. Every time I give it a parameter it freezes and I can’t do anything until after a power cycle. I am using a potentiometer as the input analog signal and can read it properly with the get_adc_voltage(3) function.
Hm… that looks right. I’ll have to ask @Samuel to take a look, I’m not sure what’s wrong.
I think it’s a bug or something wrong with the analog_mapping function. When I swapped to using a rc controller and pwm_mapping it works fine. Now my workaround is going to be using an arduino to convert the analog signal into a digital one since I won’t be able to use the RC controller in the final project.
Not sure if this is related, but now I get this error.
It fails to dump the gpio4_pwm_mapping configurations and then when i try to set it to None it won’t let me do it.
KeyError is a known bug in PyFibre and I just pushed a fix to fw-v0.5.3.
As for the hang issue, I can’t reproduce this. Can you check if it still occurs with an erased configuration and without the liveplotter running? Here’s what I did:
In : odrv0.erase_configuration() Oh no odrv0 disappeared Reconnected to ODrive 20703595524B as odrv0 In : odrv0.config.gpio3_analog_mapping Out: endpoint: None (object_ref) max: 0.0 (float) min: 0.0 (float) In : odrv0.config.gpio3_analog_mapping.min = -1 In : odrv0.config.gpio3_analog_mapping.max = 1 In : odrv0.config.gpio3_analog_mapping Out: endpoint: None (object_ref) max: 1.0 (float) min: -1.0 (float) In : odrv0.config.gpio3_analog_mapping.endpoint = odrv0.axis0.controller._input_pos_property In : odrv0.config.gpio3_analog_mapping Out: endpoint: odrv0.axis0.controller._input_pos_property (object_ref) max: 1.0 (float) min: -1.0 (float)
This is with odrivetool v0.5.3.dev (
sudo pip3 install --pre --no-cache-dir --upgrade odrive).