From 52671eb2889eeb68762fdb1eee071675e19e0c8f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 24 Apr 2015 00:32:40 +0200 Subject: Add update command --- cutter.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cutter.go') diff --git a/cutter.go b/cutter.go index 8cbb925..e6528f3 100644 --- a/cutter.go +++ b/cutter.go @@ -225,6 +225,20 @@ func (c Cutter) UnknownTB51() { fmt.Fprint(c, "TB51,400") } +// Updater Version ??? +func (c Cutter) UpdaterVersion() (string, error) { + c.WriteString("\x1b\x01") + c.Flush() + return c.readResponse() +} + +func (c Cutter) Update() (bool, error) { + c.WriteString("CC1VERUP") + c.Flush() + ans, err := c.readResponse() + return ans == "\x00", err +} + // Initialize ??? func (c Cutter) Initialize() { c.WriteString("\x1b\x04") -- cgit v1.2.3