aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-15 13:29:31 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-15 13:29:31 +0200
commitb2bfa9c8f48fced0776986c68135a75f9c3f3a46 (patch)
treeb524128059644fcd0a9f874a0fd22091018aef5c /robo.go
parent45480ea2d167ec9107b837bf14102531521366ab (diff)
Rename New... to parse...
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/robo.go b/robo.go
index 3811500..b7a39c6 100644
--- a/robo.go
+++ b/robo.go
@@ -87,7 +87,7 @@ func Init(c *bufio.Writer) { esc(c, 4) }
func Ready(c *bufio.ReadWriter) bool {
esc(c.Writer, 5)
- return NewUnit(recv(c.Reader)) == 0
+ return parseUnit(recv(c.Reader)) == 0
}
func recv(c *bufio.Reader) string {
@@ -115,7 +115,7 @@ func Calibrate(c *bufio.Writer) { send(c, "TB70") }
func point(c *bufio.ReadWriter, cmd string) Point {
send(c.Writer, cmd)
- return NewPoint(recv(c.Reader))
+ return parsePoint(recv(c.Reader))
}
func Calibration(c *bufio.ReadWriter) Point { return point(c, "TB71") }
@@ -131,7 +131,7 @@ func (p Point) LineStyle(c *bufio.Writer) { p.send(c, "L100,1,") }
func triple(c *bufio.ReadWriter, cmd string) Triple {
send(c.Writer, cmd)
- return NewTriple(recv(c.Reader))
+ return parseTriple(recv(c.Reader))
}
func Gin(c *bufio.ReadWriter) Triple { return triple(c, "G") }