Skip to content

Commit 870f746

Browse files
committed
move #endif for brushed mode
1 parent e72f78f commit 870f746

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Src/main.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,7 @@ void setInput()
13061306
}
13071307
}
13081308
}
1309+
#endif
13091310
}
13101311

13111312
void tenKhzRoutine()
@@ -1599,7 +1600,7 @@ void runBrushedLoop()
15991600
brushed_direction_set = 1;
16001601
}
16011602

1602-
brushed_duty_cycle = map(adjusted_input, 48, 2047, 0, TIMER1_MAX_ARR - 50);
1603+
brushed_duty_cycle = map(adjusted_input, 48, 2047, 0, (TIMER1_MAX_ARR - (TIMER1_MAX_ARR/20)));
16031604

16041605
if (degrees_celsius > TEMPERATURE_LIMIT) {
16051606
duty_cycle_maximum = map(degrees_celsius, TEMPERATURE_LIMIT, TEMPERATURE_LIMIT + 20, TIMER1_MAX_ARR / 2, 1);
@@ -1778,7 +1779,7 @@ setInputPullDown();
17781779
#endif
17791780
while (1) {
17801781
#ifdef FIXED_DUTY_MODE
1781-
setInput();
1782+
setInput();
17821783
#endif
17831784
#ifdef MCU_F031
17841785
if (input_ready) {
@@ -2148,7 +2149,7 @@ setInputPullDown();
21482149

21492150
#endif // gimbal mode
21502151
} // stepper/sine mode end
2151-
#endif // end of brushless mode
2152+
21522153

21532154
#ifdef BRUSHED_MODE
21542155
runBrushedLoop();
@@ -2171,4 +2172,4 @@ void assert_failed(uint8_t* file, uint32_t line)
21712172
tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
21722173
/* USER CODE END 6 */
21732174
}
2174-
#endif /* USE_FULL_ASSERT */
2175+
#endif /* USE_FULL_ASSERT */

0 commit comments

Comments
 (0)