From 07280feb8d55a240d0ad1a0e5783e1c1ed977e72 Mon Sep 17 00:00:00 2001 From: Michael Preisach Date: Fri, 26 Apr 2019 16:45:05 +0200 Subject: [PATCH] bugfix in displaying segments --- src/protocol.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/protocol.rs b/src/protocol.rs index 005ce3e..99e4cd3 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -49,6 +49,7 @@ impl Protocol { self.segments.push(Segment::new(21)); self.segments.push(Segment::new(20)); self.segments.push(Segment::new(16)); + } pub fn start(&mut self) { @@ -91,7 +92,7 @@ impl Protocol { "display" => { //show the saved state on the display - for i in 0 .. 7 { + for i in 0 .. 8 { match self.segments[i].show() { Ok(_) => (), Err(e) => println!("{}", e),