Beispiel #1
0
def check_config_parameters(keyword, value):
    keyword = keyword.upper()
    if value is None:
        value = ""

    if keyword == "TEMPERATURECONTROL":
        v.process_temp = True

    if keyword == "PRINTERPROFILE":

        if len(value) != 16:
            gui.log_warning("Invalid Printer profile!  - Has invalid length (expect 16) - [{}]"
                            .format(value))
            value = ""
        if not all(char in set("0123456789ABCDEFabcdef") for char in value):
            gui.log_warning("Invalid Printer profile!  - Invalid characters  (expect 0123456789abcdef) - [{}]"
                            .format(value))
            value = ""

        if len(value) == 16:
            v.printer_profile_string = value
            gui.set_printer_id(v.printer_profile_string)
        return

    if keyword == "ACCESSORYMODE_MAF":
        v.accessory_mode = True
        gui.create_logitem("Config: Palette2 Accessory Mode Selected")
        return

    if keyword == "ACCESSORYMODE_MSF":
        v.accessory_mode = True
        v.palette_plus = True
        gui.create_logitem("Config: Palette+ Accessory Mode Selected")
        return

    if keyword == "P+LOADINGOFFSET":
        v.palette_plus_loading_offset = int(value)
        return

    if keyword == "P+PPM":
        v.palette_plus_ppm = intparameter(value)
        return

    if keyword == "SPLICEOFFSET":
        v.splice_offset = floatparameter(value)
        gui.create_logitem("Splice Offset set tofiloverride {:-5.2f}mm".format(v.splice_offset))
        return

    if keyword == "PROFILETYPEOVERRIDE":
        v.filament_type[v.set_tool] = value
        v.used_filament_types.append(v.filament_type[v.set_tool])
        v.used_filament_types = list(dict.fromkeys(v.used_filament_types))
        return

    if keyword == "EXTRUSIONMULTIPLIERCORRECTION":
        v.filament_type[v.current_tool] = floatparameter(value)
        return

    if keyword == "EXTRAENDFILAMENT":
        v.extra_runout_filament = floatparameter(value)
        gui.create_logitem("Extra filament at end of print {:-8.2f}mm".format(v.extra_runout_filament))
        return

    if keyword == "BEFORESIDEWIPEGCODE":
        v.before_sidewipe_gcode.append(value)
        return

    if keyword == "AFTERSIDEWIPEGCODE":
        v.after_sidewipe_gcode.append(value)
        return

    if keyword == "AUTOLOADINGOFFSET":
        v.autoloadingoffset = floatparameter(value)
        return

    if keyword == "AUTOADDPURGE":
        v.autoaddsplice = True
        return

    if keyword == "MINSTARTSPLICE":
        v.min_start_splice_length = floatparameter(value)
        if v.min_start_splice_length < 100:
            v.min_start_splice_length = 100
            gui.log_warning("Minimal first slice length adjusted to 100mm")
        return

    if keyword == "BEDSIZEX":
        v.bed_size_x = floatparameter(value)
        return

    if keyword == "BEDSIZEY":
        v.bed_size_y = floatparameter(value)
        return

    if keyword == "BEDORIGINX":
        v.bed_origin_x = floatparameter(value)
        return

    if keyword == "BEDORIGINY":
        v.bed_origin_y = floatparameter(value)
        return

    if keyword == "BIGBRAIN3D_BLOBSIZE":
        v.bigbrain3d_blob_size = intparameter(value)
        return

    if keyword == "BIGBRAIN3D_BLOBSPEED":
        v.bigbrain3d_blob_speed = intparameter(value)
        return

    if keyword == "BIGBRAIN3D_COOLINGTIME":
        v.bigbrain3d_blob_cooling_time = intparameter(value)
        return

    if keyword == "BIGBRAIN3D_PURGEPOSITION":
        v.bigbrain3d_x_position = floatparameter(value)
        return

    if keyword == "BIGBRAIN3D_PURGEYPOSITION":
        v.bigbrain3d_y_position = floatparameter(value)
        return

    if keyword == "BIGBRAIN3D_MOTORPOWER_HIGH":
        v.bigbrain3d_motorpower_high = intparameter(value)
        return

    if keyword == "BIGBRAIN3D_MOTORPOWER_NORMAL":
        v.bigbrain3d_motorpower_normal = intparameter(value)
        return

    if keyword == "BIGBRAIN3D_NUMBER_OF_WHACKS":
        v.bigbrain3d_whacks = intparameter(value)
        return

    if keyword == "BIGBRAIN3D_PRIME_BLOBS":
        v.bigbrain3d_prime = intparameter(value)
        return

    if keyword == "BIGBRAIN3D_FAN_OFF_PAUSE":
        v.bigbrain3d_fanoffdelay = intparameter(value)
        return

    if keyword == "BIGBRAIN3D_LEFT_SIDE":
        v.bigbrain3d_left = -1
        return

    if keyword == "BIGBRAIN3D_ENABLE":
        if not v.wipe_remove_sparse_layers:
            v.bigbrain3d_purge_enabled = True
            gui.log_warning("BIGBRAIN3D Will only work with installed hardware on a Prusa Printer")
        else:
            gui.log_warning("BIGBRAIN3D mode not compatible with sparse wipe tower in PS")
        return

    if keyword == "BIGBRAIN3D_SMARTFAN":
        v.bigbrain3d_smartfan = True
        return

    if keyword == "MINSPLICE":
        v.min_splice_length = floatparameter(value)
        if v.min_splice_length < 70:
            v.min_splice_length = 70
            gui.log_warning("Minimal slice length adjusted to 70mm")
        return

    # LINEAR PING removed

    if keyword == "LINEARPINGLENGTH":
        v.ping_interval = floatparameter(value)
        v.ping_length_multiplier = 1.0
        if v.ping_interval < 300:
            v.ping_interval = 300
            gui.log_warning("Minimal Linear Ping distance is 300mm!  Your config stated: {}".format(line))
        gui.create_logitem("Linear Ping interval of  {:-6.2f}mm".format(v.ping_interval))
        return

    # SIDE TRANSITIONING
    if keyword == "SIDEWIPELOC":
        v.side_wipe_loc = value
        return

    if keyword == "PURGETOPSPEED":
        v.purgetopspeed = int(floatparameter(value))
        gui.create_logitem("Purge Max speed set to {:.0f}mm/min ({}mm/s)".format(v.purgetopspeed, v.purgetopspeed / 60))
        return

    if keyword == "WIPEFEEDRATE":
        v.wipe_feedrate = floatparameter(value)
        return

    if keyword == "SIDEWIPEMINY":
        v.sidewipe_miny = floatparameter(value)
        return

    if keyword == "SIDEWIPEMAXY":
        v.sidewipe_maxy = floatparameter(value)
        return

    if keyword == "SIDEWIPECORRECTION":
        v.sidewipe_correction = floatparameter(value)
        if v.sidewipe_correction < 0.9 or v.sidewipe_correction > 1.10:
            v.sidewipe_correction = 1.0
        return

    if keyword == "PURGETOWERDELTA":
        parm = abs(floatparameter(value))
        if parm > 0.001 and v.wipe_remove_sparse_layers:
            gui.log_warning("TOWER DELTA feature mode not compatible with sparse wipe tower in PS")
            v.max_tower_delta = 0.0
        else:
            if parm != float(0):
                v.max_tower_z_delta = abs(floatparameter(value))
                gui.create_logitem("Max Purge Tower Delta set to {:-2.2f}mm".format(v.max_tower_z_delta))


        return

    if keyword == "FULLPURGEREDUCTION":
        if not v.wipe_remove_sparse_layers:
            gui.create_logitem("Full purge reduction configured")
            v.full_purge_reduction = True
        else:
            gui.log_warning("FULL PURGE TOWER REDUCTION feature mode not compatible with sparse wipe tower in PS")
            v.full_purge_reduction = False
        return

    if keyword == "CHECKVERSION":
        import p2pp.checkversion as cv
        import version
        latest = cv.get_version(cv.MASTER)
        if latest > version.Version:
            gui.create_logitem("New development version of P2PP available ({})".format(latest), "red", False, "2.0")
        else:
            if (latest < version.Version):
                latest = cv.get_version(cv.DEV)
                if (latest > version.Version):
                    gui.create_logitem("New development version of P2PP available ({})".format(latest), "red", False,
                                       "2.0")

    # Program parameters
    if keyword == "NOGUI":
        v.gui = False
        return

    if keyword == "CONSOLEWAIT":
        v.consolewait = True
        return

    if keyword == "IGNOREWARNINGS":
        v.ignore_warnings = True
        return

    if keyword == "ABSOLUTEEXTRUDER":
        v.absolute_extruder = True
        gui.create_logitem("Convert to absolute extrusion parameters")
        return

    if keyword == "DEBUGTCOMMAND":
        v.debug_leaveToolCommands = True
        gui.log_warning("DEBUGTCOMMAND ACTIVE - File will not print correctly!!")
        return
Beispiel #2
0
import p2pp.checkversion as checkversion
import p2pp.mcf as mcf
import p2pp.variables as v
import version as ver
import traceback
import p2pp.gui as gui

v.version = ver.Version
if len(sys.argv) == 1:
    try:
        platformD = platform.system()

        gui.setfilename('')
        gui.form.label_5.setText("")
        MASTER_VERSION = checkversion.get_version(checkversion.MASTER)

        if MASTER_VERSION != "0.0":
            if v.version < MASTER_VERSION:
                v.version = "Version Check: New release {} available (Current version {})".format(
                    MASTER_VERSION, ver.Version)
                color = "red"
            else:
                v.version = "Version Check: Current version {} (Version up to date)".format(
                    ver.Version)
                color = "green"

            gui.create_logitem(v.version, color)
        gui.app.sync()
        gui.create_emptyline()
        gui.create_logitem(
Beispiel #3
0
def check_config_parameters(line):
    # BASIC SETUP  (material setup handled in mcf.py

    # -p takes precedence over printer defined in file
    if "PRINTERPROFILE" in line:
        tmp_string = stringparameter(line)
        if len(tmp_string) != 16:
            gui.log_warning(
                "Invalid Printer profile!  - Has invalid length (expect 16) - [{}]"
                .format(tmp_string))
            tmp_string = ""
        if not all(char in set("0123456789ABCDEFabcdef")
                   for char in tmp_string):
            gui.log_warning(
                "Invalid Printer profile!  - Invalid characters  (expect 0123456789abcdef) - [{}]"
                .format(tmp_string))
            tmp_string = ""

        if len(tmp_string) == 16:
            v.printer_profile_string = tmp_string
            gui.set_printer_id(v.printer_profile_string)
        return

    if "ACCESSORYMODE_MAF" in line:
        v.accessory_mode = True
        gui.create_logitem("Config: Palette2 Accessory Mode Selected")

    if "ACCESSORYMODE_MSF" in line:
        v.accessory_mode = True
        v.palette_plus = True
        gui.create_logitem("Config: Palette+ Accessory Mode Selected")

    if "P+LOADINGOFFSET" in line:
        v.palette_plus_loading_offset = int(floatparameter(line))

    if "P+PPM" in line:
        v.palette_plus_ppm = int(floatparameter(line))

    if "SPLICEOFFSET" in line:
        v.splice_offset = floatparameter(line)
        gui.create_logitem("Splice Offset set to {:-5.2f}mm".format(
            v.splice_offset))
        return

    if "PROFILETYPEOVERRIDE" in line:
        v.filament_type[v.current_tool] = stringparameter(line)
        v.used_filament_types.append(v.filament_type[v.current_tool])
        v.used_filament_types = list(dict.fromkeys(v.used_filament_types))
        return

    if "EXTRUSIONMULTIPLIERCORRECTION" in line:
        v.filament_type[v.current_tool] = floatparameter(line)
        return

    if "EXTRAENDFILAMENT" in line:
        v.extra_runout_filament = floatparameter(line)
        gui.create_logitem("Extra filament at end of print {:-8.2f}mm".format(
            v.extra_runout_filament))
        return

    if "BEFORESIDEWIPEGCODE" in line:
        v.before_sidewipe_gcode.append(stringparameter(line))
        return

    if "AFTERSIDEWIPEGCODE" in line:
        v.after_sidewipe_gcode.append(stringparameter(line))
        return

    if "MINSTARTSPLICE" in line:
        v.min_start_splice_length = floatparameter(line)
        if v.min_start_splice_length < 100:
            v.min_start_splice_length = 100
            gui.log_warning("Minimal first slice length adjusted to 100mm")
        return

    if "BEDSIZEX" in line:
        v.bed_size_x = floatparameter(line)
        return
    if "BEDSIZEY" in line:
        v.bed_size_y = floatparameter(line)
        return
    if "BEDORIGINX" in line:
        v.bed_origin_x = floatparameter(line)
        return
    if "BEDORIGINY" in line:
        v.bed_origin_y = floatparameter(line)
        return

    if "BIGBRAIN3D_BLOBSIZE" in line:
        v.bigbrain3d_blob_size = int(floatparameter(line))

    if "BIGBRAIN3D_COOLINGTIME" in line:
        v.bigbrain3d_blob_cooling_time = int(floatparameter(line))

    if "BIGBRAIN3D_PURGEPOSITION" in line:
        v.bigbrain3d_x_position = floatparameter(line)

    if "BIGBRAIN3D_MOTORPOWER_HIGH" in line:
        v.bigbrain3d_motorpower_high = int(floatparameter(line))

    if "BIGBRAIN3D_MOTORPOWER_NORMAL" in line:
        v.bigbrain3d_motorpower_normal = int(floatparameter(line))

    if "BIGBRAIN3D_ENABLE" in line:
        v.bigbrain3d_purge_enabled = True
        gui.log_warning(
            "BIGBRAIN3D Will only work with installed hardware on a Prusa Printer"
        )

    if "BIGBRAIN3D_SMARTFAN" in line:
        v.bigbrain3d_smartfan = True

    if "MINSPLICE" in line:
        v.min_splice_length = floatparameter(line)
        if v.min_splice_length < 70:
            v.min_splice_length = 70
            gui.log_warning("Minimal slice length adjusted to 70mm")
        return

    # LINEAR PING removed

    if "LINEARPINGLENGTH" in line:
        v.ping_interval = floatparameter(line)
        v.ping_length_multiplier = 1.0
        if v.ping_interval < 300:
            v.ping_interval = 300
            gui.log_warning(
                "Minimal Linear Ping distance is 300mm!  Your config stated: {}"
                .format(line))
        gui.create_logitem("Linear Ping interval of  {:-6.2f}mm".format(
            v.ping_interval))
        return

    if line.endswith("LINEARPING"):
        gui.log_warning(
            "LINEARPING deprecated, use LINEARPINGLENGTH  parameter instead")
        return

    # SIDE TRANSITIONING
    if "SIDEWIPELOC" in line:
        v.side_wipe_loc = stringparameter(line)
        return

    if "WIPEFEEDRATE" in line:
        v.wipe_feedrate = floatparameter(line)
        return

    if "SIDEWIPEMINY" in line:
        v.sidewipe_miny = floatparameter(line)
        return

    if "SIDEWIPEMAXY" in line:
        v.sidewipe_maxy = floatparameter(line)
        return

    if "SIDEWIPECORRECTION" in line:
        v.sidewipe_correction = floatparameter(line)
        if v.sidewipe_correction < 0.9 or v.sidewipe_correction > 1.10:
            v.sidewipe_correction = 1.0
        return

    if "PURGETOWERDELTA" in line:
        if abs(floatparameter(line)) != abs(float(0)):
            v.max_tower_z_delta = abs(floatparameter(line))
            gui.create_logitem(
                "Max Purge Tower Delta set to {:-2.2f}mm".format(
                    v.max_tower_z_delta))
        return
    if "FULLPURGEREDUCTION" in line:
        gui.create_logitem("Full purge reduction configured")
        v.full_purge_reduction = True

    if line.endswith("CHECKVERSION"):
        import p2pp.checkversion as cv
        import version
        latest = cv.get_version(cv.MASTER)
        if latest > version.Version:
            gui.create_logitem(
                "New development version of P2PP available ({})".format(
                    latest), "red", False, "2.0")
        else:
            if (latest < version.Version):
                latest = cv.get_version(cv.DEV)
                if (latest > version.Version):
                    gui.create_logitem(
                        "New development version of P2PP available ({})".
                        format(latest), "red", False, "2.0")

    # REPRAP COMPATIBILITY
    if "REPRAPCOMPATIBLE" in line:
        v.reprap_compatible = True
        return

    # Program parameters
    if "NOGUI" in line:
        v.gui = False
        return

    if "CONSOLEWAIT" in line:
        v.consolewait = True

    if "IGNOREWARNINGS" in line:
        v.ignore_warnings = True

    if "ABSOLUTEEXTRUDER" in line:
        v.absolute_extruder = True
        gui.create_logitem("Convert to absolute extrusion parameters")
Beispiel #4
0
def check_config_parameters(keyword, value):
    keyword = keyword.upper().strip()

    if value is None:
        value = ""

    # allows for delaying the change of temperature until after the putge block
    # not sure if this should stay in future releases.   To be evaluated
    #  low complexity, but it adds a waiting position calculation which moves off the regular path.
    if keyword == "TEMPERATURECONTROL":
        v.process_temp = True

    # saves the unprocessed file, so it can be sent for processing simulation in case of errors
    if keyword == "SAVEUNPROCESSED":
        v.save_unprocessed = True

    # enable the preheat function on the Palette 3
    if keyword == "P3_PROCESSPREHEAT":
        v.p3_process_preheat = True

    # defines the printer profile for config storage on the Palette hardware
    if keyword == "PRINTERPROFILE":
        value = value.strip(" ")
        _idlen = 16
        if v.palette3:
            _idlen = 32

        if len(value) != _idlen:
            gui.log_warning(
                "Invalid Printer profile!  - Has invalid length (expect {}) - [{}]"
                .format(_idlen, value))
            value = ""

        if not all(char in set("0123456789ABCDEFabcdef") for char in value):
            gui.log_warning(
                "Invalid Printer profile!  - Invalid characters  (expect 0123456789abcdef) - [{}]"
                .format(value))
            value = ""

        if len(value) <= _idlen:
            v.printer_profile_string = value
            return

    # toggles hardware to Palette 3 - sets the number of inputs, output format.
    if keyword == "PALETTE3":
        if len(v.printer_profile_string) == 16:
            gui.log_warning(
                "Invalid Printer profile!  - P3 printer profile should be 32 characters ({})"
                .format(v.printer_profile_string))

        v.palette3 = True
        v.colors = 4
        # Min first splice length for P3 == 130
        v.min_start_splice_length = max(v.min_start_splice_length,
                                        v.min_first_splice_p3)
        v.min_splice_length = max(v.min_splice_length, v.min_splice_p3)
        check_splice_table()
        return

    # toggles hardware to Palette 3 Pro - sets the number of inputs, output format.
    if keyword == "PALETTE3_PRO":
        if len(v.printer_profile_string) == 16:
            gui.log_warning(
                "Invalid Printer profile!  - P3 printer profile should be 32 characters"
            )

        v.palette3 = True
        v.colors = 8
        # Min first splice length for P3 == 130
        v.min_start_splice_length = max(v.min_start_splice_length,
                                        v.min_first_splice_p3)
        v.min_splice_length = max(v.min_splice_length, v.min_splice_p3)
        check_splice_table()
        return

    if keyword == "P3_HOSTNAME":
        v.p3_hostname = value

    if keyword == "P3_PROFILENAME":
        v.p3_printername = value

    if keyword == "P3_UPLOADFILE":
        v.uploadfile = True

    if keyword == "P3_SHOWPRINTERPAGE":
        v.showwebbrowser = True

    # toggles Palette 3 accessory mode = added 22/02/2022
    if keyword == "ACCESSORYMODE_MAFX":
        v.accessory_mode = True
        gui.create_logitem("Config: Palette3 Accessory Mode Selected")
        return

    # toggles Palette 2 accessory mode
    if keyword == "ACCESSORYMODE_MAF":
        v.accessory_mode = True
        v.colors = 4
        gui.create_logitem("Config: Palette2 Accessory Mode Selected")
        check_splice_table()
        return

    # toggles Palette + Accessory Mode
    if keyword == "ACCESSORYMODE_MSF":
        v.accessory_mode = True
        v.palette_plus = True
        v.colors = 4
        gui.create_logitem("Config: Palette+ Accessory Mode Selected")
        check_splice_table()
        return

    # Loading Offset - Required for the P+ configuration, take from existing print after callibration with Chroma
    if keyword == "P+LOADINGOFFSET":
        v.palette_plus_loading_offset = int(float(value))
        return

    # PPM  - Required for the P+ configuration, take from existing print after callibration with Chroma
    if keyword == "P+PPM":
        v.palette_plus_ppm = floatparameter(value)
        return

    # Splice offset defines how much the start of the toolchange is located after the position of the toolchange.
    # in general, you want this value as small as possible BUT this value is the buffer you need when material is consumed
    # at a too high rate, so putting it very low may result in early transition
    if keyword == "SPLICEOFFSET":
        v.splice_offset = floatparameter(value)
        gui.create_logitem("SPLICE OFFSET: {:-5.2f}mm".format(v.splice_offset))
        return

    # This parameter sets the amount of extra filament that is generated at the end of the print, to allow for the filament to still
    # engage with the motor gears.   This should be at least the plength of the path from the nozzel to the gears of the extruder motor
    if keyword == "EXTRAENDFILAMENT":
        v.extra_runout_filament = floatparameter(value)
        gui.create_logitem("Extra filament at end of print {:-8.2f}mm".format(
            v.extra_runout_filament))
        return

    # This parameter specified the minimal amount of total filament  USE ???
    if keyword == "P3_MINIMALTOTALFILAMENT":
        v.minimaltotal_filament = floatparameter(value)
        gui.create_logitem("Minimal ilament length {:-8.2f}mm".format(
            v.minimaltotal_filament))
        return

    # Specially Added for Manmeet - Not  documented
    if keyword == "MANUAL_SWAP":
        v.manual_filament_swap = True
        gui.create_logitem("Manual filament swap in place.")
        return

    # May be removed ??
    if keyword == "BEFORESIDEWIPEGCODE":
        v.before_sidewipe_gcode.append(value)
        return

    # May be removed ??
    if keyword == "AFTERSIDEWIPEGCODE":
        v.after_sidewipe_gcode.append(value)
        return

    # unused ???
    if keyword == "AUTOLOADINGOFFSET":
        v.autoloadingoffset = floatparameter(value)
        return

    # autmoaticall adds purge in case of short splices when fullpruereduction is applied
    if keyword == "AUTOADDPURGE":
        v.autoaddsplice = True
        return

    # special reauest feature - not documents - allows for pings shorter than 300 mm
    if keyword == "POWERCHAOS":  # Special feature request to allow sub 300 mm pings
        v.powerchaos = True
        return

    # sets the minimal first splice length (100 / 130 for P2/P3 resp)
    if keyword == "MINSTARTSPLICE":
        v.min_start_splice_length = floatparameter(value)
        if v.palette3:
            if v.min_start_splice_length < v.min_first_splice_p3:
                gui.log_warning(
                    "Minimal first slice length adjusted to {}mm for palette 3"
                    .format(v.min_first_splice_p3))
                v.min_start_splice_length = v.min_first_splice_p3

        if v.min_start_splice_length < 100:
            v.min_start_splice_length = 100
            gui.log_warning("Minimal first slice length adjusted to 100mm")
        return

    # firmware purge support
    if keyword == "FIRMWARE_PURGE_LENGTH":
        v.firmwarepurge = intparameter(value)
        return

    # SECTION BLOBSTER and BB3D

    # BB3D/BLOBSTER config parm
    if keyword in ["BIGBRAIN3D_BLOBSIZE", "BLOBSTER_BLOBSIZE"]:
        v.mechpurge_blob_size = intparameter(value)
        return

    # BLOBSTER config parm
    if keyword in ["BLOBSTER_ENGAGETIME"]:
        v.blobster_engagetime = intparameter(value)
        return

    # BB3D config parm
    if keyword == "BIGBRAIN3D_SINGLEBLOB":
        v.single_blob = True
        return

    # BB3D/blobster config parm
    if keyword in ["BIGBRAIN3D_BLOBSPEED", "BLOBSTER_BLOBSPEED"]:
        v.mechpurge_blob_speed = intparameter(value)
        return

    # BB3D/blobster config parm
    if keyword in ["BIGBRAIN3D_COOLINGTIME", "BLOBSTER_COOLINGTIME"]:
        v.mechpurge_blob_cooling_time = intparameter(value)
        return

    # BB3D/blobster config parm
    if keyword in ["BIGBRAIN3D_PURGEPOSITION", "BLOBSTER_PURGEPOSITION"]:
        v.mechpurge_x_position = floatparameter(value)
        return

    # BB3D config parm
    if keyword == "BIGBRAIN3D_PURGEYPOSITION":
        v.bigbrain3d_y_position = floatparameter(value)
        return

    # BB3D config parm
    if keyword == "BIGBRAIN3D_MOTORPOWER_HIGH":
        v.bigbrain3d_motorpower_high = intparameter(value)
        return

    # BB3D config parm
    if keyword == "BIGBRAIN3D_MOTORPOWER_NORMAL":
        v.bigbrain3d_motorpower_normal = intparameter(value)
        return

    # BB3D config parm
    if keyword == "BIGBRAIN3D_NUMBER_OF_WHACKS":
        v.bigbrain3d_whacks = intparameter(value)
        return

    # BB3D config parm
    if keyword in ["BIGBRAIN3D_PRIME_BLOBS", "BLOBSTER_PRIME_BLOBS"]:
        v.mechpurge_prime_blobs = intparameter(value)
        return

    # BB3D config parm
    if keyword == "BIGBRAIN3D_FAN_OFF_PAUSE":
        v.bigbrain3d_fanoffdelay = intparameter(value)
        return

    # BB3D config parm
    if keyword == "BIGBRAIN3D_LEFT_SIDE":
        v.bigbrain3d_left = -1
        return

    # BB3D/BLOBSTER config parm
    if keyword in ["BIGBRAIN3D_CLEARANCE_MM", "BLOBSTER_CLEARANCE_MM"]:
        v.mechpurge_minimalclearenceheight = floatparameter(value)
        return

    # BB3D/BLBSTER config parm
    if keyword in ["BIGBRAIN3D_RETRACT", "BLOBSTER_RETRACT"]:
        v.mechpurge_retract = floatparameter(value)
        return

    # BB3D/BLOBSTER config parm
    if keyword == "BIGBRAIN3D_ENABLE":
        if not v.wipe_remove_sparse_layers:
            v.bigbrain3d_purge_enabled = True
            gui.create_logitem(
                "<b>BIGBRAIN3D Will only work with installed hardware on a Prusa Printer</b>"
            )
        else:
            gui.log_warning(
                "<b>BIGBRAIN3D mode not compatible with sparse wipe tower in PS</b>"
            )
        return

    if keyword == "BLOBSTER_ADVANCED":
        v.blobster_advanced = True
        gui.create_logitem("<b>BLOBSTER ADVANCED MODE ENABLED</b>")
        return

    if keyword == "BLOBSTER_ADVANCED_LENGTH":
        v.blobster_advanced_length = []
        fields = value.split(",")
        for i in fields:
            try:
                v.blobster_advanced_length.append(abs(int(i)))
            except ValueError:
                gui.log_warning(
                    "BLOBSTER_ADVANCED_LENGTH parameter accepts a list of interger values (length in mm)"
                )
        return

    if keyword == "BLOBSTER_ADVANCED_SPEED":
        v.blobster_advanced_speed = []
        fields = value.split(",")
        for i in fields:
            try:
                v.blobster_advanced_speed.append(abs(int(i)))
            except ValueError:
                gui.log_warning(
                    "BLOBSTER_ADVANCED_SPEEDH parameter accepts a list of interger values (length in mm)"
                )
        return

    if keyword == "BLOBSTER_ADVANCED_FAN":
        v.blobster_advanced_fan = []
        fields = value.split(",")
        for i in fields:
            try:
                v.blobster_advanced_fan.append(
                    int(min(abs(int(i)), 100) * 2.55))
            except ValueError:
                gui.log_warning(
                    "BLOBSTER_ADVANCED_FAN parameter accepts a list of interger values (percentage 0-100)"
                )
        return

    # BB3D/BLOBSTER config parm
    if keyword == "BLOBSTER_ENABLE":
        if not v.wipe_remove_sparse_layers:
            v.blobster_purge_enabled = True
            v.mechpurge_blob_size = 180
            v.mechpurge_minimalclearenceheight = 30
            v.mechpurge_blob_cooling_time = 60

            gui.create_logitem(
                "<b>BLOBSTER Will only work with installed hardware on a Prusa Printer</b>"
            )
        else:
            gui.log_warning(
                "<b>BLOBSTER mode not compatible with sparse wipe tower in PS</b>"
            )
        return

    # BB3D/BLOBSTER config parm
    if keyword in ["BIGBRAIN3D_SMARTFAN", "BLOBSTER_SMARTFAN"]:
        v.mechpurge_smartfan = True
        return

    # defines the minimal splice length ( this is the safe length to make sure a splice is only heated once (70/90 for P2/P3 resp)
    if keyword == "MINSPLICE":
        v.min_splice_length = floatparameter(value)
        if v.palette3:
            if v.min_splice_length < v.min_splice_p3:
                gui.log_warning(
                    "Minimal slice length adjusted to {}mm for palette 3".
                    format(v.min_splice_p3))
                v.min_splice_length = v.min_splice_p3

        if v.min_splice_length < 70:
            v.min_splice_length = 70
            gui.log_warning("Minimal slice length adjusted to 70mm")
        return

    # LINEAR PING removed

    # set the distance between pings (same length every time), instead of increasing ping lengths
    if keyword == "LINEARPINGLENGTH":
        v.ping_interval = floatparameter(value)
        v.ping_length_multiplier = 1.0
        if not v.powerchaos:
            if v.ping_interval < 100:
                v.ping_interval = 100
                gui.log_warning(
                    "Minimal Linear Ping distance is 300mm!  Your config stated: {}"
                    .format(value))
            gui.create_logitem("Linear Ping interval of  {:-6.2f}mm".format(
                v.ping_interval))
        return

    # Set the location for the side wipes
    if keyword == "SIDEWIPELOC":
        v.side_wipe_loc = value
        return

    # define a Z-Hop for jumps to the wipe location
    if keyword == "SIDEWIPEZHOP":
        v.addzop = floatparameter(value)
        gui.create_logitem("Side Wipe ZHOP of {:3.2f}mm".format(v.addzop))

    # maybe removed??
    if keyword == "SIDEWIPEZHOP_SKIPRETURN":
        v.sidewipe_delay_zreturn = True

    # set the highest top speed for purging
    if keyword == "PURGETOPSPEED":
        v.purgetopspeed = int(floatparameter(value))

        # if parameter specified is below 200 then the value is assumed mm/sec and is converted to mm/min
        if v.purgetopspeed < 200:
            v.purgetopspeed = v.purgetopspeed * 60

        gui.create_logitem(
            "Purge Max speed set to {:.0f}mm/min ({}mm/s)".format(
                v.purgetopspeed, v.purgetopspeed / 60))
        return

    # set the wipe feedrate
    if keyword == "WIPEFEEDRATE":
        v.wipe_feedrate = floatparameter(value)
        return

    # define the sidewipe minimal and macimal Y position
    if keyword == "SIDEWIPEMINY":
        v.sidewipe_miny = floatparameter(value)
        return

    # define the sidewipe minimal and macimal Y position
    if keyword == "SIDEWIPEMAXY":
        v.sidewipe_maxy = floatparameter(value)
        return

    # define a extrusion multiplier for sidewipe.  needed???
    if keyword == "SIDEWIPECORRECTION":
        v.sidewipe_correction = floatparameter(value)
        if v.sidewipe_correction < 0.9 or v.sidewipe_correction > 1.10:
            v.sidewipe_correction = 1.0
        return

    # apply delta (similar to sparse layer removal in PS2.4
    if keyword == "PURGETOWERDELTA":
        parm = abs(floatparameter(value))
        if parm > 0.001 and v.wipe_remove_sparse_layers:
            gui.log_warning(
                "TOWER DELTA feature mode not compatible with sparse wipe tower in PS"
            )
            v.max_tower_delta = 0.0
        else:
            if parm != float(0):
                v.max_tower_z_delta = abs(floatparameter(value))
                gui.create_logitem(
                    "Max Purge Tower Delta set to {:-2.2f}mm".format(
                        v.max_tower_z_delta))
        return

    # simlir to tower delta but rather reduces the base of the tower to make it growmore evenly with the print
    if keyword == "FULLPURGEREDUCTION":
        if not v.wipe_remove_sparse_layers:
            gui.create_logitem("Full purge reduction configured")
            v.full_purge_reduction = True
            v.needpurgetower = True
        else:
            gui.log_warning(
                "FULL PURGE TOWER REDUCTION feature mode not compatible with sparse wipe tower in PS"
            )
            v.full_purge_reduction = False
        return

    # chech the version of P2PP on startup (requires an internet connection)
    if keyword == "CHECKVERSION":
        import p2pp.checkversion as cv
        import version
        latest = cv.get_version(cv.MASTER)
        if latest:
            if latest > version.Version:
                gui.create_logitem(
                    "New version of P2PP available ({})".format(latest), "red",
                    False, "2.0")

    # co be removed ?
    if keyword == "DO_NOT_GENERATE_M0":
        v.generate_M0 = False
        return

    # wait for user feedback at the ned of processing
    if keyword == "CONSOLEWAIT":
        v.consolewait = True
        return

    if keyword == "FINISH_MOVES_M400":
        v.finish_moves = "M400"
        v.replace_G4S0 = True

    # process toolchanges the KLIPPER way
    if keyword == "KLIPPER_TOOLCHANGE":
        v.klipper = True
        return

    # close and continue even if there are warnings
    if keyword == "IGNOREWARNINGS":
        v.ignore_warnings = True
        return

    # p2pp_process_file a gcode file with absolute extrusios instead of relative ones
    if keyword == "ABSOLUTEEXTRUDER":
        v.absolute_extruder = True
        gui.create_logitem("Convert to absolute extrusion parameters")
        return

    # unused !!! to be removed.
    if keyword == "DEBUGTCOMMAND":
        v.debug_leaveToolCommands = True
        gui.log_warning(
            "DEBUGTCOMMAND ACTIVE - File will not print correctly!!")
        return