Skip to content

Commit

Permalink
Reset interval on prop strike
Browse files Browse the repository at this point in the history
  • Loading branch information
AlkaMotors committed Sep 20, 2022
1 parent 81a55b4 commit 55d4216
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
- Re-enter polling mode after prop strike or desync
- add G071 "N" variant
- add preliminary Extended Dshot
*1.91 - Reset average interval time on desync only after 100 zero crosses
*/

Expand All @@ -176,7 +177,7 @@


#define VERSION_MAJOR 1
#define VERSION_MINOR 90
#define VERSION_MINOR 91

//firmware build options !! fixed speed and duty cycle modes are not to be used with sinusoidal startup !!

Expand Down Expand Up @@ -1203,7 +1204,9 @@ if(desync_check && zero_crosses > 10){
desync_happened ++;
running = 0;
old_routine = 1;
average_interval = 10000;
if(zero_crosses > 100){
average_interval = 5000;
}
last_duty_cycle = min_startup_duty/2;
}
desync_check = 0;
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ LIBS := -lc -lm -lnosys

# Compiler options
CFLAGS_COMMON := -DUSE_MAKE
CFLAGS_COMMON += -I$(MAIN_INC_DIR) -O2 -Wall -fdata-sections -ffunction-sections
CFLAGS_COMMON += -I$(MAIN_INC_DIR) -O3 -Wall -fdata-sections -ffunction-sections
CFLAGS_COMMON += -D$(TARGET)

# Linker options
Expand Down

0 comments on commit 55d4216

Please sign in to comment.