Move TempAdcFilter struct def to Thermostat
This commit is contained in:
parent
df939eb9a3
commit
adfa4f5fa3
@ -13,7 +13,7 @@ use crate::{laser_diode::{laser_diode::{
|
||||
pd_responsitivity::ResponsitivityUnit
|
||||
},
|
||||
net::net,
|
||||
thermostat::{ad7172::{FilterType, PostFilter, SingleChODR}, thermostat::StatusReport as TecStatusReport}
|
||||
thermostat::{ad7172::FilterType, thermostat::{StatusReport as TecStatusReport, TempAdcFilter}}
|
||||
};
|
||||
use crate::thermostat::thermostat::{Thermostat, ThermostatSettingsSummary};
|
||||
use crate::thermostat::pid_state::PidSettings::*;
|
||||
@ -97,15 +97,6 @@ pub struct Cmd {
|
||||
json: CmdJsonObj
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Copy, Clone, Debug, Default, Tree)]
|
||||
pub struct TempAdcFilter{
|
||||
filter_type: FilterType,
|
||||
sinc5sinc1odr: Option<SingleChODR>,
|
||||
sinc3odr: Option<SingleChODR>,
|
||||
sinc5sinc1postfilter: Option<PostFilter>,
|
||||
sinc3fineodr: Option<f64>
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Copy, Clone, Debug, Tree)]
|
||||
pub struct StatusReport {
|
||||
ts: u32,
|
||||
|
@ -3,7 +3,7 @@ use core::marker::PhantomData;
|
||||
use crate::sys_timer;
|
||||
use crate::thermostat::ad5680;
|
||||
use crate::thermostat::max1968::{MAX1968, AdcReadTarget, PwmPinsEnum};
|
||||
use crate::thermostat::ad7172;
|
||||
use crate::thermostat::ad7172::{self, FilterType, PostFilter, SingleChODR};
|
||||
use crate::thermostat::pid_state::{PidState, PidSettings, Parameters as PidParams};
|
||||
use crate::thermostat::temp_mon::{TempMon, TempStatus, TempMonSettings};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -26,6 +26,17 @@ pub const R_SENSE: ElectricalResistance = ElectricalResistance {
|
||||
value: 0.05,
|
||||
};
|
||||
|
||||
#[derive(Deserialize, Serialize, Copy, Clone, Debug, Default, Tree)]
|
||||
pub struct TempAdcFilter{
|
||||
pub filter_type: FilterType,
|
||||
pub sinc5sinc1odr: Option<SingleChODR>,
|
||||
pub sinc3odr: Option<SingleChODR>,
|
||||
pub sinc5sinc1postfilter: Option<PostFilter>,
|
||||
pub sinc3fineodr: Option<f32>,
|
||||
pub rate: Option<f32>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Deserialize, Serialize, Clone, Copy, Debug, Tree)]
|
||||
pub struct TecSettings {
|
||||
pub pwr_on: bool,
|
||||
|
Loading…
Reference in New Issue
Block a user