forked from M-Labs/kirdy
ad7172: impl default for ch_calibration
This commit is contained in:
parent
ccaf728c75
commit
f49fd08c69
@ -274,6 +274,16 @@ pub struct ChannelCalibration {
|
||||
bipolar: bool,
|
||||
}
|
||||
|
||||
impl Default for ChannelCalibration {
|
||||
fn default() -> Self {
|
||||
ChannelCalibration {
|
||||
offset: 0,
|
||||
gain: 0,
|
||||
bipolar: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ChannelCalibration {
|
||||
pub fn convert_data(&self, data: u32) -> ElectricPotential {
|
||||
let data = if self.bipolar {
|
||||
|
Loading…
Reference in New Issue
Block a user