Skip to content

param_letters with no numbers after parameter do not work #32

Description

@VisComKreiser

Hey,

i've got gcode lines like:

  • T1 R
  • M1013 R

and if there is no number after the "R", i get the exception GCodeWordStrError : word 'R' value invalid

I have added the classes:

class GCodeParkReturn(GCode):
    """M1013: park/return"""
    word_key = Word('M', 1013)
    word_letter = 'M'
    param_letters = set('R')

class GCodeSwitchExtruder(GCode):
    """T1: switch extruder"""
    word_key = Word('T', 1)
    word_letter = 'T'
    param_letters = set('R')

E.g. T1 R123 does work without an issue with the added "123" after the "R"
Is there an option to allow zero parameter values? Maybe I have just missed it.

I'm testing it using text2gcodes('T1 R')

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions