Skip to content

Commit

Permalink
converted constants
Browse files Browse the repository at this point in the history
  • Loading branch information
willindiana committed Apr 10, 2022
1 parent 4cf9383 commit 40db02e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions continuousprint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
RESTART_MAX_RETRIES_KEY = "cp_restart_on_pause_max_restarts"
RESTART_ON_PAUSE_KEY = "cp_restart_on_pause_enabled"
RESTART_MAX_TIME_KEY = "cp_restart_on_pause_max_seconds"

BED_COOLDOWN_ENABLED_KEY = "bed_cooldown_enabled"
BED_COOLDOWN_SCRIPT_KEY = "cp_bed_cooldown_script"
BED_COOLDOWN_THRESHOLD_KEY = "bed_cooldown_threshold"
BED_COOLDOWN_TIMEOUT_KEY = "bed_cooldown_timeout"

class ContinuousprintPlugin(
octoprint.plugin.SettingsPlugin,
Expand Down Expand Up @@ -74,10 +77,10 @@ def get_settings_defaults(self):
d[RESTART_MAX_RETRIES_KEY] = 3
d[RESTART_ON_PAUSE_KEY] = False
d[RESTART_MAX_TIME_KEY] = 60 * 60
d["bed_cooldown_enabled"] = False
d["cp_bed_cooldown_script"] = "; Put script to run before bed cools here\n"
d["bed_cooldown_threshold"] = 30
d["bed_cooldown_timeout"] = 60
d[BED_COOLDOWN_ENABLED_KEY] = False
d[BED_COOLDOWN_SCRIPT_KEY] = "; Put script to run before bed cools here\n"
d[BED_COOLDOWN_THRESHOLD_KEY] = 30
d[BED_COOLDOWN_TIMEOUT_KEY] = 60
return d

def _rm_temp_files(self):
Expand Down

0 comments on commit 40db02e

Please sign in to comment.