From a19cad3b64a2af9e2d8ffad12fbb6e386ff6bf3b Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Sun, 18 Dec 2022 14:50:17 +1100 Subject: [PATCH] cleanuo --- src/main.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/main.rs b/src/main.rs index eb6d261..2e898fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -76,21 +76,6 @@ impl Info { i_scale: data[2] as f32 + (data[3] as f32 / f32::powf(2., 16.)), } } - pub fn scale_power(&self, p: &u16) -> f32 { - *p as f32 * self.v_scale * self.i_scale * f32::powf(2., -17.) - } - pub fn scale_voltage(&self, v: &u16) -> f32 { - *v as f32 * self.v_scale * f32::powf(2., -15.) - } - pub fn scale_current(&self, i: &u16) -> f32 { - *i as f32 * self.i_scale * f32::powf(2., -15.) - } - pub fn scale_voltage_f(&self, v: f32) -> f32 { - v * self.v_scale * f32::powf(2., -15.) - } - pub fn scale_current_f(&self, i: f32) -> f32 { - i * self.i_scale * f32::powf(2., -15.) - } } fn main() {