Compare commits

..

No commits in common. "ce747adb9a42d058a0518e81daf13558ff965456" and "b93a01f8c5fd0d963c7cbd7d786688000e294a4e" have entirely different histories.

4 changed files with 3 additions and 10 deletions

View file

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20)
# Use the fancy version substitution
project(main
VERSION 0.3.1
VERSION 0.2.4
DESCRIPTION "template for cmake + cpputest"
LANGUAGES C CXX
)

View file

@ -36,12 +36,6 @@ The speed can be adjusted by changing the input value of the speed pot. The
speed adjustment affects the on/off ratio of the motor and has a programmed
minimum speed value in the function to prevent endless looping.
### Move to secondary Position
When the motor has already preformed a move to position from a quick
button press, you can tap the button once more and it will go back to it's
previous position from your initial button press.
## Building Project(Windows)

View file

@ -49,10 +49,9 @@
#define SPEED_PIN PB2 // Pin 7/ADC1
#define BUTTON_PIN PB4 // Pin 3 - Button input
#define MOTOR_RAMPDOWN_DIST 32
#define MOTOR_RAMPDOWN_DIST 16
#define MOTOR_PULSE 6 //uS motor base pulse
#define SAVED_POS_MARGIN 4
/*The timing of "ticks" is dependent on the AVR timer's counter register

View file

@ -284,7 +284,7 @@ static void UpdateButtonOutput(btn_state *b) {
if (b->is_active) {
/*If already in saved position then go back to original pos.*/
if(diff(MotorGetSavedPos((uint8_t *)POSITION1_ADR), ReadFader()) <= SAVED_POS_MARGIN){
if(diff(MotorGetSavedPos((uint8_t *)POSITION1_ADR), ReadFader()) <= 3){
MotorMoveTo(MotorGetSavedPos((uint8_t *)POSITION2_ADR));
}
else{