Skip to content

Commit 185c703

Browse files
committed
Update Sphinx documentation
1 parent 5a00f5a commit 185c703

File tree

16 files changed

+235
-261
lines changed

16 files changed

+235
-261
lines changed

Software/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ endif()
7979
# limit the frequency of log outputs—such as logging only every 100th iteration.
8080
# - Note that with UART logging enabled, PICO_DEFAULT_UART_TX_PIN and PICO_DEFAULT_UART_RX_PIN are disabled for decoder functions.
8181
# These pins are used for UART communication. Disabling is done automatically in RP2040-Decoder-board.h or RP2040-Decoder-board-legacy.h respectively.
82-
set(LOGLEVEL 1)
82+
set(LOGLEVEL 0)
8383
# Additionally, the LOG_WAIT parameter can be configured to make the controller wait for user input via stdio before continuing.
8484
# This is useful for ensuring that all stdio logging outputs are captured.
8585
# If disabled, there may not be enough time to connect the serial terminal before most of the logging has already been completed.
8686
set(LOG_WAIT 0)
8787
# Modify the below lines to enable/disable output over UART and/or USB
88-
set(STDIO_USB_ENABLED 1)
88+
set(STDIO_USB_ENABLED 0)
8989
set(STDIO_UART_ENABLED 0)
9090
# Leave those two unmodified
9191
pico_enable_stdio_uart(RP2040-Decoder ${STDIO_UART_ENABLED})

Software/CV.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ uint8_t CV_ARRAY_DEFAULT [CV_ARRAY_SIZE] = {
6262
0b00000000, //CV_44 -
6363
0b00000000, //CV_45 -
6464
0b00000000, //CV_46 -
65-
// TODO: Update controller CVs
65+
// TODO: Update controller CVs and implement/redefine k_ff in the speed controller initialization
6666
// Speed controller - Configuration /////////////////////////////////////////////////////////////////////////////////
6767
0b00110010, //CV_47 - Feed-forward gain k_ff = CV_47/10000 Default = 50 -> 0.005 //
6868
0b00001010, //CV_48 - PID Control low pass filter time constant (tau) in ms //
@@ -213,10 +213,10 @@ uint8_t CV_ARRAY_DEFAULT [CV_ARRAY_SIZE] = {
213213
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
214214
0b00000001, //CV_174 - Additional motor-PWM clock divider.
215215
0b00000111, //CV_175 - speed_helper timer delay - can be used to adjust accel/decel rate
216-
0b00000000, //CV_176 - Base-PWM forward bits 8-15
217-
0b00000000, //CV_177 - Base-PWM forward bits 0-7
218-
0b00000000, //CV_178 - Base-PWM reverse bits 15-8
219-
0b00000000, //CV_179 - Base-PWM reverse bits 0-7
216+
0b00000000, //CV_176 -
217+
0b00000000, //CV_177 -
218+
0b00000000, //CV_178 -
219+
0b00000000, //CV_179 -
220220
0b00000000, //CV_180 -
221221
0b00000000, //CV_181 -
222222
0b00000000, //CV_182 -

Software/core1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ float get_kp(const controller_parameter_t *const ctrl_par) {
147147
uint16_t get_initial_level(controller_parameter_t *const ctrl_par){
148148
uint32_t sum = 0;
149149
uint32_t i = 0;
150-
while (i < 16) {
150+
while (i < BASE_PWM_ARR_LEN) {
151151
if (ctrl_par->startup.base_pwm_arr[i] > 0) {
152152
sum += ctrl_par->startup.base_pwm_arr[i];
153153
i++;
@@ -177,7 +177,7 @@ void controller_startup_mode(controller_parameter_t *const ctrl_par) {
177177
// Save level value in array
178178
ctrl_par->startup.base_pwm_arr[ctrl_par->startup.base_pwm_arr_i] = ctrl_par->startup.level;
179179
// Update index
180-
ctrl_par->startup.base_pwm_arr_i = (ctrl_par->startup.base_pwm_arr_i+1)%16;
180+
ctrl_par->startup.base_pwm_arr_i = (ctrl_par->startup.base_pwm_arr_i+1)%BASE_PWM_ARR_LEN;
181181
// Set ramp_up_mode flag to true
182182
ctrl_par->mode = PID_MODE;
183183
// multiply with constant value of 0.9 and set as current feed forward value for pid mode

docs/sphinx/source/other/getting_started.rst renamed to docs/sphinx/source/gs/getting_started.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,26 @@ You can choose any PCB manufacturer you like. The PCB is designed to fit with JL
88

99
2. Production files?
1010
----------------------------------
11+
The latest release includes the production files for JLCPCB, which includes the Gerber files, BOM, and Pick and Place files. You can find the latest release `here <https://github.com/gab-k/RP2040-Decoder/releases>`_.
1112

12-
In order to export the production files (Gerber/BOM/Pick and Place), you need `KiCad <https://www.kicad.org/download/>`_ which is open source.
13+
In order to manually export the production files (Gerber/BOM/Pick and Place), you need `KiCad <https://www.kicad.org/download/>`_ which is open source.
1314
In case you are ordering from JLCPCB it is recommended to use the `Fabrication-Toolkit KiCad plugin by bennymeg <https://github.com/bennymeg/Fabrication-Toolkit>`_
1415

1516
.. _building_the_software:
1617

1718
3. Building the software
1819
----------------------------------
1920

20-
If you got a RP2040-Decoder with USB the easiest way to get the RP2040-Decoder up and running is to just use the precompiled .uf2 file and ignore the rest of this section.
21+
If you got a RP2040-Decoder with USB the easiest way to get the RP2040-Decoder up and running is to just use the precompiled .uf2 file in the latest `release <https://github.com/gab-k/RP2040-Decoder/releases>`_ and skip to :ref:`flashing_the_software`.
2122

2223
However sometimes you might want to build by yourself, be it for debugging or to make your own modifications to the source code.
2324
The easiest way to do this is to just use `Visual Studio Code <https://code.visualstudio.com/>`_ and the Raspberry Pi Pico extension.
2425
The `official documentation <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#vscode-extension>`_ of the Pi Pico does a great job of explaining this in detail.
2526

2627
Note: If you are building for Hardware Rev 0.3 or below change the board defintion in your CMakeLists.txt file to: "RP2040-Decoder-board-legacy.h"
2728

29+
.. _flashing_the_software:
30+
2831
4. Flashing the software
2932
----------------------------------
3033

@@ -43,15 +46,18 @@ For RP2040-Decoders without USB the only way of flashing the software is via SWD
4346
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4447
When first plugged in the RP2040 boots into Mass Storage Device mode. To flash the software, you need to drag the '.uf2' file onto the disk using any file explorer.
4548
This will write the file to the Flash and restart the RP2040.
46-
In case you want to repeat the flasing process, temporarily connect the solder bridge called JP1 on the back side of the board and power cycle the device.
49+
In case you want to repeat the flashing process, hold the button SW1 while re-plugging the decoder into your computer. The decoder should now show as a Mass Storage Device again.
4750
This procedure is also described in the `Raspberry Pi Pico Datasheet Chapter 4.1 <https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf#_programming_the_flash>`_
4851

52+
.. _flashing_the_software_swd:
53+
4954
4.2. Flashing the software via SWD
5055
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5156
Flashing via SWD is a little more complicated but also comes with great advantages in terms of debugging.
5257
The book on `Getting started with Raspberry Pi Pico-series <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf>`_ does a great job of explaining how debugging works.
53-
As already suggested in :ref:`3. <building_the_software>` it is recommended to use the `Visual Studio Code Extension <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#vscode-extension>`_.
54-
Most relevant in the book are `Chapter 4.3. Debug <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#_debug>`_ and `Appendix A: Debugprobe <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#debugprobe_section>`_
58+
As already suggested in :ref:`building_the_software` it is recommended to use the `Visual Studio Code Extension <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#vscode-extension>`_.
59+
The most relevant sections in the book are `Chapter 4.3. Debug <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#_debug>`_ and `Appendix A: Debugprobe <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#debugprobe_section>`_
60+
5561

5662
5. Wiring
5763
----------------------------------

docs/sphinx/source/hardware/rev_0_3/hw_description.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ Complete Schematic
110110

111111
Complete Schematic
112112

113-
BOM & Alternative Parts
114-
==============================
115-
please see **PLACEHOLDER-AUTOGENERATED-BOM** for the complete BOM.
116-
117113

118114
.. _wiring_rev_0_3:
119115

docs/sphinx/source/hardware/rev_1_0/hw_description.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ Complete Schematic
112112

113113
Complete Schematic
114114

115-
BOM & Alternative Parts
116-
==============================
117-
please see **PLACEHOLDER-AUTOGENERATED-BOM** for the complete BOM.
118-
119115

120116
.. _wiring_rev_1_0:
121117

docs/sphinx/source/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ RP2040-Decoder Documentation
1010
:maxdepth: 3
1111
:caption: Contents:
1212

13-
other/getting_started
13+
gs/getting_started
1414
hardware/index
1515
software/index
16-
other/index
17-
other/troubleshooting
16+
other/index

docs/sphinx/source/other/CV_list.md

Lines changed: 0 additions & 202 deletions
This file was deleted.

0 commit comments

Comments
 (0)