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

MikeTrahearn/1563 Show Popup for "Detect generator at AC input" setting #1814

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MikeTrahearn-Qinetic
Copy link
Contributor

PageSettingsGenerator should correctly shows the existing toast by changing the enabled property to content.enabled so that the button may still be clickable. ListSwitch should be modified to emit its clicked() signal when the content.enabled is false.

Fixes #1563

@MikeTrahearn-Qinetic MikeTrahearn-Qinetic self-assigned this Dec 26, 2024
@MikeTrahearn-Qinetic MikeTrahearn-Qinetic changed the title Show Popup for "Detect generator at AC input" setting MikeTrahearn/Show Popup for "Detect generator at AC input" setting Dec 27, 2024
@MikeTrahearn-Qinetic MikeTrahearn-Qinetic changed the title MikeTrahearn/Show Popup for "Detect generator at AC input" setting MikeTrahearn/1814 Show Popup for "Detect generator at AC input" setting Dec 27, 2024
@MikeTrahearn-Qinetic MikeTrahearn-Qinetic changed the title MikeTrahearn/1814 Show Popup for "Detect generator at AC input" setting MikeTrahearn/1563 Show Popup for "Detect generator at AC input" setting Dec 27, 2024
@MikeTrahearn-Qinetic
Copy link
Contributor Author

This PR has been put on hold pending the outcome of #1818.

PageSettingsGenerator should correctly shows the existing toast by
changing the enabled property to content.enabled so that the button
may still be clickable. ListSwitch should be modified to emit its
clicked() signal when the content.enabled is false.

Fixes #1563
@MikeTrahearn-Qinetic MikeTrahearn-Qinetic force-pushed the miketrahearn/1563-detect-generator-popup branch from b4f5d6c to 3c63eb2 Compare January 17, 2025 00:31
if (!generatorIsSet) {
//% "None of the AC inputs is set to generator. Go to the system setup page and set the correct AC input to generator in order to enable this functionality."
Global.showToastNotification(VenusOS.Notification_Info, qsTrId("page_settings_generator_detect_generator_not_set"),
Theme.animation_generator_detectGeneratorNotSet_toastNotification_autoClose_duration)
generatorACInputSwitch.toast = Global.showToastNotification(VenusOS.Notification_Info, qsTrId("page_settings_generator_detect_generator_not_set"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add generatorACInputSwitch?.close() to close any existing toast immediately (because we can't recycle yet)

} else {
//% "An alarm will be triggered when no power from the generator is detected at the inverter AC input. Make sure that the correct AC input is set to generator on the system setup page."
Global.showToastNotification(VenusOS.Notification_Info, qsTrId("page_settings_generator_detect_generator_set"),
Theme.animation_generator_detectGeneratorSet_toastNotification_autoClose_duration)
generatorACInputSwitch.toast = Global.showToastNotification(VenusOS.Notification_Info, qsTrId("page_settings_generator_detect_generator_set"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add generatorACInputSwitch?.close() to close any existing toast immediately (because we can't recycle yet)

@@ -124,7 +136,7 @@ Page {
if (!checked) {
//% "An alarm will be triggered when autostart function is left disabled for more than 10 minutes"
Global.notificationLayer.showToastNotification(VenusOS.Notification_Info,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review if we need to close any existing ToastNotification immediately (because we can't recycle yet)

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.

Popup for "Detect generator at AC input" setting
1 participant