Reformatting and renaming some functions; replaced get_direction() with get_direction_of_speed_step() in order to simplify handling of direction; additional explanation comment in CV.h; add doxygen config file;

This commit is contained in:
gab-k committed 2024-01-01 19:21:47 +01:00
1 parent d7f4621b96
commit df9b0ba633
10 files changed
+3316 -396

No files matched your search

+1 -4
View File
@@ -46,11 +46,8 @@ typedef struct pid_params{
float m_rev; // Slope reverse direction
uint16_t speed_table[127]; // Array with setpoint values corresponding to every speed step
uint32_t speed_step_target; // End target speed step
uint16_t end_target_index; // Index for speed table array corresponding to end target speed step
uint32_t setpoint; // Current setpoint
uint32_t setpoint_prev; // Previous setpoint
bool direction; // Current Direction
bool direction_prev; // Previous Direction
// Measurement Variables
float measurement; // Newest Measurement value
float adc_offset; // ADC offset value
@@ -60,7 +57,7 @@ typedef struct pid_params{
uint8_t r_side_arr_cutoff; // Discarded samples (right side)
}pid_params;
void update_speed_dir(pid_params *pid, uint32_t speed_step_target);
uint8_t get_speed_step_table_index_of_speed_step(uint8_t speed_step);
bool speed_helper(struct repeating_timer *t);
void adjust_pwm_level(uint16_t level, pid_params *pid);
void update_m(pid_params *pid);