fix raspberry mesure temp command
This commit is contained in:
@@ -14,8 +14,7 @@ pub fn get_temperature() -> f32 {
|
|||||||
temperature = temperature_string.parse::<f32>().unwrap();
|
temperature = temperature_string.parse::<f32>().unwrap();
|
||||||
temperature /= 1000.0;
|
temperature /= 1000.0;
|
||||||
} else {
|
} else {
|
||||||
let temperature_command = Command::new("sudo")
|
let temperature_command = Command::new("/usr/bin/vcgencmd")
|
||||||
.arg("/opt/vc/bin/vcgencmd")
|
|
||||||
.arg("measure_temp")
|
.arg("measure_temp")
|
||||||
.output()
|
.output()
|
||||||
.unwrap_or_else(|e| panic!("failed to execute process: {}", e));
|
.unwrap_or_else(|e| panic!("failed to execute process: {}", e));
|
||||||
|
|||||||
Reference in New Issue
Block a user