Skip to content

Commit

Permalink
fu
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKlimaj committed Nov 19, 2024
1 parent b2276dd commit cdf86d1
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,18 +1919,17 @@ if(zero_crosses < 5){
average_interval = e_com_time / 3;
if (desync_check && zero_crosses > 10) {
if ((getAbsDif(last_average_interval, average_interval) > average_interval >> 1) && (average_interval < 2000)) { // throttle resitricted before zc 20.
allOff();
// zero_crosses = 0;
// desync_happened++;
// if ((!eepromBuffer.bi_direction && (input > 47)) || commutation_interval > 1000) {
//
// running = 0;
// }
// old_routine = 1;
// if (zero_crosses > 100) {
// average_interval = 5000;
// }
// last_duty_cycle = min_startup_duty / 2;
zero_crosses = 0;
desync_happened++;
if ((!eepromBuffer.bi_direction && (input > 47)) || commutation_interval > 1000) {

running = 0;
}
old_routine = 1;
if (zero_crosses > 100) {
average_interval = 5000;
}
last_duty_cycle = min_startup_duty / 2;
}
desync_check = 0;
// }
Expand Down

0 comments on commit cdf86d1

Please sign in to comment.