aboutsummaryrefslogtreecommitdiff
path: root/media.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 /media.go
parentf8a3589bb9842ccf11a015be6fb26e50529ca040 (diff)
Font
Diffstat (limited to 'media.go')
-rw-r--r--media.go116
1 files changed, 63 insertions, 53 deletions
diff --git a/media.go b/media.go
index 87ad8eb..a822bde 100644
--- a/media.go
+++ b/media.go
@@ -1,15 +1,18 @@
package main
-import "fmt"
+import (
+ "bufio"
+ "fmt"
+)
// Overcut: depends on blade, 0 for pens
type Media struct {
- Descr string // Description
- ID int // FW111
- Speed int // !10
- Thickness int // FX10,0
- Overcut int // FC ?
+ Descr string // Description
+ ID int // FW111
+ Speed int // !10
+ Force int // FX10,0
+ Overcut int // FC ?
}
var MediaID = make(map[int]Media)
@@ -21,72 +24,79 @@ func init() {
}
func (m Media) String() string {
- return fmt.Sprintf("%v: Speed %2d, Thickness %2d %s",
- m.ID, m.Speed, m.Thickness, m.Descr)
+ return fmt.Sprintf("%v: Speed %2d, Force %2d %s",
+ m.ID, m.Speed, m.Force, m.Descr)
+}
+
+func (m Media) Apply(c *bufio.Writer) {
+ Unit(m.ID).Media(c)
+ Unit(m.Speed).Speed(c)
+ Unit(m.Force).Force(c)
+ Unit(m.Overcut).Overcut(c)
}
var Medias = []Media{
Media{
- Descr: "Card without Craft Paper Backing",
- ID: 100,
- Speed: 10,
- Thickness: 27,
- Overcut: 18,
+ Descr: "Card without Craft Paper Backing",
+ ID: 100,
+ Speed: 10,
+ Force: 27,
+ Overcut: 18,
},
Media{
- Descr: "Card with Craft Paper Backing",
- ID: 101,
- Speed: 10,
- Thickness: 27,
- Overcut: 18,
+ Descr: "Card with Craft Paper Backing",
+ ID: 101,
+ Speed: 10,
+ Force: 27,
+ Overcut: 18,
},
Media{
- Descr: "Vinyl Sticker",
- ID: 102,
- Speed: 10,
- Thickness: 10,
- Overcut: 18,
+ Descr: "Vinyl Sticker",
+ ID: 102,
+ Speed: 10,
+ Force: 10,
+ Overcut: 18,
},
Media{
- Descr: "Film Labels",
- ID: 106,
- Speed: 10,
- Thickness: 14,
- Overcut: 18,
+ Descr: "Film Labels",
+ ID: 106,
+ Speed: 10,
+ Force: 14,
+ Overcut: 18,
},
Media{
- Descr: "Magnetic Sheet",
- ID: 107,
- Speed: 10,
- Thickness: 12,
- Overcut: 18,
+ Descr: "Magnetic Sheet",
+ ID: 107,
+ Speed: 10,
+ Force: 12,
+ Overcut: 18,
},
Media{
- Descr: "Thick Media",
- ID: 111,
- Speed: 10,
- Thickness: 27,
- Overcut: 18,
+ Descr: "Thick Media",
+ ID: 111,
+ Speed: 10,
+ Force: 27,
+ Overcut: 18,
},
Media{
- Descr: "Thin Media",
- ID: 112,
- Speed: 10,
- Thickness: 2,
- Overcut: 18,
+ Descr: "Thin Media",
+ ID: 112,
+ Speed: 10,
+ Force: 2,
+ Overcut: 18,
},
Media{
- Descr: "Pen",
- ID: 113,
- Speed: 10,
- Thickness: 10,
- Overcut: 0,
+ Descr: "Pen",
+ ID: 113,
+ Speed: 10,
+ Force: 10,
+ Overcut: 0,
},
Media{
- Descr: "Custom",
- ID: 300,
- Speed: 10,
- Thickness: 10,
- Overcut: 18,
+ Descr: "Custom",
+ ID: 300,
+ Speed: 10,
+ Force: 10,
+ Overcut: 18,
},
}