mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 21:47:39 +02:00
fix(printer): bed-jog "Home Z" could crash bed into toolhead on H2C/H2D/H2S/X1 (#1052)
Critical safety fix. The bed-jog dialog's "Home Z" button sent a bare
`G28 Z` over gcode_line. On Bambu printers where the Z endstop is at
the top (bed moves UP into it — H2C, H2D, H2S, X1 family), `G28 Z`
skips the toolhead-park step that a full `G28` runs first, so the bed
rises at full speed with nothing getting out of the way. The reporter
only escaped damage because the toolhead happened to be parked on the
purge chute.
The /printers/{id}/home-axes endpoint and BambuClient.home_axes() now
always send bare `G28` regardless of the axes argument, triggering the
firmware's safe multi-step routine (park toolhead → home XY → home Z).
The axes argument is kept for API compat but ignored; invalid values
still return 400.
Frontend retitles the button "Auto Home" and updates the dialog copy
in all 7 locales so users aren't surprised when X/Y motion happens
before Z. Parameterized regression test asserts z/xy/all all produce
bare G28.
(cherry picked from commit 7026a6de77)
This commit is contained in:
@@ -341,10 +341,10 @@ export default {
|
||||
down: 'Platte runter',
|
||||
disabledWhilePrinting: 'Während des Drucks deaktiviert',
|
||||
notHomedTitle: 'Drucker ist nicht referenziert',
|
||||
notHomedMessage: 'Die Z-Achse wurde seit dem letzten Druck nicht referenziert. Referenzieren Sie Z zuerst für eine sichere Positionierung oder bewegen Sie trotzdem — die Software-Endschalter werden dabei umgangen.',
|
||||
homeZ: 'Z referenzieren',
|
||||
notHomedMessage: 'Der Drucker wurde seit dem letzten Druck nicht referenziert. Führen Sie zuerst die automatische Referenzfahrt aus (parkt den Werkzeugkopf und referenziert dann X, Y und Z) oder bewegen Sie trotzdem — die Software-Endschalter werden dabei umgangen.',
|
||||
homeZ: 'Automatische Referenzfahrt',
|
||||
moveAnyway: 'Trotzdem bewegen',
|
||||
homingStarted: 'Z-Achse wird referenziert…',
|
||||
homingStarted: 'Drucker wird automatisch referenziert…',
|
||||
},
|
||||
// Permissions
|
||||
permission: {
|
||||
|
||||
@@ -341,10 +341,10 @@ export default {
|
||||
down: 'Move plate down',
|
||||
disabledWhilePrinting: 'Disabled while printing',
|
||||
notHomedTitle: 'Printer is not homed',
|
||||
notHomedMessage: 'The Z axis has not been homed since the last print. Home Z first for safe positioning, or move anyway — soft endstops will be bypassed.',
|
||||
homeZ: 'Home Z',
|
||||
notHomedMessage: 'The printer has not been homed since the last print. Run auto-home first for safe positioning (parks the toolhead, then homes X, Y, and Z), or move anyway — soft endstops will be bypassed.',
|
||||
homeZ: 'Auto Home',
|
||||
moveAnyway: 'Move anyway',
|
||||
homingStarted: 'Homing Z axis…',
|
||||
homingStarted: 'Auto-homing printer…',
|
||||
},
|
||||
// Permissions
|
||||
permission: {
|
||||
|
||||
@@ -341,10 +341,10 @@ export default {
|
||||
down: 'Descendre le plateau',
|
||||
disabledWhilePrinting: 'Désactivé pendant l\'impression',
|
||||
notHomedTitle: 'Imprimante non référencée',
|
||||
notHomedMessage: 'L\'axe Z n\'a pas été référencé depuis la dernière impression. Référencez Z d\'abord pour un positionnement sûr, ou déplacez quand même — les butées logicielles seront ignorées.',
|
||||
homeZ: 'Référencer Z',
|
||||
notHomedMessage: 'L\'imprimante n\'a pas été référencée depuis la dernière impression. Lancez la référence automatique d\'abord pour un positionnement sûr (parque la tête d\'outil, puis référence X, Y et Z), ou déplacez quand même — les butées logicielles seront ignorées.',
|
||||
homeZ: 'Référence automatique',
|
||||
moveAnyway: 'Déplacer quand même',
|
||||
homingStarted: 'Référencement de l\'axe Z…',
|
||||
homingStarted: 'Référencement automatique en cours…',
|
||||
},
|
||||
// Permissions
|
||||
permission: {
|
||||
|
||||
@@ -341,10 +341,10 @@ export default {
|
||||
down: 'Sposta piano giù',
|
||||
disabledWhilePrinting: 'Disabilitato durante la stampa',
|
||||
notHomedTitle: 'Stampante non azzerata',
|
||||
notHomedMessage: 'L\'asse Z non è stato azzerato dall\'ultima stampa. Azzera Z prima per un posizionamento sicuro, oppure muovi comunque — i finecorsa software verranno ignorati.',
|
||||
homeZ: 'Azzera Z',
|
||||
notHomedMessage: 'La stampante non è stata azzerata dall\'ultima stampa. Esegui prima l\'azzeramento automatico per un posizionamento sicuro (parcheggia la testa di stampa, poi azzera X, Y e Z), oppure muovi comunque — i finecorsa software verranno ignorati.',
|
||||
homeZ: 'Azzeramento automatico',
|
||||
moveAnyway: 'Muovi comunque',
|
||||
homingStarted: 'Azzeramento asse Z…',
|
||||
homingStarted: 'Azzeramento automatico in corso…',
|
||||
},
|
||||
// Permissions
|
||||
permission: {
|
||||
|
||||
@@ -340,10 +340,10 @@ export default {
|
||||
down: 'プレートを下へ',
|
||||
disabledWhilePrinting: '印刷中は無効',
|
||||
notHomedTitle: 'プリンターがホーミングされていません',
|
||||
notHomedMessage: '前回の印刷以降、Z軸がホーミングされていません。安全な位置決めのためにまずZをホーミングするか、このまま移動してください — ソフトエンドストップはバイパスされます。',
|
||||
homeZ: 'Zをホーミング',
|
||||
notHomedMessage: '前回の印刷以降、プリンターがホーミングされていません。安全な位置決めのためにまずオートホーミングを実行するか(ツールヘッドをパークしてからX・Y・Zをホーミングします)、このまま移動してください — ソフトエンドストップはバイパスされます。',
|
||||
homeZ: 'オートホーミング',
|
||||
moveAnyway: 'このまま移動',
|
||||
homingStarted: 'Z軸をホーミング中…',
|
||||
homingStarted: 'プリンターをオートホーミング中…',
|
||||
},
|
||||
// Permissions
|
||||
permission: {
|
||||
|
||||
@@ -341,10 +341,10 @@ export default {
|
||||
down: 'Mover mesa para baixo',
|
||||
disabledWhilePrinting: 'Desativado durante a impressão',
|
||||
notHomedTitle: 'Impressora não referenciada',
|
||||
notHomedMessage: 'O eixo Z não foi referenciado desde a última impressão. Referencie Z primeiro para um posicionamento seguro, ou mova assim mesmo — os fins de curso de software serão ignorados.',
|
||||
homeZ: 'Referenciar Z',
|
||||
notHomedMessage: 'A impressora não foi referenciada desde a última impressão. Execute a referência automática primeiro para um posicionamento seguro (estaciona o cabeçote, depois referencia X, Y e Z), ou mova assim mesmo — os fins de curso de software serão ignorados.',
|
||||
homeZ: 'Referência automática',
|
||||
moveAnyway: 'Mover assim mesmo',
|
||||
homingStarted: 'Referenciando eixo Z…',
|
||||
homingStarted: 'Referenciando impressora automaticamente…',
|
||||
},
|
||||
// Permissions
|
||||
permission: {
|
||||
|
||||
@@ -341,10 +341,10 @@ export default {
|
||||
down: '热床下移',
|
||||
disabledWhilePrinting: '打印中已禁用',
|
||||
notHomedTitle: '打印机未归零',
|
||||
notHomedMessage: '自上次打印以来 Z 轴尚未归零。请先归零 Z 以确保安全定位,或者直接移动 — 软限位将被绕过。',
|
||||
homeZ: '归零 Z',
|
||||
notHomedMessage: '打印机自上次打印以来尚未归零。请先执行自动归零以确保安全定位(先停放喷头,然后归零 X、Y 和 Z),或者直接移动 — 软限位将被绕过。',
|
||||
homeZ: '自动归零',
|
||||
moveAnyway: '强制移动',
|
||||
homingStarted: 'Z 轴归零中…',
|
||||
homingStarted: '打印机自动归零中…',
|
||||
},
|
||||
// Permissions
|
||||
permission: {
|
||||
|
||||
@@ -341,10 +341,10 @@ export default {
|
||||
down: '熱床下移',
|
||||
disabledWhilePrinting: '列印中已停用',
|
||||
notHomedTitle: '印表機未歸零',
|
||||
notHomedMessage: '自上次列印以來 Z 軸尚未歸零。請先歸零 Z 以確保安全定位,或者直接移動 — 軟限位將被繞過。',
|
||||
homeZ: '歸零 Z',
|
||||
notHomedMessage: '印表機自上次列印以來尚未歸零。請先執行自動歸零以確保安全定位(先停放噴頭,然後歸零 X、Y 和 Z),或者直接移動 — 軟限位將被繞過。',
|
||||
homeZ: '自動歸零',
|
||||
moveAnyway: '強制移動',
|
||||
homingStarted: 'Z 軸歸零中…',
|
||||
homingStarted: '印表機自動歸零中…',
|
||||
},
|
||||
// Permissions
|
||||
permission: {
|
||||
|
||||
@@ -4768,7 +4768,7 @@ function PrinterCard({
|
||||
<div className="flex flex-col gap-2">
|
||||
<button
|
||||
onClick={() => {
|
||||
homeAxesMutation.mutate('z');
|
||||
homeAxesMutation.mutate('all');
|
||||
setShowNotHomedModal(null);
|
||||
}}
|
||||
className="w-full px-3 py-2 rounded-lg text-xs font-medium bg-bambu-green/20 text-bambu-green hover:bg-bambu-green/30 transition-colors"
|
||||
|
||||
Reference in New Issue
Block a user