Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented #2132 + config.ini cleanup + bugfix/code optimization #2146

Merged
merged 15 commits into from
Sep 2, 2021

Conversation

digant73
Copy link
Contributor

@digant73 digant73 commented Aug 30, 2021

IMPROVEMENTS:

  • Implemented BLT Z offset wizzard with homing without probe #2132: Probe offset now supports also printers configured to home usning min endstop instead of a probe. The previous param "xy_offset_probing" was renamed to "probing_z_offset" to support the new feature
  • Optimized LevelCorner menu: Some code reduction and code sharing with LevelingControl API
  • Cleanup on config.ini and Configuration.h: Reviewed some param names and comments reflecting better their use in the code. default values in Configuration.h are mapped in 1-to-1 with the related param in config.ini
    Scope of those changes are also to force some people to finally update their config.ini starting from the most updated config.ini provided here instead of simply integrating new params in their old config.ini. This should avoid (I hope) to see so many bug reports referring to missing or old comments present in the config.ini file reporting wrong (old) values range etc...
    Below a list of the renamed params in config.ini:
    • emulate_m600 -> emulated_m600
    • title_back_color -> title_background_color
    • background_color -> menu_background_color
    • font_color -> menu_font_color
    • reminder_color -> reminder_font_color
    • volume_status_color -> status_font_color
    • fan_speed_percent -> fan_speed_percentage
    • marlin_bg_color -> marlin_background_color
    • marlin_fn_color -> marlin_font_color
    • onboard_sd_support -> onboard_sd
    • long_filename_support -> long_filename
    • invert_axis -> inverted_axis
    • xy_offset_probing -> probing_z_offset
    • z_raise_probing -> probing_z_raise
    • preheat_nameX -> preheat_name_X
    • ps_on_active_high -> ps_active_high
    • ps_on -> ps_auto_shutdown
    • auto_shutdown_temp -> ps_auto_shutdown_temp
    • fil_runout_inverting -> fil_runout_inverted
    • fil_noise_threshold -> fil_runout_noise_threshold
    • pl_recovery_en -> pl_recovery
    • pl_z_raise -> pl_recovery_z_raise
  • Improved/optimized code for parsing queue buffer (in parseAck.c and config.c): A check on the queue length instead of accessing the data is performed. This speedups performance
  • Internal cleanup: all the attributes in "infoSettings" follow the namning convention based on lower case and "_" as separator
  • Removed reverse lookup table for port index in SerialPort.c/h: The cmd queue stores now the port index (and not the physical port) originating the gcode. This allows to remove the reverse lookup table for port index and to reduce RAM and program FLASH space
  • Removed active port array: Once each serial port was made configurable, the use of the active port array became redundant and it is is now removed. If a serial port is enabled, the TFT will relay ack messages to the port. This allows to reduce RAM space
  • PID timeout type and text changed to warning type and text

BUGFIXES:

  • Fixed wrong parsing of params "runoutXX", "soundXX" and "gcode statusXX" in config.ini introduced by Reduce variables in settings and remove some duplicate code #2138
  • Fixed wrong usage of auto shutdown temp: default hard coded value was used instead of the value configured in "ps_auto_shutdown_temp" in config.ini
  • Minor bugfixes

fixes #2138
resolves #2132

PR STATE: ready to merge

@oldman4U
Copy link
Contributor

👍🏻 like always!!!

@bttguy
Copy link

bttguy commented Aug 30, 2021

@digant73 Can we include the fix for #1856 to this PR?

@digant73
Copy link
Contributor Author

@bttguy it's better it is tested on RRF. Unfortunately I don't have RRF in any of my printers.
I think it's better to ask @pfn to include it and test it in a further PR

@pfn
Copy link
Contributor

pfn commented Aug 30, 2021

@digant73 Can we include the fix for #1856 to this PR?

@bttguy my general preference is to keep PRs as focused and concise as possible.

@bttguy
Copy link

bttguy commented Aug 30, 2021

@pfn If you can include it later on, I agree also. I just mentioned it because digant was involved in the conversation regarding PID, and he mentioned that the timeout could be increased.

@pfn
Copy link
Contributor

pfn commented Aug 31, 2021

Below a list of the renamed params in config.ini:emulate_m600 -> emulated_m600title_back_color -> title_background_colorbackground_color -> menu_background_colorfont_color -> menu_font_colorreminder_color -> reminder_font_colorvolume_status_color -> status_font_colorfan_speed_percent -> fan_speed_percentagemarlin_bg_color -> marlin_background_colormarlin_fn_color -> marlin_font_coloronboard_sd_support -> onboard_sdlong_filename_support -> long_filenameinvert_axis -> inverted_axisxy_offset_probing -> probing_z_offsetz_raise_probing -> probing_z_raisepreheat_nameX -> preheat_name_Xps_on_active_high -> ps_active_highps_on -> ps_auto_shutdownauto_shutdown_temp -> ps_auto_shutdown_tempfil_runout_inverting -> fil_runout_invertedfil_noise_threshold -> fil_runout_noise_thresholdpl_recovery_en -> pl_recoverypl_z_raise -> pl_recovery_z_raise

I preferred the old emulate_m600 name, imo it should be a present tense action for key names.

Also, this is pretty cumbersome for users as anyone with a custom configuration will have to go through and make sure everything is correctly modified. This sort of mass update would be nice if there were a clean way to migrate users' config.

@digant73
Copy link
Contributor Author

But it's also a feature like "terminal ACK", "notification M117" etc... which you decide to enable/disable in the Feature/UI menu. Also the verb can create confusion in some cases (e.g. invert axis means more that you have the possibility to change the printer axis direction while it is used by the TFT as a reference to bind the "move" buttons in the right way.
Believe me, it is more cumbersome to see always the same bug reports and reply with always the same answers. In most of the cases obsolete config.ini files are used reporting the old description and value ranges that have been updated almost 10 months ago

@bigtreetech bigtreetech merged commit 4b705a4 into bigtreetech:master Sep 2, 2021
jeffeb3 pushed a commit to V1EngineeringInc/BIGTREETECH-TouchScreenFirmware that referenced this pull request Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BLT Z offset wizzard with homing without probe
6 participants