From 5b2ce9f4d8724cfc61e15bd9782099cf84c030f1 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 12 Feb 2025 11:48:14 -0800 Subject: [PATCH] changed paramaters and names. --- inc/main.h | 4 ++-- src/main.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/inc/main.h b/inc/main.h index 60e98f4..52831b1 100644 --- a/inc/main.h +++ b/inc/main.h @@ -115,7 +115,7 @@ uint16_t ReadADC(void); * @brief Reads the ADC pin * @param */ -void FaderMoveTo(uint8_t pos); +void MotorMoveTo(uint8_t pos); /** * @brief @@ -127,7 +127,7 @@ void MotorCoast(void); * @brief * @param */ -void MotorMove(int direction); +void MotorMove(uint8_t fwd); /** * @brief diff --git a/src/main.c b/src/main.c index b12472a..0432281 100644 --- a/src/main.c +++ b/src/main.c @@ -31,6 +31,8 @@ volatile uint8_t idx; volatile uint16_t tick_count; +volatile uint8_t fader_pos1; + // ############################# // 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) { 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) { /*Then start the timer and update the output*/ ToggleOutput(b); + FaderMoveTo(fader_pos1); StartButtonTimer(b); return; }