Update Sphinx documentation

This commit is contained in:
gab-k committed 2025-01-04 14:35:04 +01:00
1 parent 5a00f5af2c
commit 185c703bc0
16 files changed
+235 -261

No files matched your search

+2 -2
View File
@@ -79,13 +79,13 @@ endif()
# limit the frequency of log outputs—such as logging only every 100th iteration.
# - Note that with UART logging enabled, PICO_DEFAULT_UART_TX_PIN and PICO_DEFAULT_UART_RX_PIN are disabled for decoder functions.
# These pins are used for UART communication. Disabling is done automatically in RP2040-Decoder-board.h or RP2040-Decoder-board-legacy.h respectively.
set(LOGLEVEL 1)
set(LOGLEVEL 0)
# Additionally, the LOG_WAIT parameter can be configured to make the controller wait for user input via stdio before continuing.
# This is useful for ensuring that all stdio logging outputs are captured.
# If disabled, there may not be enough time to connect the serial terminal before most of the logging has already been completed.
set(LOG_WAIT 0)
# Modify the below lines to enable/disable output over UART and/or USB
set(STDIO_USB_ENABLED 1)
set(STDIO_USB_ENABLED 0)
set(STDIO_UART_ENABLED 0)
# Leave those two unmodified
pico_enable_stdio_uart(RP2040-Decoder ${STDIO_UART_ENABLED})
+5 -5
View File
@@ -62,7 +62,7 @@ uint8_t CV_ARRAY_DEFAULT [CV_ARRAY_SIZE] = {
0b00000000, //CV_44 -
0b00000000, //CV_45 -
0b00000000, //CV_46 -
// TODO: Update controller CVs
// TODO: Update controller CVs and implement/redefine k_ff in the speed controller initialization
// Speed controller - Configuration /////////////////////////////////////////////////////////////////////////////////
0b00110010, //CV_47 - Feed-forward gain k_ff = CV_47/10000 Default = 50 -> 0.005 //
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] = {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0b00000001, //CV_174 - Additional motor-PWM clock divider.
0b00000111, //CV_175 - speed_helper timer delay - can be used to adjust accel/decel rate
0b00000000, //CV_176 - Base-PWM forward bits 8-15
0b00000000, //CV_177 - Base-PWM forward bits 0-7
0b00000000, //CV_178 - Base-PWM reverse bits 15-8
0b00000000, //CV_179 - Base-PWM reverse bits 0-7
0b00000000, //CV_176 -
0b00000000, //CV_177 -
0b00000000, //CV_178 -
0b00000000, //CV_179 -
0b00000000, //CV_180 -
0b00000000, //CV_181 -
0b00000000, //CV_182 -
+2 -2
View File
@@ -147,7 +147,7 @@ float get_kp(const controller_parameter_t *const ctrl_par) {
uint16_t get_initial_level(controller_parameter_t *const ctrl_par){
uint32_t sum = 0;
uint32_t i = 0;
while (i < 16) {
while (i < BASE_PWM_ARR_LEN) {
if (ctrl_par->startup.base_pwm_arr[i] > 0) {
sum += ctrl_par->startup.base_pwm_arr[i];
i++;
@@ -177,7 +177,7 @@ void controller_startup_mode(controller_parameter_t *const ctrl_par) {
// Save level value in array
ctrl_par->startup.base_pwm_arr[ctrl_par->startup.base_pwm_arr_i] = ctrl_par->startup.level;
// Update index
ctrl_par->startup.base_pwm_arr_i = (ctrl_par->startup.base_pwm_arr_i+1)%16;
ctrl_par->startup.base_pwm_arr_i = (ctrl_par->startup.base_pwm_arr_i+1)%BASE_PWM_ARR_LEN;
// Set ramp_up_mode flag to true
ctrl_par->mode = PID_MODE;
// multiply with constant value of 0.9 and set as current feed forward value for pid mode