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

[GPIO Control] Add ability to cancel other delayed events #101

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 40 additions & 0 deletions gpio_control/UIConfig-OldSchool.json
Expand Up @@ -21,34 +21,39 @@
"systemStartupState",
"systemStartupDelay",
"systemStartupDelayUnits",
"systemStartupCancelDelayedEvents",
"systemStartupDuration",
"systemStartupDurationUnits",
"systemShutdownEnabled",
"systemShutdownPin",
"systemShutdownState",
"systemShutdownDelay",
"systemShutdownDelayUnits",
"systemShutdownCancelDelayedEvents",
"systemShutdownDuration",
"systemShutdownDurationUnits",
"musicPlayEnabled",
"musicPlayPin",
"musicPlayState",
"musicPlayDelay",
"musicPlayDelayUnits",
"musicPlayCancelDelayedEvents",
"musicPlayDuration",
"musicPlayDurationUnits",
"musicPauseEnabled",
"musicPausePin",
"musicPauseState",
"musicPauseDelay",
"musicPauseDelayUnits",
"musicPauseCancelDelayedEvents",
"musicPauseDuration",
"musicPauseDurationUnits",
"musicStopEnabled",
"musicStopPin",
"musicStopState",
"musicStopDelay",
"musicStopDelayUnits",
"musicStopCancelDelayedEvents",
"musicStopDuration",
"musicStopDurationUnits"
]
Expand Down Expand Up @@ -621,6 +626,13 @@
"value": true
}
},
{
"id": "systemStartupCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false
},
{
"id": "systemStartupDuration",
"element": "select",
Expand Down Expand Up @@ -1640,6 +1652,13 @@
"value": true
}
},
{
"id": "systemShutdownCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false
},
{
"id": "systemShutdownDuration",
"element": "select",
Expand Down Expand Up @@ -2659,6 +2678,13 @@
"value": true
}
},
{
"id": "musicPlayCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false
},
{
"id": "musicPlayDuration",
"element": "select",
Expand Down Expand Up @@ -3678,6 +3704,13 @@
"value": true
}
},
{
"id": "musicPauseCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false
},
{
"id": "musicPauseDuration",
"element": "select",
Expand Down Expand Up @@ -4697,6 +4730,13 @@
"value": true
}
},
{
"id": "musicStopCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false
},
{
"id": "musicStopDuration",
"element": "select",
Expand Down
62 changes: 61 additions & 1 deletion gpio_control/UIConfig.json
Expand Up @@ -21,34 +21,39 @@
"systemStartupState",
"systemStartupDelay",
"systemStartupDelayUnits",
"systemStartupCancelDelayedEvents",
"systemStartupDuration",
"systemStartupDurationUnits",
"systemShutdownEnabled",
"systemShutdownPin",
"systemShutdownState",
"systemShutdownDelay",
"systemShutdownDelayUnits",
"systemShutdownCancelDelayedEvents",
"systemShutdownDuration",
"systemShutdownDurationUnits",
"musicPlayEnabled",
"musicPlayPin",
"musicPlayState",
"musicPlayDelay",
"musicPlayDelayUnits",
"musicPlayCancelDelayedEvents",
"musicPlayDuration",
"musicPlayDurationUnits",
"musicPauseEnabled",
"musicPausePin",
"musicPauseState",
"musicPauseDelay",
"musicPauseDelayUnits",
"musicPauseCancelDelayedEvents",
"musicPauseDuration",
"musicPauseDurationUnits",
"musicStopEnabled",
"musicStopPin",
"musicStopState",
"musicStopDelay",
"musicStopDelayUnits",
"musicStopCancelDelayedEvents",
"musicStopDuration",
"musicStopDurationUnits"
]
Expand Down Expand Up @@ -657,6 +662,17 @@
"value": true
}
},
{
"id": "systemStartupCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false,
"visibleIf": {
"field": "systemStartupEnabled",
"value": true
}
},
{
"id": "systemStartupDuration",
"element": "select",
Expand Down Expand Up @@ -1712,6 +1728,17 @@
"value": true
}
},
{
"id": "systemShutdownCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false,
"visibleIf": {
"field": "systemShutdownEnabled",
"value": true
}
},
{
"id": "systemShutdownDuration",
"element": "select",
Expand Down Expand Up @@ -2767,6 +2794,17 @@
"value": true
}
},
{
"id": "musicPlayCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false,
"visibleIf": {
"field": "musicPlayEnabled",
"value": true
}
},
{
"id": "musicPlayDuration",
"element": "select",
Expand Down Expand Up @@ -3822,6 +3860,17 @@
"value": true
}
},
{
"id": "musicPauseCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false,
"visibleIf": {
"field": "musicPauseEnabled",
"value": true
}
},
{
"id": "musicPauseDuration",
"element": "select",
Expand Down Expand Up @@ -4873,7 +4922,18 @@
}
],
"visibleIf": {
"field": "systemShutdownEnabled",
"field": "musicStopEnabled",
"value": true
}
},
{
"id": "musicStopCancelDelayedEvents",
"element": "switch",
"label": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS",
"doc": "TRANSLATE.GPIO_CANCEL_OTHER_TIMERS_DOC",
"value": false,
"visibleIf": {
"field": "musicStopEnabled",
"value": true
}
},
Expand Down
20 changes: 20 additions & 0 deletions gpio_control/config.json
Expand Up @@ -27,6 +27,10 @@
"durationUnits": {
"value": 0,
"type": "number"
},
"cancelDelayedEvents": {
"value": false,
"type": "boolean"
}
},
"systemShutdown": {
Expand Down Expand Up @@ -57,6 +61,10 @@
"durationUnits": {
"value": 0,
"type": "number"
},
"cancelDelayedEvents": {
"value": false,
"type": "boolean"
}
},
"musicPlay": {
Expand Down Expand Up @@ -87,6 +95,10 @@
"durationUnits": {
"value": 0,
"type": "number"
},
"cancelDelayedEvents": {
"value": false,
"type": "boolean"
}
},
"musicPause": {
Expand Down Expand Up @@ -117,6 +129,10 @@
"durationUnits": {
"value": 0,
"type": "number"
},
"cancelDelayedEvents": {
"value": false,
"type": "boolean"
}
},
"musicStop": {
Expand Down Expand Up @@ -147,6 +163,10 @@
"durationUnits": {
"value": 0,
"type": "number"
},
"cancelDelayedEvents": {
"value": false,
"type": "boolean"
}
}
}
2 changes: 2 additions & 0 deletions gpio_control/i18n/strings_en.json
Expand Up @@ -23,6 +23,8 @@
"GPIO_DELAY_DOC": "How long to wait before setting the GPIO state",
"GPIO_DELAY_UNITS": "Delay units",
"GPIO_DELAY_UNITS_DOC": "Delay units",
"GPIO_CANCEL_OTHER_TIMERS": "Cancel existing delayed events",
"GPIO_CANCEL_OTHER_TIMERS_DOC": "Cancel any delayed events still pending",
"GPIO_DURATION": "Duration",
"GPIO_DURATION_DOC": "How long to keep the GPIO at this state",
"GPIO_DURATION_UNITS": "Duration units",
Expand Down