diff --git a/src/dbg.rs b/src/dbg.rs index 20656f9..b106f64 100644 --- a/src/dbg.rs +++ b/src/dbg.rs @@ -11,13 +11,3 @@ pub fn dbg_chn(chn: &str) -> bool { false } } - -pub fn binwrite2_enable(chn: &str) -> bool { - let chns = [ - // "ARS05-RAMP-0230:PLC-COUNT-MON", - // "ARS09-R3HC-0150:TUN1-MOTOR-TEMP", - // "ARS09-R3HC-0150:HOM27-ATT-TEMP", - // "ARIDI-BLM01:LOSS7", - ]; - chns.contains(&chn) -} diff --git a/src/msp.rs b/src/msp.rs index 2a72b47..ff206a5 100644 --- a/src/msp.rs +++ b/src/msp.rs @@ -1,4 +1,6 @@ use netpod::DtMs; +use netpod::TsMs; +use std::fmt; autoerr::create_error_v1!( name(Error, "BinMsp"), @@ -17,6 +19,12 @@ pub enum PrebinnedPartitioning { Day1, } +impl fmt::Display for PrebinnedPartitioning { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(self, fmt) + } +} + impl PrebinnedPartitioning { pub fn bin_len(&self) -> DtMs { use PrebinnedPartitioning::*; @@ -53,7 +61,7 @@ impl PrebinnedPartitioning { } } - pub fn quo_rem(&self, val: DtMs) -> (u64, u32) { + pub fn quo_rem(&self, val: TsMs) -> (u64, u32) { let valms = val.ms(); let divms = self.msp_div().ms(); let quo = valms / divms;