summaryrefslogtreecommitdiffstats
path: root/lift.hpp
blob: af4de4d7f65937265462e8f0f214ca40879e8f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
 * @file lift.hpp
 * @brief A system to handle all lift operations, using a quadrature
 * encoder. 
 */

#ifndef LIFT_HPP_
#define LIFT_HPP_

namespace lift {
	/**
	 * Initializes the lift system.
	 */
	void init(void);

	/**
	 * Sets the lift to the specified encoder value.
	 * This value is kept between -10 and the maximum height.
	 * @param target the target value to reach
	 * @see liftMaxHeight
	 */
	void set(const int& target);

	/**
	 * Increases the lift's target.
	 */
	void raise(void);

	/**
	 * Decreases the lift's target.
	 */
	void lower(void);
}

/**
 * Defines the highest encoder count the lift can reach.
 */
constexpr int liftMaxHeight = 110;

#endif // LIFT_HPP_