now it validates in steps
1 defaults
2 user settings
3 user includes
4 auto-generated section
unknown keys will be removed from the auto-generated section if no other errors are found
detect and warn about missing newlines in headers
* add ability to select button style for menu items
* allow for jinja template rendering for (nearly) all menu options
this shuffles params json checks to display time instead of config time
i don't see it necessary ks can be restarted while printing it will generate a bit of load but shouldn't be a problem, i've done it too many times at this point
* Add current heater power % to job status
* Add show_heater_power config option and move update_temp()s to ScreenPanel
* Add the option to the UI config instead of the docs
* Prefer extra items on job_status over the power
There is not a lot of space, it's a trade off, and people will likely prefer extra_items
* Remove the comma, none of the other buttons have it
* job_status: inherit the parent config
* screen: create reload_panels to avoid some service restarts
* extrude: fix power breaking multi-extruder setups
* main and temp: remove degrees char from the table
* main and temp: revert removal of the header
Co-authored-by: alfrix <alfredomonclus@gmail.com>
* Don't validate `include` sections.
We need a `continue` here because `include` sections are not 'standard',
and don't have any keys to validate.
`include` sections are tangentially validated later via
`_include_config()`.
* Move checks for non-validated sections to start
Rather than looping through the whole if..elif.. block, fail fast if
we're not actually going to validate the section.
Use f-strings
Avoid unnecessary casts to str()bool()int()
Ensure file closure
Merge nested ifs
Simplify for-assigns-appends with comprehensions and internal functions
Avoid shadowing internal function names
Initialize variables
Return value directly instead of assign then return
Make some methods static
it's now possible to define a custom menu without the need to copy all the menu entries from defaults.conf
if you want to define all the entries, disable the default menu with 'use_default_menu: False' under [main]
if a preheat is defined then defaults are dropped in favor of keeping only user defines, this behaviour
has not changed, and it's intended since the user may not want any of the defaults; but it's now possible to
put preheat options in an include file.
fixes#530fixes#497fixes#408