Compare commits

..

2 Commits

Author SHA1 Message Date
8af0f9e8a1 add support for M355 command to control chamber light, #67 2025-01-23 23:40:45 -05:00
ca30e0fe24 fix typo, #64 2024-12-29 12:58:04 -05:00
4 changed files with 24 additions and 3 deletions

View File

@ -596,6 +596,17 @@ class BambuVirtualPrinter:
self._current_state.pause_print()
return True
@gcode_executor.register("M355")
def _case_lights(self, data: str) -> bool:
if data == "M355 S1":
light_command = commands.CHAMBER_LIGHT_ON
elif data == "M355 S0":
light_command = commands.CHAMBER_LIGHT_OFF
else:
return False
return self.bambu_client.publish(light_command)
@gcode_executor.register("M524")
def _cancel_print(self):
self._current_state.cancel_print()

View File

@ -48,6 +48,16 @@ $(function () {
return output_list;
};
self.getAdditionalControls = function() {
var buttons = [
{ name: "Bambu", type: "section", layout: "horizontal", children: [
{type: "command", name: "Light On", enabled: "true", command: "M355 S1"},
{type: "command", name: "Light Off", enabled: "true", command: "M355 S0"}
]}
];
return buttons;
};
self.getAuthToken = function (data) {
self.settingsViewModel.settings.plugins.bambu_printer.auth_token("");
self.auth_type("");
@ -133,7 +143,7 @@ $(function () {
};
self.onAfterBinding = function () {
console.log(self.ams_mapping_computed());
// console.log(self.ams_mapping_computed());
};
self.showTimelapseThumbnail = function(data) {

View File

@ -16,7 +16,7 @@
</div>
</div>
<div class="row-fluid" data-bind="visible: settingsViewModel.settings.plugins.bambu_printer.use_ams">
{{ _('Filament Assighnment') }}: {{ _('Click') }} <a href="#">{{ _('here') }}</a> {{ _('for usage details.') }}
{{ _('Filament Assignment') }}: {{ _('Click') }} <a href="#">{{ _('here') }}</a> {{ _('for usage details.') }}
</div>
<div class="row-fluid" data-bind="visible: settingsViewModel.settings.plugins.bambu_printer.use_ams, sortable: {data: ams_mapping, options: {cancel: '.unsortable'}}">
<div class="btn" data-bind="attr: {title: name}, event: {dblclick: $root.toggle_spool_active}, css: {disabled: (index()<0)}">

View File

@ -14,7 +14,7 @@ plugin_package = "octoprint_bambu_printer"
plugin_name = "OctoPrint-BambuPrinter"
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.8rc14"
plugin_version = "0.1.8rc15"
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module