From b878159a2742db29eda66010ced80a191f26cfeb Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lafreniere Date: Wed, 10 Apr 2019 16:59:01 -0400 Subject: [PATCH] Build fix Fixed test errors --- devicecommunication/CommunicationMain.py | 2 +- gcodeextractor/tests/gcode/test_listToGcode.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/devicecommunication/CommunicationMain.py b/devicecommunication/CommunicationMain.py index d4e354a..6c4242f 100644 --- a/devicecommunication/CommunicationMain.py +++ b/devicecommunication/CommunicationMain.py @@ -78,7 +78,7 @@ def sendWithAck(gcodeCommand, timeoutCom): raise RuntimeError('Command error : ' + gcodeCommand) else: commandTimeout += 1 - if commandTimeout > timeoutCom * 10: + if commandTimeout > timeoutCom * 100: raise RuntimeError('Command not executed') diff --git a/gcodeextractor/tests/gcode/test_listToGcode.py b/gcodeextractor/tests/gcode/test_listToGcode.py index 3941d77..e3740ac 100644 --- a/gcodeextractor/tests/gcode/test_listToGcode.py +++ b/gcodeextractor/tests/gcode/test_listToGcode.py @@ -52,10 +52,10 @@ class TestListToGCode(TestCase): def getExpected(coords, ySize, xSize): header = ['G28', 'G90\n'] - footer = ['\nG0 Z0', 'G28', 'M18'] + footer = ['\nG0 Z0', 'G0 X0 Y0', 'M18'] content = ['G0 X' + str(round(xSize * coords[0].getX(), 2)) + ' Y' + str(round(ySize * coords[0].getY(), 2)), - 'G0 Z3', + 'G0 Z10.5', ] for index, coord in enumerate(coords): @@ -63,7 +63,7 @@ def getExpected(coords, ySize, xSize): if coord.getX() != -1 and coord.getY() != -1: content.append('G0 X' + str(xSize * coord.getX()) + ' Y' + str(ySize * coord.getY())) if coords[index - 1].getX() == -1 and coords[index - 1].getX() == -1: - content.append('G0 Z3') + content.append('G0 Z10.5') else: content.append('G0 Z0')