changed paramaters and names.

This commit is contained in:
Jake Goodwin 2025-02-12 11:48:14 -08:00
parent 355b7eea87
commit 5b2ce9f4d8
2 changed files with 18 additions and 2 deletions

View File

@ -115,7 +115,7 @@ uint16_t ReadADC(void);
* @brief Reads the ADC pin * @brief Reads the ADC pin
* @param * @param
*/ */
void FaderMoveTo(uint8_t pos); void MotorMoveTo(uint8_t pos);
/** /**
* @brief * @brief
@ -127,7 +127,7 @@ void MotorCoast(void);
* @brief * @brief
* @param * @param
*/ */
void MotorMove(int direction); void MotorMove(uint8_t fwd);
/** /**
* @brief * @brief

View File

@ -31,6 +31,8 @@ volatile uint8_t idx;
volatile uint16_t tick_count; volatile uint16_t tick_count;
volatile uint8_t fader_pos1;
// ############################# // #############################
// Prototypes // Prototypes
// ############################# // #############################
@ -135,6 +137,19 @@ uint16_t ReadADC(void) {
* ############################ * ############################
*/ */
void MotorMoveTo(uint8_t pos)
{
return;
}
// Using the compatable bool type.
void MotorMove(uint8_t fwd)
{
return;
}
void MotorCoast(void) { void MotorCoast(void) {
PORTB &= ~((1 << PWM_PIN1) | (1 << PWM_PIN2)); // Disable motor drive PORTB &= ~((1 << PWM_PIN1) | (1 << PWM_PIN2)); // Disable motor drive
} }
@ -213,6 +228,7 @@ static void UpdateButtonOutput(btn_state *b) {
if (!b->is_long_pressed && !b->timer_enabled) { if (!b->is_long_pressed && !b->timer_enabled) {
/*Then start the timer and update the output*/ /*Then start the timer and update the output*/
ToggleOutput(b); ToggleOutput(b);
FaderMoveTo(fader_pos1);
StartButtonTimer(b); StartButtonTimer(b);
return; return;
} }