Use timestamp
This commit is contained in:
10
src/dbg.rs
10
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)
|
||||
}
|
||||
|
||||
10
src/msp.rs
10
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;
|
||||
|
||||
Reference in New Issue
Block a user