2020-01-31 11:22:06 +00:00
|
|
|
#ifndef __control
|
|
|
|
#define __control
|
2020-01-30 14:16:52 +00:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
// High-level functions to control the motor and update the global state
|
2020-01-31 11:22:06 +00:00
|
|
|
extern void controlMoveTo(uint16_t height);
|
|
|
|
extern bool controlCheckTargetReached();
|
|
|
|
extern bool controlCheckOverCurrent();
|
|
|
|
extern void controlStop();
|
|
|
|
|
|
|
|
extern void controlSnapToPreset();
|
2020-01-30 14:16:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Formats a height value as "0.00m" (always exactly 5 characters long).
|
2020-01-31 09:36:36 +00:00
|
|
|
// Buffer must be at least 6 bytes long, a null character is added.
|
2020-01-30 14:16:52 +00:00
|
|
|
// The value is the raw height sensor value, the offset is added by this function.
|
|
|
|
extern void getDisplayHeight(char* buffer, uint16_t value);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|