diff --git a/src/protocol.rs b/src/protocol.rs index beb9b59..e6297eb 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -72,7 +72,7 @@ impl Protocol { return Err("ERR Missing arguments"); } match arguments[0] { - "setsegment" => { + "set" => { if arguments.len() != 3 { self.running = false; return Err("ERR Wrong number of arguments"); @@ -88,8 +88,8 @@ impl Protocol { Err(_e) => return Err("ERR index not a number") }; let value = match arguments[2] { - "on" => true, - "off" => false, + "0" => true, + "1" => false, _ => return Err("ERR no value for segment") }; if RPI { @@ -100,7 +100,7 @@ impl Protocol { } } } - "display" => { + "show" => { //show the saved state on the display if RPI {