Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use axis0.controller.input_pos #638

Merged
merged 1 commit into from
Nov 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update to use axis0.controller.input_pos
  • Loading branch information
madewhatnow authored Oct 31, 2021
commit 50562dd563d6b6f0598bf2313354603006ec0624
4 changes: 2 additions & 2 deletions tools/odrive_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
print("Bus voltage is " + str(my_drive.vbus_voltage) + "V")

# Or to change a value, just assign to the property
my_drive.axis0.controller.pos_setpoint = 3.14
my_drive.axis0.controller.input_pos = 3.14
print("Position setpoint is " + str(my_drive.axis0.controller.pos_setpoint))

# And this is how function calls are done:
Expand All @@ -38,7 +38,7 @@
while True:
setpoint = 4.0 * math.sin((time.monotonic() - t0)*2)
print("goto " + str(int(setpoint)))
my_drive.axis0.controller.pos_setpoint = setpoint
my_drive.axis0.controller.input_pos = setpoint
time.sleep(0.01)

# Some more things you can try:
Expand Down