Commit Graph
92 Commits
Author SHA1 Message Date
Kris Austin 36740ffdd8 build: clear 53 warnings - discarded values and i18n markers (#15421)
build: clear 53 unused value warnings

49 of them are deliberate i18n markers. L(s) expands to s, so
L("Main Extruder"); is a string literal as a statement and its value is
discarded. The strings have to stay, because the real values come from
printers/*.json at runtime and xgettext cannot scan those. Each block is
now a static const char *const markers[], which uses the values rather
than discarding them. Extraction is unchanged: the xgettext invocation
from scripts/run_gettext.bat gives 76 msgids over the two marker files
before and after, with identical msgid and msgctxt sets.

The other 4 are statements with no effect. AMSItem.cpp:117 and :174
construct and drop a wxColour(255, 255, 255); AMS_TRAY_DEFAULT_COL is
that colour, and the line above already assigns it. UpgradePanel.cpp:865
reads a member and drops it.

wgtDeviceNozzleSelect.cpp:269 writes
if (item; auto ptr = m_nozzle_rack.lock()), which puts the null check in
the init-statement position where its value is discarded, so the check
never runs, and sGetNozzlePosId then dereferences item. Nothing reaches
that today, because the only sender of the event sets itself as the
event object and the dynamic_cast always succeeds. The check now runs.
2026-08-31 10:55:42 -03:00
Kris Austin 142c63ab0e build: clear 143 -Woverloaded-virtual warnings in GUI widgets (#15377) 2026-08-26 19:14:30 -03:00
Kris Austin 1e4b48c548 build: clear 227 warnings - dead private fields, malformed comments (#15376)
build: drop dead private fields, close malformed comments (227 warnings)

Clears 227 of the clang-cl warnings tracked in #15374, taking a full
Windows build from 1,491 to 1,264. Five of the six changes are in
headers, which are re-diagnosed in every translation unit that includes
them, so the count is large for a 14-line diff.

Tabbook.hpp: delete two private fields, unread since the 2022 import.
m_parent also shadowed wxWindowBase::m_parent.

GUI_Utils.hpp: the wxEVT_SYS_COLOUR_CHANGED lambda body is empty on
Windows, so its `this` capture is unused there. (void) this; leaves the
handler bound, which is what stops the event propagating.

DevFirmware.h: mark m_owner [[maybe_unused]]. The class is never
instantiated, and the file tracks BambuStudio, so this is the smallest
divergence.

Eight DeviceTab/ files, AMSItem.cpp and SelectMachine.cpp: block
comments malformed so that they read as a nested /*.

No behavior change. -Wcomment goes to zero, and only the three intended
categories move.
2026-08-26 07:38:52 -03:00
SoftFever 50abe02f18 Make AMS trays read-only in laser mode and add the gradient fill helper 2026-07-17 05:06:09 +08:00
SoftFever 7265a2fbfe Resync the AMS control and item widgets 2026-07-17 04:30:45 +08:00
SoftFever 0d31325df0 feat: Filament Track Switch (H2-series O2L-FTS) support
The Filament Track Switch (H2-series accessory, product code O2L-FTS) feeds
every AMS to both extruders through a two-track switch. Port full support
across the device layer, project config, and GUI.

Device / config:
- Model the switch-aware AMS binding (the set of extruders an AMS can feed
  and which input track A/B feeds it), switch readiness, the O2L-FTS firmware
  module, and the fun2 capability bit for checking a slice against installed
  hardware.
- Register has_filament_switcher and enable_filament_dynamic_map as project
  config that persists with the project and restores from a saved 3mf, and
  force both back to false on every project/printer/CLI load path. Live
  device sync is the only thing that sets them true.

GUI:
- Sidebar sync activates the switch from live device state, attributes each
  AMS to the extruder its input track feeds, shows a floating status icon
  (ready / not-calibrated), and surfaces a one-time tip / not-calibrated
  warning.
- Send dialog gains a non-blocking slice-vs-hardware mismatch warning and a
  blocking error when a slice needs dynamic nozzle mapping but the switch is
  missing or not set up.
- AMS load/unload guards, AMS-view routing glyph + un-calibrated banner +
  hidden external-spool road, and mapping-popup external-spool lockout.
- Filament pickers collapse the per-extruder split into a single deduplicated
  "AMS filaments" group with a smart-assign toggle when the switch is ready.
- Firmware-upgrade panel lists the O2L-FTS accessory and its version.
- Device-provided filament-change steps (ams.cfs) drive the change-step
  display when firmware sends them, including the three switch steps.
- "Load current filament" asks which extruder to feed via a
  FeedDirectionDialog when the switch is calibrated.

Inert without the accessory: every path is gated on the switch being
installed (MQTT aux bit 29, default off) or ready, both project flags default
false, and the per-extruder AMS attribution is byte-identical, so AMS state,
the send/load UI, and sliced g-code are unchanged for every printer that does
not report a Filament Track Switch.
2026-07-09 18:57:05 +08:00
yw4z 22d2fe9b37 UI fixes / improvements (#11617)
* fix margins on titlebar fold

* update

* Update Plater.cpp

* update

* Update toolbar_double_directional_arrow.svg

* Update toolbar_double_directional_arrow.svg

* object list variable height icon

* Update tab_multi_active.svg

* update ams icons

* match popup border color

* Update param_advanced.svg

* Update custom-gcode_advanced.svg

* match label & parameter box width on object table

* revert changes for orange colors

* match sizes of radio buttons on widgets

* Update GLGizmoSVG.cpp
2025-12-18 12:17:29 +00:00
xin.zhang 934f32bd8c FIX: remove some warnings
jira: [none]
Change-Id: I0e74b7316d0efe38c65e1f695b2a09eb09103552
(cherry picked from commit 766c6e004145325bcc7a6addfce27842ee9504de)
2025-10-28 15:29:56 +08:00
xin.zhang 491100a9d2 ENH: support AMS switching for A series; clean class AMSSetting
jira: [STUDIO-14068] [STUDIO-14330]
Change-Id: I6281fbf56f3bf406ef28103998790a2a98c3f5c0
(cherry picked from commit 8ee02ec73076691c482ea6d089a49ea1c99ad10c)
2025-10-28 15:29:55 +08:00
xin.zhang 27a23a8baf ENH: support new feature of AMS
jira: [STUDIO-14067][STUDIO-14069]
Change-Id: Ib51f9ec6b387418f1817619973e926d3c9494935
(cherry picked from commit e2f63a8d1e3a1ea1f53578c611300ead12052b39)
2025-10-28 15:29:47 +08:00
xin.zhang b473b34ddd FIX: the display of n3s humidity
jira: [STUDIO-14195]
Change-Id: I6b49df928bdb1ce36450006805dd5d152ca7ad96
(cherry picked from commit 1e7cd2340c3c67a6a49e61dc7645428203d4df56)
2025-10-05 00:02:30 +08:00
xin.zhang bdf413fb58 FIX: incorrect display of AMS humidity
JIRA: [STUDIO-13742]
Change-Id: I25c26282c48faa05ab07dbb0cdbf5147bf475ccd
(cherry picked from commit 971afb8365c955c2562bb5c2d7a8effdc2b625ce)
2025-10-02 17:07:21 +08:00
xin.zhang 4a787f6ff8 ENH: clean codes about device
JIRA: [STUDIO-13609]
Change-Id: I591de7033360b9570600006cfbce2148a8d031d5
(cherry picked from commit e9c774be8f4c89b8dafa14ef56913612fb68bd0c)
2025-10-02 09:30:48 +08:00
xin.zhang 0721078177 ENH: update humidity display for AMS-1
JIRA: [STUDIO-13195]
Change-Id: I7abcdf821b7ead2cf4a8605ecd95011e74f5dc6b
(cherry picked from commit 1c1d34ff7e3fea4492ba07e238ca171e28eb0a3b)
2025-09-30 11:19:59 +08:00
xin.zhang 0fd471fdcc FIX: the image size
jira: [STUDIO-12374]
Change-Id: Ib02d0bb53911c92e2d7ca2cc16c835275e3a6460
(cherry picked from commit a1906daf4b480c8990d7af79e0de55c34cd47e47)
2025-09-25 16:25:54 +08:00
zhimin.zeng 554ce5004c FIX: fix the error display of default k value
jira: STUDIO-12546
Change-Id: Ibb674de256c306123c1ab7761945eda18704fe0e
(cherry picked from commit d3174f35d81654a36a85194b94c2cec1ee263ded)
2025-09-25 09:19:02 +08:00
xin.zhang 2bbd4f89f8 FIX: check if the filament is unknown
jira: [STUDIO-12085]
Change-Id: Ibf40d7a5106a40385aff5c769e5b7e5cdb866de0
(cherry picked from commit 012b6f2395d66b7b1bdafa3e851ca4b2f874eb23)
2025-09-23 09:21:03 +08:00
xin.zhang e9b30443c5 REF: remove useless codes
jira: [none]
Change-Id: I86202fdaa09c5953d9bb4f21cc6dd9d9609c0a7f
(cherry picked from commit e9d8a6c8352628e3f7bb33e2ffaa38e03ebe929b)
2025-09-23 09:03:17 +08:00
xin.zhang 015ac04951 FIX: do not popup for AMS1
jira: [STUDIO-12083]
Change-Id: Id2297576fa2b520282d8e4ce9af8e47817fc7088
(cherry picked from commit 8d29e09c1b8c1b9598f869235e99038d48b1bffc)
2025-09-23 09:00:38 +08:00
xin.zhang 9f24f0fe03 FIX: add transparent painting for AMS lite
jira: [STUDIO-11488]
Change-Id: I1b180ad7389eb4d74c3686b0559ce26172f7b264
(cherry picked from commit 03957c567ea0ffed58057f0fafe6f311e87f3a10)
2025-09-21 13:48:01 +08:00
zhou.xu f36fa17a09 FIX:m_ext_image call msw_rescale should protect
jira: STUDIO-11441
Change-Id: I89dc4bfaca61958773f7dfadf2983ff3f9cb6da1
(cherry picked from commit f42e47b7456fde2ef01ae9c3327f7c0ce9d8f174)
2025-09-21 13:47:56 +08:00
xin.zhang da33d78799 FIX: too small to show, enlarge it
jira: [STUDIO-11323]
Change-Id: Ibd56b0a72cbef0f9c752f83b1e8526a1c4275588
(cherry picked from commit c151680321af77facd1ec0aca337b7680a4c6ecd)
2025-09-21 13:47:53 +08:00
xin.zhang 1549e8f4e4 FIX: modify style; optimize ext image loading time
jira: [none]
Change-Id: Ia4bd69cc4ae6ae115c22a5c0b6c6a517773ec3f4
(cherry picked from commit 1dfd5cfdfb44b7ad4418633a3e00f5c451856fe7)
2025-09-21 13:47:53 +08:00
tao wang 426b5900ee ENH:compatible with AMS exist flag
jira:[none]

Change-Id: I6afeafe0676eded86f83838576d67233f50ee509
(cherry picked from commit a182fa1aa4a3bdd32c4ccfa26adcd92a9f1cca37)
2025-09-21 13:47:51 +08:00
tao wang 6d739dde47 ENH:adjust the layout display of a single AMS
jira:[none]

Change-Id: I801daa5f3a8ee1b3f03037eb4edf881071ea67db
(cherry picked from commit cbd69328318c18a2040a04b24ae8cd5340523ce0)
2025-09-21 13:47:51 +08:00
zhimin.zeng 3d5abeba60 ENH: Updated calibration UI for single-extruder printer
jira: none

Change-Id: I4e2d97f38699b13e2bced8f6a37c952f7903aa27
(cherry picked from commit 2e3a5e8ca71e3e9426412f8bd07b916f6be45aed)
2025-09-20 15:31:26 +08:00
xin.zhang fcfb6ac093 FIX: show ams remain for MAC
jira: [STUDIO-11139]
Change-Id: If5b9593e0b46e3f6845bb5637564cee8fa67e5bc
(cherry picked from commit 2d99a9e23106a631f9d1875f71f0910b093de657)
2025-09-20 15:30:19 +08:00
xin.zhang f9a7f056e9 FIX: use different ext image for different machine
jira: [STUDIO-11133]
Change-Id: Ice69b4f33317e23a2c2d7b8fbdfc94402b4bba28
(cherry picked from commit a67acd8f0ced49052cfe0c4b01a5bf159b046e85)
2025-09-20 15:30:14 +08:00
xin.zhang 6632db0758 FIX: update the image size
jira: [STUDIO-10732]
Change-Id: Ib4d55b911740cef079f38cd497d40a29ae3b1031
(cherry picked from commit 0ffcd9cc13ce7bbc1f6f96a09647e2f6afa112b1)
2025-09-17 23:08:20 +08:00
xin.zhang 03ea48c6b4 FIX: update the extruder image in status panel
jira: [STUDIO-10732]
Change-Id: I5437c4ef1538f0022f97c7ef7fb40ec2242328ed
(cherry picked from commit f5c49c89a80e508a442440218b068446d1e9e797)
2025-09-17 23:06:54 +08:00
xin.zhang a2e3a61ea0 FIX: fix the humidity display of N3S_AMS
jira: [STUDIO-10641]
Change-Id: I48ac96443f851262b3ce720d4b4948b7b515a381
(cherry picked from commit 51042edcbdc1d8d24c11fa8a479559d4fd000fc7)
2025-09-17 17:56:40 +08:00
xin.zhang e68300ef99 FIX: fix offset of graph painting
jira: [STUDIO-10617]
Change-Id: I3e924640ccfca2fa1a7ff70d54f7b48759ee1ac7
(cherry picked from commit 4fc69c70d4b1d3cf75b40ca09c660731ba2af85c)
2025-09-17 17:51:21 +08:00
xin.zhang 385c8a36a1 FIX: update the time shown; keep the val update while popup
jira: [STUDIO-9268]
Change-Id: I0b743ddb0ae479f9baad6239f68861a199681cda
(cherry picked from commit e1bc737d1cbc1dcf79ceecf9ed301a4a02590d5a)
2025-09-17 17:38:35 +08:00
xin.zhang 967ef78229 FIX: Make the color visible
jira: [STUDIO-10249]
Change-Id: I8490636f675787f0f2bf10917a85e2f9a075f4f7
(cherry picked from commit 4c8779d85c3df9b223d3af220994d689ed66ac41)
2025-09-17 15:49:36 +08:00
xin.zhang d557b8e35b FIX: The humidity popup with humidity_percent/temperature/dry_time
jira: [STUDIO-9268]
Change-Id: Ic6e923ae7cff56fa3e053d48e5dea6e393cd41eb
(cherry picked from commit 75da1db2f926125a0cb3595a8cae9f4d7588c6a8)
2025-09-17 15:49:02 +08:00
xin.zhang 889911d69a FIX: update the display of AMSHumidity
jira: [STUDIO-10119]
Change-Id: I7a1be57bd0dff13be149d6450b36fb54ffa9521d
(cherry picked from commit c3a8690987005e0f53bbd5f9622a670e76bed93a)
2025-09-17 15:11:41 +08:00
xin.zhang f5829ee837 FIX: THE align problem
jira: [STUDIO-10044]
Change-Id: I6bdb49aaf1ba92289110f72980d8532b0afdaaf0
(cherry picked from commit 750673b7f7a2091c66d76a403de9b2a7e305022b)
2025-09-17 15:06:04 +08:00
xin.zhang c077d8e4d0 FIX: get suitable font size to draw the texts
jira: [STUDIO-10067]
Change-Id: I589fd6a271ae177e4630e403b64c18090aab9471
(cherry picked from commit d036c92a3793e8c0c758432b52f2af8ffeff751f)
2025-09-17 15:00:05 +08:00
xin.zhang 82480436e2 FIX: the humidity display
jira: [STUDIO-10481]
Change-Id: Ib4bec6db6afbe40199c401c539b13a0e8459bbad
(cherry picked from commit 658a8ab7ef1d2149fee58b45ea9455bb188f82f0)
2025-09-17 11:34:02 +08:00
xin.zhang a05ebb3b7c FIX: the white AMS is not visible when the background is white
jira: [STUDIO-10093]
Change-Id: I80425d08c703388a75e39b9465371fe668517db8
(cherry picked from commit 4ed16b7a1e4610db1bb27b26676b94f13f05527c)
2025-09-17 11:01:07 +08:00
xin.zhang eee420027e FIX: the AMS refresh does not show AMS_TEXT
jira: [STUDIO-10322]
Change-Id: Ib17031b9b1eae07deabd418ec1211c465d4ab03d
(cherry picked from commit 51feb5f544d0cbbaa76b3c4db0e77a717a98c0e8)
2025-09-16 23:00:24 +08:00
xin.zhang 8d354aef55 FIX: the ts bitmap is oversize, fix it
jira: [STUDIO-10284]
Change-Id: I1bb3c3b29b0ad724ec39a4b1a1b5ca1034588fe0
(cherry picked from commit c13bea9b17cb50b1a69d047a6b397062b6ee70ee)
2025-09-16 22:59:37 +08:00
xin.zhang 960d676043 FIX: the AMS EXT image fault
jira: [STUDIO-10044]
Change-Id: I71d142cd763deff33f1c42047b5ae6ac81574b3f
(cherry picked from commit d50fc6a0ce421afaba93d7a67d89aebeeab1f7bf)
2025-09-16 22:57:56 +08:00
xin.zhang b3ca79146b FIX: complete the AMS fresh while state changed
jira: [STUDIO-10305]
Change-Id: Ie6cbc359bdf9fe02f103f58e25f490105faaf381
(cherry picked from commit 9d7c9c54fc47d6e9000d2570fd391a9823e8b33e)
2025-09-16 22:33:31 +08:00
xin.zhang 6c8c4ab3dc FIX: remove some unnecessary refresh to reduce page faults
jira: [none]
Change-Id: If4dae82f7aae243db033fe9c8d4d1ab25f625557
(cherry picked from commit b1fa2421c0425ad077b899e1d793cde219826042)
2025-09-16 21:21:40 +08:00
xin.zhang 319e93ba4d FIX: try to reduce page fault while idling
jira: [none]
Change-Id: I563cbf4a8ba8a4ae1e5b1b1f735753d3aef23e16
(cherry picked from commit ed1e9678c351dc037f2e3cc7ea0e19d46731699c)
2025-09-16 21:21:40 +08:00
xin.zhang 6c4479d0ea FIX: update some scale while DPI changed
jira: [STUDIO-10067]
Change-Id: Icb8480d01bdf20a17c699746677d54fc8c8680a6
(cherry picked from commit 677ec9e364a47b944b3ebee5519aea4c35439af1)
2025-09-16 14:49:15 +08:00
xin.zhang aa58b9b7ad FIX: support the dark mode AMSPreview
jira: [none]
Change-Id: If4329081535a1155588afad932403ea3615163f7
(cherry picked from commit 32597b43f94813f3ad6ef99106e234fa9a180971)
2025-09-12 17:26:20 +08:00
xin.zhang 4fb8ab03fe FIX: paint the invalid remain as 100%
jira: [STUDIO-9967]
Change-Id: Ie0b96d6a12e5d5b526e92360f7e93087134ed0a9
(cherry picked from commit 716f22046db7de19ad298e6babed4398512bf7e7)
2025-09-10 16:31:58 +08:00
tao wang 1e1dd9ddf6 FIX:fixed AMS editing icon not displaying
jira:[STUDIO-10000]

Change-Id: If1d7594bc71369067e6ea15aa3a7e1cec21605cc
(cherry picked from commit a498efe5700aeba28decfaf1df470b586fcbca45)
2025-09-10 16:26:29 +08:00