Repository navigation
Mainsail: show chamber temperature and compact ETA - #1063
Open
HK-Moebius wants to merge 1 commit into
Open
HK-Moebius wants to merge 1 commit into
HK-Moebius wants to merge 1 commit into
Conversation
- Show the chamber temperature when the printer reports a heater or sensor with "chamber" in its name: heater_generic, temperature_sensor and temperature_fan first, then printer-specific objects such as heater_chamber on the Prusa Pro HT90. Sensors come from heaters.available_sensors in the existing query, so printers without a chamber make no extra request and look as before. - Show the remaining time as "2h 05min" instead of "2 hours from now", "Soon!" below one minute. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mainsail: show chamber temperature and a compact ETA
Follow-up to #1042, as suggested by @KodeStar in #1042 (comment): instead of a separate
MainsailHT90tile, this extends the existingMainsailenhanced app so every Klipper printer with a chamber sensor gets it.Changes
Chamber temperature (only if the printer has one)
heaters.available_sensors, in this order:heater_generic,temperature_sensor,temperature_fan, then any other object. The last step covers printer-specific objects likeheater_chamberon the Prusa Pro HT90 (its sensors:heater_bed,heater_generic panel,heater_chamber,extruder). Becauseavailable_sensorsonly lists temperature objects, macros or fans named "chamber" can't match.heaters=available_sensors, added to the existingprinter/objects/queryrequest. A second query for the temperature only happens when a chamber sensor exists.ETA
2h 05mininstead of Carbon'sdiffForHumans()("2 hours from now"). The label changes from "Finish" to "ETA".Soon!. Without any estimate:N/A, as before.print_duration, otherwise extrapolated from progress).Testing
php -land PHPCS PSR12 (same settings as the lint workflow) pass, and so doesnode testRunner.js.heaters=available_sensorslistsheater_chamber, andheater_chamber=temperaturereturns16.79, so the tile shows Chamber 17°C.livestats()and the blade template against mocked Moonraker responses, including the real HT90 sensor list above:heater_chamber), printingheater_chamber), standbyheater_generic chamber+temperature_sensor chamber_top🤖 Generated with Claude Code