aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-16 19:56:46 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-16 19:56:46 +0200
commita182254155f182815ac248d1585992adb41c6f98 (patch)
tree5e8dc4c5aec6d004dc6db623cb39bc08861a398b /robo.go
parent99fdbb143f973baa0539ad53f89d0b60cf229223 (diff)
Add FQ
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/robo.go b/robo.go
index fb1030e..50e15be 100644
--- a/robo.go
+++ b/robo.go
@@ -107,6 +107,11 @@ func Ready(c *bufio.ReadWriter) bool {
return parseUnit(recv(c.Reader)) == 0
}
+func (u Unit) UnknownFQ(c *bufio.ReadWriter) Unit {
+ u.send(c.Writer, "FQ", u)
+ return parseUnit(recv(c.Reader))
+}
+
func recv(c *bufio.Reader) string {
ans, err := c.ReadString(ETX)
if err != nil {
@@ -230,8 +235,9 @@ func (d Direction) Step(c *bufio.Writer) { esc(c, NUL, byte(d)) }
// Untested
func BootUpgrade(c *bufio.ReadWriter) string {
- esc(c, 1)
- return c.ReadString(' ')
+ esc(c.Writer, 1)
+ s, _ := c.ReadString(' ')
+ return s
}
func UpdateFirmware(c *bufio.ReadWriter) bool {
return str(c, "CC1VERUP") == string(NUL)