aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-15 14:25:10 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-15 14:25:10 +0200
commited5812bfb8e7092fe4f6446abf957e8dbc80be21 (patch)
treedeeb7d10151edc706d65d579a8f53b1294d16bed /robo.go
parentf8a3589bb9842ccf11a015be6fb26e50529ca040 (diff)
Font
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/robo.go b/robo.go
index 976eacf..bd96931 100644
--- a/robo.go
+++ b/robo.go
@@ -74,6 +74,8 @@ func (u Unit) Force(c *bufio.Writer) { u.send(c, "FX") }
func (u Unit) Overcut(c *bufio.Writer) { u.send(c, "FC") }
func (u Unit) UnknownFE(c *bufio.Writer) { u.send(c, "FE") }
func (u Unit) DistanceCorrection(c *bufio.Writer) { u.send(c, "FB", ",0") }
+func (u Unit) TrackEnhancing(c *bufio.Writer) { u.send(c, "FY") }
+func (u Unit) RegMarkLen(c *bufio.Writer) { u.send(c, "TB55,") }
func esc(c *bufio.Writer, bytes ...byte) {
c.WriteByte(ESC)
@@ -144,7 +146,7 @@ func (t Triple) send(c *bufio.Writer, cmd string) {
func (t Triple) Factor(c *bufio.Writer) { t.send(c, "&") }
-func Initialize(c *bufio.ReadWriter, mid int) {
+func Initialize(c *bufio.ReadWriter, mid int, o Orientation) {
Init(c.Writer)
if !Ready(c) {
fmt.Println("not ready")
@@ -152,11 +154,12 @@ func Initialize(c *bufio.ReadWriter, mid int) {
GoHome(c.Writer)
fmt.Println(craftRobo, "Ver.", Version(c))
- /*
- pen := MediaID[mid]
- pen.ID.Media(c.Writer)
- pen.Speed.Speed(c.Writer)
- pen.Force.Force(c.Writer)
- pen.Overcut.Overcut(c.Writer)
- */
+ if pen, ok := MediaID[mid]; ok {
+ pen.Apply(c.Writer)
+ }
+
+ Unit(0).TrackEnhancing(c.Writer)
+ Unit(0).UnknownFE(c.Writer)
+ Unit(400).RegMarkLen(c.Writer)
+ o.Orientation(c.Writer)
}