From 9fe4197e52fa12b06fb8d3192075daf209322af8 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Wed, 21 Jun 2023 13:00:33 -0400 Subject: [PATCH] Determined source of failed imports Matching a split against a value that contains the split character will never work. --- src/device.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/device.rs b/src/device.rs index 7fb1a41..0d60284 100755 --- a/src/device.rs +++ b/src/device.rs @@ -3,9 +3,9 @@ use crate::tty::{TTY, Response,Command}; use rppal::gpio::{Gpio,OutputPin}; const TEMP_WAIT:Duration = Duration::from_secs(3); -const REBOOTS_SECTION: &str = "Reboots: "; -const BP_SECTION: &str = "Successful BP tests: "; -const TEMP_SECTION: &str = "Successful temp tests: "; +const REBOOTS_SECTION: &str = "Reboots"; +const BP_SECTION: &str = "Successful BP tests"; +const TEMP_SECTION: &str = "Successful temp tests"; const OUTPUT_FOLDER: &str = "output/"; const UNINITIALISED_SERIAL: &str = "uninitialised"; const SERIAL_HEADER: &str = "DtCtrlCfgDeviceSerialNum"; @@ -82,7 +82,9 @@ impl Device{ self.temp_offset = value; log::trace!("Temp offset set to {:?}",self.temp_offset); }, - _ => () + _ => { + log::info!("Invalid import value: [{:?}]. Please ensure that the output directory is clean.",section_and_data); + } }; } Err(_) => {