diff --git a/core0.c b/core0.c index a63dc5a..741d6f4 100644 --- a/core0.c +++ b/core0.c @@ -129,7 +129,7 @@ void write_cv_handler(uint16_t cv_index, uint8_t cv_data){ switch (cv_index) { // CV_1 => Value = 0 is not allowed case 0: - if (cv_data == 0) break; + if (cv_data == 0 || cv_data > 127) break; // CV_7 & CV_8 are read-only // ADC offset Adjustment (CV_7; Value = 7); case 6: diff --git a/core1.c b/core1.c index 1f6edee..42ce5ac 100644 --- a/core1.c +++ b/core1.c @@ -304,7 +304,7 @@ void core1_entry() { // Check for time difference between last packet and current time (Packet Timeout) absolute_time_t current_time = get_absolute_time(); if (absolute_time_diff_us(time_last_update,current_time) > packet_timeout_threshold_in_us){ - update_speed_dir(pid,0); + update_speed_dir(pid,1 + 128*pid->direction); // Emergency stop on timeout } // If core0 sends new speed data to core1 speed_step_target and direction variables get updated if(multicore_fifo_rvalid()) { diff --git a/docs/svg/Long_address.svg b/docs/svg/Long_address.svg new file mode 100644 index 0000000..69f3706 --- /dev/null +++ b/docs/svg/Long_address.svg @@ -0,0 +1,4 @@ + + + +
CV_17 = {192, 231}
CV_17 = {192, 231}
CV_18 = {0, 255}
CV_18 = {0, 255}
215
215
214
214
213
213
212
212
211
211
210
210
29
29
28
28
27
27
26
26
25
25
24
24
23
23
22
22
21
21
20
20
1
1
1
1
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Bit Weight
Bit Weight
Bit Value
Bit Value
Text is not SVG - cannot display
\ No newline at end of file