Skip to content

Commit 724de59

Browse files
committed
remove timedbinary: it's the same as timedraw except for the casting
1 parent 37cf997 commit 724de59

File tree

3 files changed

+3
-88
lines changed

3 files changed

+3
-88
lines changed

β€Žbufferflow_timedbinary.go

Lines changed: 0 additions & 75 deletions
This file was deleted.

β€Žserialport.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (p *serport) reader(buftype string) {
118118

119119
data := ""
120120
switch buftype {
121-
case "timedraw", "timed", "timedbinary":
121+
case "timedraw", "timed":
122122
data = string(bufferPart[:n])
123123
// give the data to our bufferflow so it can do it's work
124124
// to read/translate the data to see if it wants to block
@@ -301,8 +301,6 @@ func spHandlerOpen(portname string, baud int, buftype string) {
301301
bw = NewBufferflowTimed(portname, h.broadcastSys)
302302
case "timedraw":
303303
bw = NewBufferflowTimedRaw(portname, h.broadcastSys)
304-
case "timedbinary":
305-
bw = NewBufferflowTimedBinary(portname, h.broadcastSys)
306304
case "default":
307305
bw = NewBufferflowDefault(portname, h.broadcastSys)
308306
default:

β€Žtest/test_ws.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ def test_open_serial_timedraw(socketio):
4545
general_test_serial(socketio, "timedraw")
4646

4747

48-
@pytest.mark.skipif(
49-
running_on_ci(),
50-
reason="VMs have no serial ports",
51-
)
52-
def test_open_serial_timedbinary(socketio):
53-
general_test_serial(socketio, "timedbinary")
54-
55-
5648
def general_test_serial(socketio, buffertype):
5749
port = "/dev/ttyACM0"
5850
global message
@@ -75,7 +67,7 @@ def general_test_serial(socketio, buffertype):
7567
# check if the send command has been registered
7668
assert any("send " + port + " /\"ciao/\"" in i for i in message)
7769
#check if message has been sent back by the connected board
78-
if buffertype in ("timedbinary", "timedraw"):
70+
if buffertype == "timedraw":
7971
output = decode_output(extract_serial_data(message))
8072
elif buffertype in ("default", "timed"):
8173
output = extract_serial_data(message)
@@ -89,7 +81,7 @@ def general_test_serial(socketio, buffertype):
8981
print(message)
9082
# check if the send command has been registered
9183
assert any("send " + port + " /\"πŸ§€πŸ§€πŸ§€πŸ§€πŸ§€πŸ§€πŸ§€πŸ§€πŸ§€πŸ§€/\"" in i for i in message)
92-
if buffertype in ("timedbinary", "timedraw"):
84+
if buffertype == "timedraw":
9385
output = decode_output(extract_serial_data(message))
9486
elif buffertype in ("default", "timed"):
9587
output = extract_serial_data(message)

0 commit comments

Comments
Β (0)