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
use snafu::prelude::*;
#[derive(Debug, Snafu)]
pub enum Error {
#[snafu(display("Failed to read model data"))]
ReadModelData,
#[snafu(display("Failed to read parameters"))]
ReadParameters,
#[snafu(display("Failed to set parameters"))]
SetParameters,
#[snafu(display("Failed to read serial port"))]
SerialRead,
#[snafu(display("Failed to write serial port"))]
SerialWrite,
#[snafu(display("Failed to wait for AUX pin"))]
AuxPin,
#[snafu(display("Parameter error {source}"))]
Parameter {
source: crate::parameters::error::Error,
},
}