#ifndef __motorstate
#define __motorstate

#include <stdint.h>

// High-level functions to control the motor and update the global state
extern void motorStateMoveTo(uint16_t height);
extern bool motorStateCheckTargetReached();
extern bool motorStateCheckOverCurrent();
extern void motorStateStop();


// Formats a height value as "0.00m" (always exactly 5 characters long).
// Buffer must be at least 6 bytes long, a null character is added.
// The value is the raw height sensor value, the offset is added by this function.
extern void getDisplayHeight(char* buffer, uint16_t value);


#endif