Skip to content

Commit 6cd1255

Browse files
committed
updated doc. added check that python>=3.3.
1 parent dbe615a commit 6cd1255

6 files changed

Lines changed: 31 additions & 22 deletions

File tree

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
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.

docs/source/index.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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

9092
Getter 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

9499
Implementing Additional Messages
95100
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

pyvesc/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
import sys
2+
if sys.version_info < (3,3):
3+
raise SystemExit("Invalid Python version. PyVESC requires Python 3.3 or greater.")
4+
15
from pyvesc.interface import *
26
from pyvesc.messages import *

pyvesc/messages/getters.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from pyvesc.messages.base import VESCMessage
22

33
class 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

3231
class 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

pyvesc/messages/setters.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class 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

4747
class 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

5757
class 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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup
22

3-
VERSION = '1.0.3'
3+
VERSION = '1.0.4'
44

55
setup(
66
name = 'pyvesc',

0 commit comments

Comments
 (0)