Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 4 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
View
2  doc/s3g_protocol.markdown
@@ -1077,7 +1077,7 @@ The buffer is also displayed when the clear message flag is 1. If multiple packe
The "last message in group" flag must be used for display of multi-packet messages.
Normal popping of the message screen, such as when a print is over, is ignored if the "last message in group" flag has not been received. This is because the bot thinks it is still waiting for the remainder of a message.
-if the "clear message" flag is 1, the message buffer will be cleared and any existing timeout out will be cleared.
+if the "clear message" flag is 0, the message buffer will be cleared and any existing timeout out will be cleared.
If the "wait on button" flag is 1, the message screen will clear after a user button press is received. The timeout field is still relevant if the button press is never received.
View
6 s3g/Gcode/parser.py
@@ -231,9 +231,9 @@ def DisplayMessage(self, codes, flags, comment):
"""
row = 0 # As per the gcode protocol
col = 0 # As per the gcode protocol
- clear_existing = True # As per the gcode protocol
- last_in_group = True # As per the gcode protocol
- wait_for_button = False # As per the gcode protocol
+ clear_existing = False #If false, clears the message buffer
+ last_in_group = True #If true, signifies this is the last in a group
+ wait_for_button = False #If true, signifies a button wait
self.s3g.DisplayMessage(
row,
View
2  s3g/profiles/ReplicatorDual.json
@@ -83,7 +83,7 @@
"M104 S0 T0",
"G162 X Y D500",
"M18",
- "M70 P5 ( We <3 Making Things!)",
+ "M70 P5 (We <3 Making Things!)",
"M72 P1 ( Play Ta-Da song )",
"M18 (Turn off steppers after a build)",
"(*********end End.gcode*******)"
View
2  s3g/profiles/ReplicatorSingle.json
@@ -75,7 +75,7 @@
"M104 S0 T0",
"G162 X Y D500",
"M18",
- "M70 P5 ( We <3 Making Things!)",
+ "M70 P5 (We <3 Making Things!)",
"M72 P1 ( Play Ta-Da song )",
"M18 (Turn off steppers after a build)",
"(*********end End.gcode*******)"
View
13 tests/test_parser.py
@@ -79,15 +79,20 @@ def test_disable_axes(self):
self.mock.ToggleAxes.assert_called_once_with(flags, False)
- # TODO: test for missing timeout
+ def test_display_message_missing_timeout(self):
+ codes = {}
+ flags = []
+ comment = 'asdf'
+ self.assertRaises(KeyError, self.g.DisplayMessage, codes, flags, comment)
+
def test_display_message(self):
row = 0 # As specified in the gcode protocol
col = 0 # As specified in the gcode protocol
message = 'ABCDEFG123'
timeout = 123
- clear_existing = True # As specified in the gcode protocol
- last_in_group = True # As specified in the gcode protocol
- wait_for_button = False # As specified in the gcode protocol
+ clear_existing = False
+ last_in_group = True
+ wait_for_button = False
codes = {'P' : timeout}
comment = message

No commit comments for this range

Something went wrong with that request. Please try again.