Merge commit 'f433251955628411d71bc69ba5dc8125b6ee5c95' into devel

This commit is contained in:
thelastWallE 2021-05-04 01:17:35 +02:00
commit db14dfbdea
8 changed files with 99 additions and 583 deletions

View File

@ -128,7 +128,8 @@ class KlipperPlugin(
old_config="",
logpath="/tmp/klippy.log",
reload_command="RESTART",
navbar=True,
shortStatus_navbar=True,
shortStatus_sidebar=True,
parse_check=False,
fontsize=9
)
@ -232,7 +233,7 @@ class KlipperPlugin(
)
def get_settings_version(self):
return 2
return 3
def on_settings_migrate(self, target, current):
if current is None:
@ -279,9 +280,17 @@ class KlipperPlugin(
settings.remove(["probePoints"])
if settings.has(["configPath"]):
self.log_info("migrate setting for: configPath")
settings.set(["config_path"], settings.get(["configPath"]))
settings.remove(["configPath"])
if target is 3 and current is 2:
settings = self._settings
if settings.has(["configuration", "navbar"]):
self.log_info("migrate setting for: configuration/navbar")
settings.set(["configuration", "shortStatus_navbar"], settings.get(["configuration", "navbar"]))
settings.remove(["configuration", "navbar"])
# -- Template Plugin
def get_template_configs(self):
@ -516,12 +525,14 @@ class KlipperPlugin(
def log_debug(self, message):
self._octoklipper_logger.debug(message)
self._logger.info(message)
# sends a message to frontend(in klipper.js -> self.onDataUpdaterPluginMessage) and write it to the console.
# _mtype, subtype=debug/info, title of message, message)
self.send_message("console", "debug", message, message)
def log_error(self, error):
self._octoklipper_logger.error(error)
self._logger.info(error)
self.send_message("log", "error", error, error)
def file_exist(self, filepath):
@ -542,23 +553,8 @@ class KlipperPlugin(
def validate_configfile(self, dataToBeValidated):
"""
--->For now this just checks if the given data can be parsed<----
From https://www.opensourceforu.com/2015/03/practical-python-programming-writing-a-config-file-checker/
Validates a given Config File in filetobevalidated against a correct config file pointed to by goldenfilepath
returns a list of erroneous lines as a list[strings]
if config file is fine, it should return an empty list
--->SyntaxCheck for a given data<----
"""
#len(ValidateFile('c:\example.cfg', 'c:\example.cfg' ))== 0
# learn golden file
#__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
#goldenfilepath = os.path.join(__location__, "goldenprinter.cfg")
#goldenconfig = ConfigParser.ConfigParser()
# dataToValidated.read(goldenfilepath)
# learn file to be validated
try:
dataToValidated = configparser.RawConfigParser(strict=False)
@ -617,23 +613,6 @@ class KlipperPlugin(
self._parsing_check_response = True
return True
#incorrectlines = []
# for section in dataToValidated.sections():
# #check each key is present in corresponding golden section
# for key in dataToValidated.options(section):
# if not goldenconfig.has_option(section,key):
# incorrectlines.append(key + "=" + dataToValidated.get(section,key))
# # print incorrect lines
# if len(incorrectlines) > 0 :
# self.send_message("errorPopUp","warning", "OctoKlipper Settings", "Invalid Klipper config file: " + str(incorrectlines))
# for k in incorrectlines:
# print k
# self._logger.error(
# "Error: Invalid Klipper config line: {}".format(str(k))
# )
# return incorrectlines
__plugin_name__ = "OctoKlipper"
__plugin_pythoncompat__ = ">=2.7,<4"

View File

@ -1,519 +0,0 @@
# Golden printer.cfg to check against. This should contain all settings under each section that are available.
[stepper_x]
step_pin:
# Step GPIO pin (triggered high). This parameter must be provided.
dir_pin:
# Direction GPIO pin (high indicates positive direction). This
# parameter must be provided.
enable_pin:
# Enable pin (default is enable high; use ! to indicate enable
# low). If this parameter is not provided then the stepper motor
# driver must always be enabled.
rotation_distance:
# Distance (in mm) that the axis travels with one full rotation of
# the stepper motor. This parameter must be provided.
microsteps:
# The number of microsteps the stepper motor driver uses. This
# parameter must be provided.
full_steps_per_rotation: 200
# The number of full steps for one rotation of the stepper motor.
# Set this to 200 for a 1.8 degree stepper motor or set to 400 for a
# 0.9 degree motor. The default is 200.
gear_ratio:
# The gear ratio if the stepper motor is connected to the axis via a
# gearbox. For example, one may specify "5:1" if a 5 to 1 gearbox is
# in use. If the axis has multiple gearboxes one may specify a comma
# separated list of gear ratios (for example, "57:11, 2:1"). If a
# gear_ratio is specified then rotation_distance specifies the
# distance the axis travels for one full rotation of the final gear.
# The default is to not use a gear ratio.
endstop_pin:
# Endstop switch detection pin. This parameter must be provided for
# the X, Y, and Z steppers on cartesian style printers.
position_min: 0
# Minimum valid distance (in mm) the user may command the stepper to
# move to. The default is 0mm.
position_endstop:
# Location of the endstop (in mm). This parameter must be provided
# for the X, Y, and Z steppers on cartesian style printers.
position_max:
# Maximum valid distance (in mm) the user may command the stepper to
# move to. This parameter must be provided for the X, Y, and Z
# steppers on cartesian style printers.
homing_speed: 5.0
# Maximum velocity (in mm/s) of the stepper when homing. The default
# is 5mm/s.
homing_retract_dist: 5.0
# Distance to backoff (in mm) before homing a second time during
# homing. Set this to zero to disable the second home. The default
# is 5mm.
homing_retract_speed:
# Speed to use on the retract move after homing in case this should
# be different from the homing speed, which is the default for this
# parameter
second_homing_speed:
# Velocity (in mm/s) of the stepper when performing the second home.
# The default is homing_speed/2.
homing_positive_dir:
# If true, homing will cause the stepper to move in a positive
# direction (away from zero); if false, home towards zero. It is
# better to use the default than to specify this parameter. The
# default is true if position_endstop is near position_max and false
# if near position_min.
[tmc2209 stepper_x]
uart_pin: PB15
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 250
[stepper_y]
step_pin:
dir_pin:
enable_pin:
rotation_distance:
microsteps:
full_steps_per_rotation: 200
gear_ratio:
endstop_pin:
position_min: 0
position_endstop:
position_max:
homing_speed: 5.0
homing_retract_dist: 5.0
homing_retract_speed:
second_homing_speed:
homing_positive_dir:
[tmc2209 stepper_y]
uart_pin: PC6
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 250
[stepper_z]
step_pin:
dir_pin:
enable_pin:
rotation_distance:
microsteps:
full_steps_per_rotation: 200
gear_ratio:
endstop_pin:
position_min: 0
position_endstop:
position_max:
homing_speed: 5.0
homing_retract_dist: 5.0
homing_retract_speed:
second_homing_speed:
homing_positive_dir:
[tmc2209 stepper_z]
uart_pin: PC10
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 10
[safe_z_home]
home_xy_position: 70,100
speed: 50
z_hop: 10
z_hop_speed: 4
# --------------------For Delta Kinematics: --------------------------
# The stepper_a section describes the stepper controlling the front
# left tower (at 210 degrees). This section also controls the homing
# parameters (homing_speed, homing_retract_dist) for all towers.
[stepper_a]
position_endstop:
# Distance (in mm) between the nozzle and the bed when the nozzle is
# in the center of the build area and the endstop triggers. This
# parameter must be provided for stepper_a; for stepper_b and
# stepper_c this parameter defaults to the value specified for
# stepper_a.
arm_length:
# Length (in mm) of the diagonal rod that connects this tower to the
# print head. This parameter must be provided for stepper_a; for
# stepper_b and stepper_c this parameter defaults to the value
# specified for stepper_a.
#angle:
# This option specifies the angle (in degrees) that the tower is
# at. The default is 210 for stepper_a, 330 for stepper_b, and 90
# for stepper_c.
# The stepper_b section describes the stepper controlling the front
# right tower (at 330 degrees).
[stepper_b]
position_endstop:
arm_length:
# The stepper_c section describes the stepper controlling the rear
# tower (at 90 degrees).
[stepper_c]
position_endstop:
arm_length:
# The delta_calibrate section enables a DELTA_CALIBRATE extended
# g-code command that can calibrate the tower endstop positions and
# angles.
[delta_calibrate]
radius:
# Radius (in mm) of the area that may be probed. This is the radius
# of nozzle coordinates to be probed; if using an automatic probe
# with an XY offset then choose a radius small enough so that the
# probe always fits over the bed. This parameter must be provided.
speed: 50
# The speed (in mm/s) of non-probing moves during the calibration.
# The default is 50.
horizontal_move_z: 5
# The height (in mm) that the head should be commanded to move to
# just prior to starting a probe operation. The default is 5.
# -------------- For Polar Kinematics ---------------------------
# The stepper_bed section is used to describe the stepper controlling
# the bed.
[stepper_bed]
gear_ratio:
# A gear_ratio must be specified and rotation_distance may not be
# specified. For example, if the bed has an 80 toothed pulley driven
# by a stepper with a 16 toothed pulley then one would specify a
# gear ratio of "80:16". This parameter must be provided.
max_z_velocity:
# This sets the maximum velocity (in mm/s) of movement along the z
# axis. This setting can be used to restrict the maximum speed of
# the z stepper motor. The default is to use max_velocity for
# max_z_velocity.
max_z_accel:
# This sets the maximum acceleration (in mm/s^2) of movement along
# the z axis. It limits the acceleration of the z stepper motor. The
# default is to use max_accel for max_z_accel.
# The stepper_arm section is used to describe the stepper controlling
# the carriage on the arm.
[stepper_arm]
# --------------------- For
[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD2
microsteps: 16
rotation_distance: 33.400
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp=26.049
pid_Ki=1.258
pid_Kd=134.805
min_temp: 0
max_temp: 250
pressure_advance: 0.07
pressure_advance_smooth_time: 0.040
[tmc2209 extruder]
uart_pin: PC11
run_current: 0.670
hold_current: 0.500
stealthchop_threshold: 5
[heater_bed]
heater_pin: PC9
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
control: pid
pid_Kp=72.740
pid_Ki=1.569
pid_Kd=842.877
min_temp: 0
max_temp: 130
[fan]
pin: PA8
[mcu]
serial:
# The serial port to connect to the MCU. If unsure (or if it
# changes) see the "Where's my serial port?" section of the FAQ.
# This parameter must be provided when using a serial port.
baud: 250000
# The baud rate to use. The default is 250000.
canbus_uuid:
# If using a device connected to a CAN bus then this sets the unique
# chip identifier to connect to. This value must be provided when using
# CAN bus for communication.
canbus_interface:
# If using a device connected to a CAN bus then this sets the CAN
# network interface to use. The default is 'can0'.
pin_map:
# This option may be used to enable Arduino pin name aliases. The
# default is to not enable the aliases.
restart_method:
# This controls the mechanism the host will use to reset the
# micro-controller. The choices are 'arduino', 'cheetah', 'rpi_usb',
# and 'command'. The 'arduino' method (toggle DTR) is common on
# Arduino boards and clones. The 'cheetah' method is a special
# method needed for some Fysetc Cheetah boards. The 'rpi_usb' method
# is useful on Raspberry Pi boards with micro-controllers powered
# over USB - it briefly disables power to all USB ports to
# accomplish a micro-controller reset. The 'command' method involves
# sending a Klipper command to the micro-controller so that it can
# reset itself. The default is 'arduino' if the micro-controller
# communicates over a serial port, 'command' otherwise.
[mcu my_extra_mcu]
serial:
baud: 250000
canbus_uuid:
canbus_interface:
pin_map:
restart_method:
[printer]
kinematics:
# The type of printer in use. This option may be one of: cartesian,
# corexy, corexz, delta, rotary_delta, polar, winch, or none. This
# parameter must be specified.
max_velocity:
# Maximum velocity (in mm/s) of the toolhead (relative to the
# print). This parameter must be specified.
max_accel:
# Maximum acceleration (in mm/s^2) of the toolhead (relative to the
# print). This parameter must be specified.
max_accel_to_decel:
# A pseudo acceleration (in mm/s^2) controlling how fast the
# toolhead may go from acceleration to deceleration. It is used to
# reduce the top speed of short zig-zag moves (and thus reduce
# printer vibration from these moves). The default is half of
# max_accel.
square_corner_velocity: 5.0
# The maximum velocity (in mm/s) that the toolhead may travel a 90
# degree corner at. A non-zero value can reduce changes in extruder
# flow rates by enabling instantaneous velocity changes of the
# toolhead during cornering. This value configures the internal
# centripetal velocity cornering algorithm; corners with angles
# larger than 90 degrees will have a higher cornering velocity while
# corners with angles less than 90 degrees will have a lower
# cornering velocity. If this is set to zero then the toolhead will
# decelerate to zero at each corner. The default is 5mm/s.
#
# -----delta Kinematics:------
max_z_velocity:
# For delta printers this limits the maximum velocity (in mm/s) of
# moves with z axis movement. This setting can be used to reduce the
# maximum speed of up/down moves (which require a higher step rate
# than other moves on a delta printer). The default is to use
# max_velocity for max_z_velocity.
minimum_z_position: 0
# The minimum Z position that the user may command the head to move
# to. The default is 0.
delta_radius:
# Radius (in mm) of the horizontal circle formed by the three linear
# axis towers. This parameter may also be calculated as:
# delta_radius = smooth_rod_offset - effector_offset - carriage_offset
# This parameter must be provided.
print_radius:
# The radius (in mm) of valid toolhead XY coordinates. One may use
# this setting to customize the range checking of toolhead moves. If
# a large value is specified here then it may be possible to command
# the toolhead into a collision with a tower. The default is to use
# delta_radius for print_radius (which would normally prevent a
# tower collision).
max_z_velocity: 5
max_z_accel: 100
max_accel_to_decel: 1000
square_corner_velocity: 5.0
[bed_screws]
screw1: 30,30
screw2: 30,200
screw3: 200,30
screw4: 200,200
[bed_mesh]
speed: 50
horizontal_move_z: 5
mesh_min: 48,8
mesh_max: 200,230
probe_count: 7,7
fade_start: 1.0
fade_end: 0.0
umber of
algorithm: bicubic
[static_digital_output usb_pullup_enable]
pins: !PC13
[gcode_arcs]
resolution: 1.0
[bltouch]
sensor_pin: ^PC14
control_pin: PA1
x_offset: 48
y_offset: -2
z_offset: 1.23
pin_move_time: 0.75
speed: 1.0
lift_speed: 3.0
samples: 2
sample_retract_dist: 3
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
EXP1_2=PB6, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PB7, EXP1_10=<5V>
[display]
lcd_type: st7920
cs_pin: EXP1_7
sclk_pin: EXP1_6
sid_pin: EXP1_8
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2
[output_pin beeper]
pin: EXP1_1
[firmware_retraction]
retract_length: 2.7
retract_speed: 25
unretract_extra_length: 0.0
unretract_speed: 25
[virtual_sdcard]
path: /home/pi/.octoprint/uploads
[gcode_macro DO_MESH]
gcode:
M140 S60
G28
M190 S60 ; Heat Bed to 60C
BED_MESH_CALIBRATE ;Mesh leveling
M140 S0 ;Turn-off bed
SAVE_CONFIG
[gcode_macro CHECK_DISTANCE]
gcode:
M140 S60
G28
M190 S60 ; Heat Bed to 60C
G1 Z15.8 F1000
[gcode_macro START_PRINT]
gcode:
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G92 E0 ;Reset Extruder
G1 Z1.0 F3000 ;Move Z Axis up
G1 X0 Y20 Z0.3 F5000.0 ;Move to start position
G1 X0 Y200.0 Z0.3 F1500.0 E15 ;Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ;Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E27 ;Draw the second line
G1 Z1.6 F3000 ;Move Z Axis up
[gcode_macro END_PRINT]
gcode:
;MESH:ENDGCODE
G91 ;Relative positioning
G92 E0 ;Reset Extruder
G1 F2400 E-8
G1 Z0.2 F2400 ;Raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positionning
G1 X0 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M140 S0 ;Turn-off bed
M84 X Y E ;Disable all steppers but Z
[gcode_macro SET_RETRACTIONLENGTH]
gcode:
SET_RETRACTION RETRACT_LENGTH={params.LENGTH|float}
GET_RETRACTION
[pause_resume]
# M600: Filament Change. This macro will pause the printer, move the
# tool to the change position, and retract the filament 50mm. Adjust
# the retraction settings for your own extruder. After filament has
# been changed, the print can be resumed from its previous position
# with the "RESUME" gcode.
[gcode_macro PARK]
gcode:
G1 X125 Y200.0 Z200.0 F4000
[gcode_macro FILAMENT_LOAD]
gcode:
M83 ; set e to relative positioning
G92 E0.0
G1 E70 F500 ; Initially go fast
G92 E0.0
G1 E10 F200 ; then go slow
G92 E0.0
[gcode_macro FILAMENT_UNLOAD]
gcode:
M83 ; set e to relative positioning
# wiggle filament out of the nozzle
G1 E0.5 F1000
G1 E-0.5 F1000
G1 E1.0 F1000
G1 E-1.0 F1000
G1 E1.5 F1000
G1 E-1.5 F1000
G1 E2.0 F1000
G1 E-100.0 F3000 ;fully unload
G92 E0.0
[gcode_macro M600]
default_parameter_X: 0
default_parameter_Y: 0
default_parameter_Z: 50
gcode:
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91 ;relative
G1 E-.2 F2700
G1 Z{Z} ;raise nozzle
G90 ;absolute
G1 X{X} Y{Y} F3000
G91 ;relative
M300 P1000 ;beep
FILAMENT_UNLOAD ;
M300 P3000 ;beep
G90 ;absolute
RESTORE_GCODE_STATE NAME=M600_state
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.087500, 0.080000, 0.068750, 0.047500, 0.075000, 0.078750, 0.085000
#*# 0.068750, 0.065000, 0.055000, 0.028750, 0.052500, 0.055000, 0.057500
#*# 0.092500, 0.091250, 0.082500, 0.048750, 0.070000, 0.063750, 0.066250
#*# 0.116250, 0.132500, 0.122500, 0.090000, 0.105000, 0.100000, 0.092500
#*# 0.128750, 0.135000, 0.130000, 0.086250, 0.096250, 0.076250, 0.076250
#*# 0.112500, 0.126250, 0.128750, 0.107500, 0.122500, 0.127500, 0.125000
#*# 0.120000, 0.133750, 0.141250, 0.097500, 0.125000, 0.106250, 0.100000
#*# tension = 0.2
#*# min_x = 48.0
#*# algo = bicubic
#*# y_count = 7
#*# mesh_y_pps = 2
#*# min_y = 8.0
#*# x_count = 7
#*# max_y = 230.0
#*# mesh_x_pps = 2
#*# max_x = 199.97

View File

@ -1,9 +1,41 @@
.plugin-klipper-sidebar {
padding: 1px;
height: auto;
border: 1px solid #aaa;
width: 98%;
text-align: center;
word-break: break-all;
margin: auto;
}
li#navbar_plugin_klipper {
cursor: pointer;
max-width:360px;
max-height:80px;
word-break: break-all;
}
.plugin-klipper-sidebar a {
color: #333;
padding: 2px 2px;
text-align: center;
text-decoration: none;
display: inline-block;
cursor: pointer;
}
.plugin-klipper-sidebar a:hover, .plugin-klipper-sidebar a:active {
background-color: #aaa;
cursor: pointer;
}
.plugin-klipper-log {
padding: 0px;
overflow-y: scroll;
height: 400px;
border: 1px solid #eee;
width: 100%;
word-break: break-all;
}
.plugin-klipper-log .log-item {
@ -101,6 +133,7 @@ ul#klipper-settings {
height: 100%;
}
/*conf editor*/
div#settings_plugin_klipper.tab-pane.active form.form-horizontal div.tab-content div#conf.tab-pane.active div.control-group {
margin-bottom: 0px;
height: 100%;
@ -131,12 +164,22 @@ div#settings_plugin_klipper.tab-pane.active form.form-horizontal div.tab-content
margin: 0px 2px 2px 2px;
}
div#settings_plugin_klipper.tab-pane.active form.form-horizontal div.tab-content div#conf.tab-pane.active div.control-group label.inline input.inline-checkbox {
vertical-align:-0.2em;
/*checkboxes*/
div#settings_plugin_klipper.tab-pane.active form.form-horizontal div.tab-content div.tab-pane.active div.control-group input.inline-checkbox {
vertical-align: -0.2em;
}
div#settings_plugin_klipper.tab-pane.active form.form-horizontal div.tab-content div#conf.tab-pane.active div.control-group label.inline {
display:inline;
div#settings_plugin_klipper.tab-pane.active form.form-horizontal div.tab-content div.tab-pane.active div.control-group label.inline {
display: inline;
}
div#settings_plugin_klipper.tab-pane.active form.form-horizontal div.tab-content div.tab-pane.active div.control-group div.controls input.controls-checkbox {
margin-top: 8px;
}
/*macros*/
div#settings_plugin_klipper.tab-pane.active form.form-horizontal div.tab-content div#macros.tab-pane.active div div#item.control-group label.control-label {
width: 80px;
}
#macros #item.control-group {

View File

@ -31,7 +31,8 @@ $(function () {
self.paramMacroViewModel = parameters[4];
self.access = parameters[5];
self.shortStatus = ko.observable();
self.shortStatus_navbar = ko.observable();
self.shortStatus_sidebar = ko.observable();
self.logMessages = ko.observableArray();
self.showPopUp = function(popupType, popupTitle, message){
@ -140,7 +141,13 @@ $(function () {
self.consoleMessage(data.subtype, data.payload);
break;
case "status":
self.shortStatus(data.payload);
if (data.payload.length > 36) {
var shortText = data.payload.substring(0, 31) + " [..]"
self.shortStatus_navbar(shortText);
} else {
self.shortStatus_navbar(data.payload);
}
self.shortStatus_sidebar(data.payload);
break;
default:
self.logMessage(data.time, data.subtype, data.payload);

View File

@ -1,3 +1,3 @@
<!-- ko if: settings.settings.plugins.klipper.configuration.navbar -->
<a data-bind="text: shortStatus, click: navbarClicked"></a>
<!-- ko if: settings.settings.plugins.klipper.configuration.shortStatus_navbar -->
<a title="Go to OctoKlipper Tab" data-bind="text: shortStatus_navbar, click: navbarClicked"></a>
<!-- /ko -->

View File

@ -17,19 +17,21 @@
<div class="control-group">
<label class="control-label">{{ _('Replace Connection Panel') }}</label>
<div class="controls">
<input type="checkbox" class="input-block-level" data-bind="checked: settings.settings.plugins.klipper.connection.replace_connection_panel">
<input class="controls-checkbox" title="{{ _('Replace Connection Panel') }}" type="checkbox" data-bind="checked: settings.settings.plugins.klipper.connection.replace_connection_panel">
</div>
</div>
<div class="control-group">
<label class="control-label">{{ _('Show NavBar Message') }}</label>
<label class="control-label">{{ _('Show Short Messages') }}</label>
<div class="controls">
<input type="checkbox" class="input-block-level" data-bind="checked: settings.settings.plugins.klipper.configuration.navbar">
<label class="checkbox" title="{{ _('on NavBar') }}"><input type="checkbox" data-bind="checked: settings.settings.plugins.klipper.configuration.shortStatus_navbar"> {{ _('on NavBar') }}</label>
<label class="checkbox" title="{{ _('on SideBar') }}"><input type="checkbox" data-bind="checked: settings.settings.plugins.klipper.configuration.shortStatus_sidebar"> {{ _('on SideBar') }}</label>
</div>
</div>
<div class="control-group">
<label class="control-label">{{ _('Enable debug logging') }}</label>
<div class="controls">
<input type="checkbox" class="input-block-level" data-bind="checked: settings.settings.plugins.klipper.configuration.debug_logging">
<input class="controls-checkbox" title="{{ _('Enable debug logging') }}" type="checkbox" data-bind="checked: settings.settings.plugins.klipper.configuration.debug_logging">
</div>
</div>
<div class="control-group">
@ -61,44 +63,43 @@
</div>
<!-- Macros -->
<div class="tab-pane" id="macros">
<div class="control-group">
<div class="controls">
<div class="control-group" style="margin-bottom: 0px;">
<div class="controls" style="margin-left: 82px;">
<div class="row-fluid">
<div class="span8" style="text-align: right"><small>{{ _('Add macro button to:') }}</small></div>
<div class="span1"><small>{{ _('Klipper Tab') }}</small></div>
<div class="span2"><small>{{ _('Sidebar') }}</small></div>
<div class="span1" style="margin: auto;text-align: center"><small>{{ _('Klipper Tab') }}</small></div>
<div class="span2" style="margin: auto;"><small>{{ _('Sidebar') }}</small></div>
</div>
</div>
</div>
<div data-bind="foreach: settings.settings.plugins.klipper.macros">
<div class="control-group" id="item">
<label class="control-label">{{ _('Name') }}</label>
<div class="controls">
<div class="controls" style="margin-left: 82px;">
<div class="row-fluid">
<div class="span8">
<input type="text" class="input-block-level" data-bind="value: name"/>
</div>
<div class="span1">
<input type="checkbox" class="input-block-level" data-bind="checked: tab"/>
<div class="span1" style="margin: auto; text-align: center;">
<input title="{{ _('Klipper Tab') }}" style="margin: auto;" type="checkbox" class="input-block-level" data-bind="checked: tab"/>
</div>
<div class="span1">
<input type="checkbox" class="input-block-level" data-bind="checked: sidebar"/>
<div class="span1" style="margin: auto; text-align: center;">
<input title="{{ _('Sidebar') }}" style="margin: auto;" type="checkbox" class="input-block-level" data-bind="checked: sidebar"/>
</div>
<div class="span2">
<a href='#' data-bind='click: $parent.moveMacroUp' class="fa fa-chevron-up"></a>
<a href='#' data-bind='click: $parent.moveMacroDown' class="fa fa-chevron-down"></a>
<a href='#' data-bind='click: $parent.removeMacro' class="fa fa-trash-o"></a>
<div class="span2" style="margin: auto; text-align: center;">
<a href='#' style="vertical-align: bottom;" data-bind='click: $parent.moveMacroUp' class="fa fa-chevron-up"></a>
<a href='#' style="vertical-align: bottom;" data-bind='click: $parent.moveMacroDown' class="fa fa-chevron-down"></a>
<a href='#' style="vertical-align: bottom;" data-bind='click: $parent.removeMacro' class="fa fa-trash-o"></a>
</div>
</div>
</div>
<label class="control-label">{{ _('Command') }}</label>
<div class="controls">
<div class="controls" style="margin-left: 82px;">
<div class="row-fluid">
<div class="span8">
<div class="span12" style="margin-top:2px;">
<textarea rows="2" class="block" data-bind="value: macro">
</textarea>
</div>
<div class="span2"></div>
</div>
</div>
</div>

View File

@ -6,6 +6,11 @@
<button class="btn btn-block" data-bind="visible: hasRight('CONFIG', 'Ko'), click: function() {openOctoKlipperSettings('klipper-config');}">{{ _('Open Klipper config') }}</button>
</div>
</div>
<!-- ko if: settings.settings.plugins.klipper.configuration.shortStatus_sidebar -->
<div class="plugin-klipper-sidebar">
<a title="Go to OctoKlipper Tab" data-bind="text: shortStatus_sidebar, click: navbarClicked"></a>
</div>
<!-- /ko -->
<div class="control-group" data-bind="visible: hasRight('MACRO', 'Ko')">
<div class="controls">
<label class="control-label small"><i class="icon-list-alt"></i> {{ _('Macros') }}</label>

View File

@ -19,7 +19,7 @@ plugin_package = "octoprint_klipper"
plugin_name = "OctoKlipper"
plugin_version = "0.3.8rc5"
plugin_version = "0.3.8rc6"
plugin_description = """A plugin for OctoPrint to configure,control and monitor the Klipper 3D printer software."""