- Reduced amount of global variables. Many variables are now initialized in main() and core1_entry() respectively and then passed as pointer.

- Updates in speed steps are passed via multicore fifo.
- Pointer to direction variable is also passed from core1 to core0 via multicore fifo
- PID parameter struct definition moved to core1.h
- Implemented variable Proportional gain function
- Implemented function to determine base pwm level
- Minor changes regarding variable names
- Added more comments to roughly describe functionality of functions
This commit is contained in:
1nct committed 2022-07-28 14:33:48 +02:00
1 parent 15f67f6c8c
commit f09c4ff136
6 files changed
+407 -194

No files matched your search

+7 -7
View File
@@ -33,17 +33,17 @@ void program_mode(uint8_t number_of_bytes, const uint8_t byte_array[]);
uint32_t get_32bit_CV (uint16_t CV_start_index);
uint16_t get_16bit_CV (uint16_t CV_start_index);
void set_outputs(uint32_t functions_to_set_bitmask);
void update_active_functions(uint32_t byte, uint8_t clr_bit_ind,bool direction_change) ;
bool error_detection(int8_t number_of_bytes, const uint8_t byte_array[]) ;
bool is_long_address(uint8_t number_of_bytes, const uint8_t byte_array[]) ;
bool address_evaluation(uint8_t number_of_bytes,const uint8_t byte_array[]) ;
void update_active_functions(uint32_t byte, uint8_t clr_bit_ind,bool direction_change);
bool error_detection(int8_t number_of_bytes, const uint8_t byte_array[]);
bool is_long_address(uint8_t number_of_bytes, const uint8_t byte_array[]);
bool address_evaluation(uint8_t number_of_bytes,const uint8_t byte_array[]);
void instruction_evaluation(uint8_t number_of_bytes,const uint8_t byte_array[]);
bool reset_package_check(uint8_t number_of_bytes,const uint8_t byte_array[]);
int8_t check_for_package();
void writeLastBit(bool bit) ;
void bits_to_byte_array(int8_t number_of_bytes,uint8_t byte_array[]) ;
void bits_to_byte_array(int8_t number_of_bytes,uint8_t byte_array[]);
void evaluation();
void track_signal_rise(unsigned int gpio, long unsigned int events);
void track_signal_fall(unsigned int gpio, long unsigned int events);
void init_outputs();
void cv_setup_check();
void cv_setup_check();
bool get_direction(bool *direction_ptr);