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

Fix TOUCH_SCREEN sleep_timeout_minutes #26745

Conversation

thisiskeithb
Copy link
Member

@thisiskeithb thisiskeithb commented Jan 29, 2024

Description

Follow up to #26517.

Fix 'DISPLAY_SLEEP_MINUTES' was not declared in this scope error found after running the build_all_examples script.

Requirements

TOUCH_SCREEN with TOUCH_IDLE_SLEEP_MINS

Benefits

TOUCH_SCREEN configs now compile when TOUCH_IDLE_SLEEP_MINS is enabled.

Configurations

Related Issues PR

@thisiskeithb thisiskeithb changed the title Fix "'DISPLAY_SLEEP_MINUTES' was not declared in this scope" error Use TOUCH_IDLE_SLEEP_MINS with TOUCH_SCREEN instead of DISPLAY_SLEEP_MINUTES Jan 29, 2024
@thisiskeithb thisiskeithb changed the title Use TOUCH_IDLE_SLEEP_MINS with TOUCH_SCREEN instead of DISPLAY_SLEEP_MINUTES Fix TOUCH_SCREEN sleep_timeout_minutes Jan 29, 2024
thinkyhead added a commit to MarlinFirmware/Configurations that referenced this pull request Feb 2, 2024
@thinkyhead thinkyhead force-pushed the pr/fix_display_sleep_error branch 4 times, most recently from 94abd06 to 9339621 Compare February 2, 2024 03:01
@thinkyhead
Copy link
Member

Seemed like a good idea to combine the two distinct screen timeout options into a single option and also reduce the number of TERN(TOUCH_SCREEN, ...) instances.

@thinkyhead thinkyhead force-pushed the pr/fix_display_sleep_error branch 2 times, most recently from 2292515 to cc69a98 Compare February 4, 2024 16:27
@thinkyhead
Copy link
Member

I've consolidated the code a bit further to replace HAS_TOUCH_SLEEP with HAS_DISPLAY_SLEEP and to move the implementations of MarlinUI::sleep_display into each LCD implementation rather than including TFT headers and making special cases within marlinui.cpp. … Just the kind of task that Github Copilot should be taking over some time before the year 2034.

@thisiskeithb thisiskeithb changed the title Fix TOUCH_SCREEN sleep_timeout_minutes TOUCH_IDLE_SLEEP_MINS => DISPLAY_SLEEP_MINUTES Feb 4, 2024
@thisiskeithb
Copy link
Member Author

Unifying display sleep stuff is a good call. I went with the easier route of fixing the build error since I had ~50 configs that weren't building & wanted to get through them without getting sidetracked into why display sleep wasn't a single option 😄

@thinkyhead thinkyhead closed this Feb 4, 2024
@thisiskeithb thisiskeithb deleted the pr/fix_display_sleep_error branch February 4, 2024 18:12
@thisiskeithb thisiskeithb changed the title TOUCH_IDLE_SLEEP_MINS => DISPLAY_SLEEP_MINUTES Fix TOUCH_SCREEN sleep_timeout_minutes Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants