1mod spark;
2
3pub use spark::*;
4
5pub enum MotorType {
6 Brushed,
7 Brushless,
8}
9
10pub enum IdleMode {
11 Brake,
12 Coast,
13}
14
15pub enum ControlType {
16 Position,
17 Velocity,
18}
19
20impl MotorType {
21 pub fn as_str(&self) -> &str {
22 match &self {
23 MotorType::Brushed => "kBrushed",
24 MotorType::Brushless => "kBrushless",
25 }
26 }
27}
28
29impl IdleMode {
30 pub fn as_str(&self) -> &str {
31 match &self {
32 IdleMode::Brake => "kBrake",
33 IdleMode::Coast => "kCoast",
34 }
35 }
36}
37
38impl ControlType {
39 pub fn as_str(&self) -> &str {
40 match &self {
41 ControlType::Position => "kPosition",
42 ControlType::Velocity => "kVelocity",
43 }
44 }
45}