control:
- Add Button combination SET+PRESET1 to set winding width with potentiometer
- Add case and display output in that state
config: move config macros from guide_stepper to common config
guide-stepper:
- outsource config definitions
- add functions to get and set variable winding width
- add mutex
27 lines
909 B
C++
27 lines
909 B
C++
#pragma once
|
|
|
|
//task that initializes and controls the stepper motor
|
|
//current functionality:
|
|
// - automatically auto-homes
|
|
// - moves left and right repeatedly
|
|
// - updates speed from potentiometer each cycle
|
|
void task_stepper_test(void *pvParameter);
|
|
|
|
//task that initializes and controls the stepper motor
|
|
// - moves stepper according to encoder movement
|
|
void task_stepper_ctl(void *pvParameter);
|
|
|
|
|
|
//tell stepper-control task to move cable guide to zero position
|
|
void guide_moveToZero();
|
|
|
|
|
|
// return local variable posNow that stores the current position of cable guide axis in steps
|
|
// needed by shutdown to store last axis position in nvs
|
|
int guide_getAxisPosSteps();
|
|
|
|
// set custom winding width (axis position the guide returns in mm)
|
|
void guide_setWindingWidth(uint8_t maxPosMm);
|
|
|
|
// get currently configured winding width (axis position the guide returns in mm)
|
|
uint8_t guide_getWindingWidth(); |