17 lines
396 B
Rust
17 lines
396 B
Rust
pub mod afroesc;
|
|
pub mod dshot;
|
|
pub enum EscState {
|
|
Starting,
|
|
Running,
|
|
Stopping,
|
|
Stop
|
|
|
|
}
|
|
//taken from: https://docs.arduino.cc/language-reference/en/functions/math/map/
|
|
//used for the ramp up of the spincoater
|
|
pub fn arduino_map(x:i32, in_min:i32, in_max:i32, out_min:i32, out_max:i32) -> i32 {
|
|
|
|
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
|
|
|
|
}
|
|
|