mirror of
https://github.com/Klipper4FlashForge/firmware.git
synced 2026-10-19 03:49:50 -05:00
Drop SDCARD_SET_CHANNEL: upstream needs no channel
FlashForge's virtual_sdcard tracked a channel so it could rewrite bare
M104/M109 to " T<channel>" and SET_PRESSURE_ADVANCE to pa_value_t<channel>.
The upstream virtual_sdcard we ship does no such rewriting and needs none:
both apply to the ACTIVE extruder, which _grab (or the ACTIVATE_EXTRUDER on
the same-tool path) has just set to this tool. That is also why the stock
start block's bare `M104 S<t>` lands on the right hotend.
Like the four SDCARD_* calls in 848db02 this was never breaking anything --
cmd_default responds 'Unknown command' rather than raising -- just one console
line per toolchange.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
848db028d0
commit
764af2aacd
1 file changed
+7
-7
@@ -916,13 +916,13 @@ class FFToolchange:
|
||||
% self._extruder_name(tool))
|
||||
self._apply_tool_diff_offsets(tool)
|
||||
self._arm_runout(tool)
|
||||
# FIXME: SDCARD_SET_CHANNEL exists only in FlashForge's
|
||||
# virtual_sdcard fork, where it kept the channel state coherent
|
||||
# (bare M104/M109 got " T<channel>" appended, SET_PRESSURE_ADVANCE
|
||||
# was rewritten to pa_value_t<channel>). We ship upstream
|
||||
# virtual_sdcard, which has no such command and no such rewriting,
|
||||
# so this is an unknown command on the shipped Klipper.
|
||||
self._run('SDCARD_SET_CHANNEL CHANNEL=%d' % tool)
|
||||
# No channel to announce. FlashForge's virtual_sdcard tracked one
|
||||
# so it could rewrite bare M104/M109 to " T<channel>" and
|
||||
# SET_PRESSURE_ADVANCE to pa_value_t<channel>. Upstream does no
|
||||
# such rewriting and needs none: both apply to the ACTIVE
|
||||
# extruder, which _grab (or the ACTIVATE_EXTRUDER above) has just
|
||||
# set to this tool. The stock start block's bare `M104 S<t>` lands
|
||||
# on the right hotend for exactly that reason.
|
||||
except FFToolchangeError as e:
|
||||
raise gcmd.error(str(e))
|
||||
except self.printer.command_error:
|
||||
|
||||
Reference in new issue
Block a user