generated from TDD-Templates/cmake_cpputest_template_avr
changed paramaters and names.
This commit is contained in:
parent
355b7eea87
commit
5b2ce9f4d8
|
@ -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
|
||||
|
|
16
src/main.c
16
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue