Skip to content

Commit

Permalink
Merge pull request #94 from robotpy/more-api
Browse files Browse the repository at this point in the history
Add additional getters
  • Loading branch information
virtuald committed Jan 14, 2019
2 parents be29d52 + 51202a2 commit 390f556
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions gen/MotController_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -964,15 +964,29 @@ c_MotController_SelectProfileSlot:
:param pidIdx:
0 for Primary closed-loop. 1 for auxiliary closed-loop.
c_MotController_GetActiveTrajectoryPosition:
ignore: true
c_MotController_GetActiveTrajectoryPosition_3:
rename: getActiveTrajectoryPosition
defaults:
pidIdx: 0
doc: |
Gets the active trajectory target position using
MotionMagic/MotionProfile control modes.
:param pidIdx: 0 for Primary closed-loop. 1 for auxiliary closed-loop.
:returns: The Active Trajectory Position in sensor units.
c_MotController_GetActiveTrajectoryVelocity:
ignore: true
c_MotController_GetActiveTrajectoryVelocity_3:
rename: getActiveTrajectoryVelocity
defaults:
pidIdx: 0
doc: |
Gets the active trajectory target velocity using
MotionMagic/MotionProfile control modes.
:param pidIdx: 0 for Primary closed-loop. 1 for auxiliary closed-loop.
:returns: The Active Trajectory Velocity in sensor units per 100ms.
c_MotController_GetActiveTrajectoryHeading:
Expand All @@ -981,7 +995,31 @@ c_MotController_GetActiveTrajectoryHeading:
MotionMagicArc/MotionProfileArc control modes.
:returns: The Active Trajectory Heading in degreees.
c_MotController_GetActiveTrajectoryArbFeedFwd:
ignore: true
c_MotController_GetActiveTrajectoryArbFeedFwd_3:
rename: getActiveTrajectoryArbFeedFwd
defaults:
pidIdx: 0
doc: |
Gets the active trajectory arbitrary feedforward for pid0 using
MotionMagic/MotionProfile control modes.
:param pidIdx: 0 for Primary closed-loop. 1 for auxiliary closed-loop.
:returns: The Active Trajectory ArbFeedFwd in units of percent output (where 0.01 is 1%).
c_MotController_GetActiveTrajectoryAll:
ignore: true
c_MotController_GetActiveTrajectoryAll_5:
rename: getActiveTrajectoryAll
defaults:
pidIdx: 0
doc: |
Retrieve all active trajectory parameters
:param pidIdx: 0 for Primary closed-loop. 1 for auxiliary closed-loop.
:returns: (velocity, position, arbFeedFwd)
c_MotController_ConfigMotionCruiseVelocity:
set: motionmagic_cruise_velocity
doc: |
Expand Down
2 changes: 2 additions & 0 deletions gen/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ def function_hook(fn, data):
# Rename internal functions
if data.get("internal", False):
x_name = "_" + x_name
if data.get("rename", False):
x_name = data["rename"]

name = fn["name"]

Expand Down

0 comments on commit 390f556

Please sign in to comment.