diff --git a/.readthedocs.yml b/.readthedocs.yml index ab074b53..82e829e8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,9 +10,18 @@ sphinx: configuration: docs/source/conf.py # Optionally set the version of Python and requirements required to build your docs +build: + os: ubuntu-22.04 + tools: + python: "3.9" + +sphinx: + builder: html + configuration: docs/source/conf.py + fail_on_warning: true + python: - version: "3.8" - install: - - method: setuptools - path: . - - requirements: requirements.txt + install: + - requirements: requirements.txt + - method: pip + path: . diff --git a/docs/source/conf.py b/docs/source/conf.py index 0f489978..8a2343fe 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -209,4 +209,4 @@ # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/source/tutorials/gettingstarted.rst b/docs/source/tutorials/gettingstarted.rst index bf552b43..1f98a26d 100644 --- a/docs/source/tutorials/gettingstarted.rst +++ b/docs/source/tutorials/gettingstarted.rst @@ -346,8 +346,7 @@ previous sections: gen = crappy.blocks.Generator([ {'type': 'constant', 'value': 1000, 'condition': 'delay=3'}, - {'type': 'ramp', 'speed': 100, 'condition': 'delay=5', - 'cmd': 0}, + {'type': 'ramp', 'speed': 100, 'condition': 'delay=5'}, {'type': 'constant', 'value': 1800, 'condition': 'delay=3'}, {'type': 'constant', 'value': 500, 'condition': 'delay=3'}, {'type': 'sine', 'amplitude': 2000, 'offset': 1000, 'freq': .3, @@ -370,7 +369,7 @@ previous sections: kd=0.05, out_max=10, out_min=-10, - i_limit=0.5, + i_limit=(-5, 5), target_label='command_speed', labels=['t(s)', 'voltage'], input_label='actual_speed') @@ -389,7 +388,7 @@ outputted by the PID block. Finally the grapher needs to know the current speed and the command speed, just like the PID. So let's add the appropriate links : .. code-block:: python - :emphasize-lines: 37-45 + :emphasize-lines: 36-44 import crappy @@ -397,8 +396,7 @@ and the command speed, just like the PID. So let's add the appropriate links : gen = crappy.blocks.Generator([ {'type': 'constant', 'value': 1000, 'condition': 'delay=3'}, - {'type': 'ramp', 'speed': 100, 'condition': 'delay=5', - 'cmd': 0}, + {'type': 'ramp', 'speed': 100, 'condition': 'delay=5'}, {'type': 'constant', 'value': 1800, 'condition': 'delay=3'}, {'type': 'constant', 'value': 500, 'condition': 'delay=3'}, {'type': 'sine', 'amplitude': 2000, 'offset': 1000, 'freq': .3, @@ -422,7 +420,7 @@ and the command speed, just like the PID. So let's add the appropriate links : kd=0.05, out_max=10, out_min=-10, - i_limit=0.5, + i_limit=(-5, 5), target_label='command_speed', labels=['t(s)', 'voltage'], input_label='actual_speed')