Skip to content

Commit 07ed5c1

Browse files
committed
Added "send back per line" mode to TinyG bufferflow
Former-commit-id: a96d2b06322aed15bf19419317c2e84b6d92f98f [formerly 829bc3fe874895342ac6f701d20af2bcbbc9557f] Former-commit-id: 9ce10564169fff2f3e0fea30bc4d98b673f66d57
1 parent 39eade5 commit 07ed5c1

5 files changed

+11
-28
lines changed

bufferflow.go

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,5 @@ type Bufferflow interface {
2626
SeeIfSpecificCommandsShouldUnpauseBuffer(cmd string) bool // implement this method
2727
SeeIfSpecificCommandsShouldWipeBuffer(cmd string) bool // implement this method
2828
ReleaseLock() // implement this method
29-
//Name string
30-
//Port string
31-
//myvar mytype string
32-
//pause bool // keep track if we're paused from sending
33-
//buffertype string // is it tinyg, grbl, or other?
29+
IsBufferGloballySendingBackIncomingData() bool // implement this method
3430
}
35-
36-
/*
37-
// this method is a method of the struct above
38-
func (b *bufferflow) blockUntilReady() {
39-
log.Printf("Blocking until ready. Buffertype is:%v\n", b.buffertype)
40-
//time.Sleep(3000 * time.Millisecond)
41-
if b.buffertype == "dummypause" {
42-
buf := bufferflow_dummypause{Name: "blah"}
43-
buf.blockUntilReady()
44-
}
45-
log.Printf("Done blocking. Buffertype is:%v\n", b.buffertype)
46-
}
47-
48-
func (b *bufferflow) onIncomingData(data) {
49-
log.Printf("onIncomingData. data:%v", data)
50-
if b.buffertype == "dummypause" {
51-
buf := bufferflow_dummypause{Name: "blah"}
52-
buf.waitUntilReady()
53-
}
54-
}
55-
*/

bufferflow_default.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ func (b *BufferflowDefault) SeeIfSpecificCommandsShouldWipeBuffer(cmd string) bo
5757

5858
func (b *BufferflowDefault) ReleaseLock() {
5959
}
60+
61+
func (b *BufferflowDefault) IsBufferGloballySendingBackIncomingData() bool {
62+
return false
63+
}

bufferflow_dummypause.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,7 @@ func (b *BufferflowDummypause) SeeIfSpecificCommandsShouldWipeBuffer(cmd string)
6363

6464
func (b *BufferflowDummypause) ReleaseLock() {
6565
}
66+
67+
func (b *BufferflowDummypause) IsBufferGloballySendingBackIncomingData() bool {
68+
return false
69+
}

bufferflow_tinyg.go.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4168afc71fd908c7193103a54413c276c3ed0c28
1+
8859c2d879a53bffc8a7c72f0596e94adca1a07c

serialport.go.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2de759deffc7caf529b082776d4e6bac5f746e58
1+
f0a0e31a9d17e0bcc75d4d962839324678347f89

0 commit comments

Comments
 (0)