File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959# built documents.
6060#
6161# The short X.Y version.
62- version = '1.1 '
62+ version = '1.0 '
6363# The full version, including alpha/beta/rc tags.
64- release = '1.1 '
64+ release = '1.0 '
6565
6666# The language for content autogenerated by Sphinx. Refer to documentation
6767# for a list of supported languages.
Original file line number Diff line number Diff line change @@ -86,10 +86,15 @@ These are the setter messages which are currently implemented.
8686.. autoclass :: pyvesc.SetRPM
8787.. autoclass :: pyvesc.SetCurrent
8888.. autoclass :: pyvesc.SetCurrentBrake
89+ .. autoclass :: pyvesc.SetPosition
90+ .. autoclass :: pyvesc.SetRotorPositionMode
8991
9092Getter Messages
9193^^^^^^^^^^^^^^^
92- These are the getter messages which are currently implemented.
94+ These are the getters that are currently implemented.
95+
96+ .. autoclass :: pyvesc.GetValues
97+ .. autoclass :: pyvesc.GetRotorPosition
9398
9499Implementing Additional Messages
95100^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change 1+ import sys
2+ if sys .version_info < (3 ,3 ):
3+ raise SystemExit ("Invalid Python version. PyVESC requires Python 3.3 or greater." )
4+
15from pyvesc .interface import *
26from pyvesc .messages import *
Original file line number Diff line number Diff line change 11from pyvesc .messages .base import VESCMessage
22
33class GetValues (metaclass = VESCMessage ):
4- """
5- Gets internal sensor data
4+ """ Gets internal sensor data
65 """
76 id = 4
87
@@ -30,10 +29,10 @@ class GetValues(metaclass=VESCMessage):
3029
3130
3231class GetRotorPosition (metaclass = VESCMessage ):
33- """
34- Gets rotor position data
35- Note: Must be set to DISP_POS_MODE_ENCODER or DISP_POS_MODE_PID_POS (Mode 3 or Mode 4)
36- This is set by SetRotorPositionMode (id=21)
32+ """ Gets rotor position data
33+
34+ Must be set to DISP_POS_MODE_ENCODER or DISP_POS_MODE_PID_POS (Mode 3 or
35+ Mode 4). This is set by SetRotorPositionMode (id=21).
3736 """
3837 id = 21
3938
Original file line number Diff line number Diff line change 44class SetDutyCycle (metaclass = VESCMessage ):
55 """ Set the duty cycle.
66
7- :ivar duty_cycle: Value of duty cycle to be set.
7+ :ivar duty_cycle: Value of duty cycle to be set (range [-1e5, 1e5]) .
88 """
99 id = 5
1010 fields = [
@@ -45,24 +45,25 @@ class SetCurrentBrake(metaclass=VESCMessage):
4545 ]
4646
4747class SetPosition (metaclass = VESCMessage ):
48- """
49- Set the rotor angle based off of an encoder or sensor
50- :ivar pos: Value to set the current position or angle to.
48+ """Set the rotor angle based off of an encoder or sensor
49+
50+ :ivar pos: Value to set the current position or angle to.
5151 """
5252 id = 9
5353 fields = [
5454 ('pos' , 'i' , 1000000 )
5555 ]
5656
5757class SetRotorPositionMode (metaclass = VESCMessage ):
58- """
59- Sets the rotor position feedback mode.
60- It is reccomended to use the defined modes as below
61- DISP_POS_OFF
62- DISP_POS_MODE_ENCODER
63- DISP_POS_MODE_PID_POS
64- DISP_POS_MODE_PID_POS_ERROR
65- :ivar pos_mode: Value of the mode
58+ """Sets the rotor position feedback mode.
59+
60+ It is reccomended to use the defined modes as below:
61+ * DISP_POS_OFF
62+ * DISP_POS_MODE_ENCODER
63+ * DISP_POS_MODE_PID_POS
64+ * DISP_POS_MODE_PID_POS_ERROR
65+
66+ :ivar pos_mode: Value of the mode
6667 """
6768
6869 DISP_POS_OFF = 0
Original file line number Diff line number Diff line change 11from setuptools import setup
22
3- VERSION = '1.0.3 '
3+ VERSION = '1.0.4 '
44
55setup (
66 name = 'pyvesc' ,
You can’t perform that action at this time.
0 commit comments