Skip to content

Commit

Permalink
move #endif for brushed mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AlkaMotors committed Dec 2, 2023
1 parent e72f78f commit 870f746
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,7 @@ void setInput()
}
}
}
#endif
}

void tenKhzRoutine()
Expand Down Expand Up @@ -1599,7 +1600,7 @@ void runBrushedLoop()
brushed_direction_set = 1;
}

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

if (degrees_celsius > TEMPERATURE_LIMIT) {
duty_cycle_maximum = map(degrees_celsius, TEMPERATURE_LIMIT, TEMPERATURE_LIMIT + 20, TIMER1_MAX_ARR / 2, 1);
Expand Down Expand Up @@ -1778,7 +1779,7 @@ setInputPullDown();
#endif
while (1) {
#ifdef FIXED_DUTY_MODE
setInput();
setInput();
#endif
#ifdef MCU_F031
if (input_ready) {
Expand Down Expand Up @@ -2148,7 +2149,7 @@ setInputPullDown();

#endif // gimbal mode
} // stepper/sine mode end
#endif // end of brushless mode


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

0 comments on commit 870f746

Please sign in to comment.