fix: char conversion

This commit is contained in:
janishutz committed 2026-08-25 10:25:06 +02:00
1 parent 788be33dc9
commit 0d74c46b4e
1 file changed
+2 -4
+2 -4
View File
@@ -6,7 +6,6 @@ use crate::conf::{PinMode, Topic};
pub struct InputPin { pub struct InputPin {
pub gpio: gpio::InputPin, pub gpio: gpio::InputPin,
pub id: u8,
pub topic: String, pub topic: String,
} }
@@ -43,7 +42,6 @@ pub fn split_topics_and_configure_pins(topics: Vec<Topic>) -> (Vec<InputPin>, Ve
.get(topic.pin) .get(topic.pin)
.expect(&format!("Unable to find GPIO pin {}", topic.pin)) .expect(&format!("Unable to find GPIO pin {}", topic.pin))
.into_input(), .into_input(),
id: topic.pin,
}); });
in_used.push(topic.pin) in_used.push(topic.pin)
} else { } else {
@@ -133,8 +131,8 @@ impl GPIOController {
.expect("Failed to load pins data"); .expect("Failed to load pins data");
println!("Hello World, pin {}", pin.id); println!("Hello World, pin {}", pin.id);
let mut instr = "".to_string(); let mut instr = "".to_string();
for char in &instruction.payload { for c in &instruction.payload {
instr.push_str(&char.to_string()) instr.push(*c as char)
} }
println!("{}", instr); println!("{}", instr);
if pin.off_timeout > 0 { if pin.off_timeout > 0 {