From 9276925e8bbd92fc6229dd45193ad965b0ef877c Mon Sep 17 00:00:00 2001 From: Romulus21 Date: Mon, 26 Aug 2024 08:28:29 +0200 Subject: [PATCH] fix raspberry mesure temp command --- src/system_values.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/system_values.rs b/src/system_values.rs index 899fc2d..ff69fb6 100644 --- a/src/system_values.rs +++ b/src/system_values.rs @@ -14,8 +14,7 @@ pub fn get_temperature() -> f32 { temperature = temperature_string.parse::().unwrap(); temperature /= 1000.0; } else { - let temperature_command = Command::new("sudo") - .arg("/opt/vc/bin/vcgencmd") + let temperature_command = Command::new("/usr/bin/vcgencmd") .arg("measure_temp") .output() .unwrap_or_else(|e| panic!("failed to execute process: {}", e));