File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ func (b *BufferflowTimed) Init() {
34
34
bufferedOutput = bufferedOutput + data
35
35
case <- b .ticker .C :
36
36
if bufferedOutput != "" {
37
- m := SpPortMessage {bufferedOutput }
37
+ m := SpPortMessage {b . Port , bufferedOutput }
38
38
buf , _ := json .Marshal (m )
39
39
// data is now encoded in base64 format
40
40
// need a decoder on the other side
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ func (b *BufferflowTimedRaw) Init() {
32
32
b .ticker = time .NewTicker (16 * time .Millisecond )
33
33
for _ = range b .ticker .C {
34
34
if len (bufferedOutputRaw ) != 0 {
35
- m := SpPortMessageRaw {bufferedOutputRaw }
35
+ m := SpPortMessageRaw {b . Port , bufferedOutputRaw }
36
36
buf , _ := json .Marshal (m )
37
37
// data is now encoded in base64 format
38
38
// need a decoder on the other side
Original file line number Diff line number Diff line change @@ -83,12 +83,12 @@ type qwReport struct {
83
83
}
84
84
85
85
type SpPortMessage struct {
86
- // P string // the port, i.e. com22
86
+ P string // the port, i.e. com22
87
87
D string // the data, i.e. G0 X0 Y0
88
88
}
89
89
90
90
type SpPortMessageRaw struct {
91
- // P string // the port, i.e. com22
91
+ P string // the port, i.e. com22
92
92
D []byte // the data, i.e. G0 X0 Y0
93
93
}
94
94
@@ -157,7 +157,7 @@ func (p *serport) reader() {
157
157
158
158
if p .bufferwatcher .IsBufferGloballySendingBackIncomingData () == false {
159
159
//m := SpPortMessage{"Alice", "Hello"}
160
- m := SpPortMessage {data }
160
+ m := SpPortMessage {p . portConf . Name , data }
161
161
//log.Print("The m obj struct is:")
162
162
//log.Print(m)
163
163
You can’t perform that action at this time.
0 commit comments