mirror of
https://github.com/janishutz/mqtt-remote-gpio.git
synced 2026-10-09 05:06:21 +02:00
feat: improved payload infra
This commit is contained in:
1 parent
cd0f894e73
commit
5ab9056b55
2 files changed
+6
-3
No files matched your search
+5
-1
@@ -132,7 +132,11 @@ impl GPIOController {
|
||||
.get(&instruction.topic)
|
||||
.expect("Failed to load pins data");
|
||||
println!("Hello World, pin {}", pin.id);
|
||||
println!("Payload {}", instruction.payload.first().unwrap());
|
||||
let mut instr = "".to_string();
|
||||
for char in instruction.payload {
|
||||
instr.push_str(&char.to_string())
|
||||
}
|
||||
println!(instr);
|
||||
if pin.off_timeout > 0 {
|
||||
self.timeout_topics
|
||||
.push((pin.topic.clone(), SystemTime::now(), pin.off_timeout));
|
||||
|
||||
Reference in new issue
Block a user