Commit Graph

51 Commits

Author SHA1 Message Date
WarmUpTill
b5eb0b3f3e Add option to disable registering of pause control hotkeys 2022-05-06 11:37:28 -07:00
WarmUpTill
1a8b185f7d Make date "At"-type check more robust
Previously the "At" check could skip the desired time window if e.g another
macro was performing a long wait wait action or condition was taking
a long time to check.
The date condition will now take into consideration when the last time
was the condition checked a date instead of simply applying a fixed
window of "switcher->interval".
2022-04-02 09:13:01 -07:00
ubuntu
3ed7727c85 Fix warnings 2022-03-26 15:40:19 -07:00
WarmUpTill
71b6ae4d78 Add additional settings dialog to macro tab
This settings dialog currently contains debug features to highlight
recently executed macros, actions and conditions.
2022-03-12 06:35:59 -08:00
WarmUpTill
d693dbc844 Add highlighting of onChagne if actions were prevented recently 2022-03-12 06:35:59 -08:00
WarmUpTill
428e114a0a Highlight recently executed action and true conditions 2022-03-12 06:35:59 -08:00
WarmUpTill
e1bacd75b6 Move audio fade threads to generic _helperThreads of macro
This will allow waiting for and stopping audio fades when calling Stop()
for a particular macro
2022-03-05 15:38:46 -08:00
WarmUpTill
8131ad3c24 Block when calling Stop() until macro is stopped 2022-03-05 15:38:46 -08:00
WarmUpTill
ac5b2c3f9e Rework handling of fade threads
Previous implementation did not allow ongoing fades to be stopped.
New implementations allows waiting for fade to complete.
2022-03-05 15:38:46 -08:00
WarmUpTill
a81ee605d6 Rename function 2022-02-04 11:38:42 -08:00
WarmUpTill
1e7726bcfc Add option to highlight recently executed macros on the Macro tab 2022-02-04 11:38:42 -08:00
WarmUpTill
38b7e08711 Add macro action to stop other macros 2022-01-21 09:51:00 -08:00
WarmUpTill
5d58269b02 Add function to access parent macro from condition or action 2022-01-21 09:50:19 -08:00
WarmUpTill
16ee789c82 Add option to perform macro actions only on condition change 2022-01-06 08:41:18 -08:00
WarmUpTill
d31ae77176 Run macros even if they are paused when pressing "Run Macro" 2022-01-04 19:32:53 -08:00
WarmUpTill
2c1b97e5cd Abort macro early if it was paused 2022-01-05 03:39:37 +01:00
WarmUpTill
5224d6589e Reduce log output when running macro in background 2021-12-22 13:12:27 -08:00
WarmUpTill
845506f7e4 Allow running macros in parallel to other macros 2021-12-04 04:09:30 -08:00
WarmUpTill
c527f15744 Add hotkey to toggle pause state of macros 2021-12-01 09:23:04 -08:00
WarmUpTill
a1cae263c1
Add macro action "random" (#353)
This should be expanded upon by adding the ability to add weights to each macro.
2021-11-20 12:52:12 +01:00
WarmUpTill
00fec4b573 Fix macro hotkeys not working 2021-11-17 12:29:41 -08:00
WarmUpTill
fbc9818764 Fix macro count not updating correctly
The underlying issue are the potential deadlocks when triggering
frontent function calls while saving / loading is triggered in parallel
like it can happen when switching scene collections.

Hopefully the new frontend events allow for a cleaner solution.
2021-11-12 10:05:11 -08:00
WarmUpTill
2155a942f3 Do not check conditions of paused macros 2021-11-12 10:05:11 -08:00
WarmUpTill
8ff50056f0 Fix crash when switching scene collection during macro wait
Also update comment stating why the main mutex needs to be unlocked
during the "action" phase of running macros
2021-10-23 13:53:56 -07:00
WarmUpTill
b786831f3b Remove unnecessary return value check 2021-10-23 13:53:56 -07:00
Joao Eriberto Mota Filho
3c8f5088d3 Fix word "unknown" 2021-09-13 10:58:39 -07:00
WarmUpTill
06ea7bf1d9 Fix crash when deleting macro with wait action
Note that this might still not be completely race free but should
improve the situation a lot.
2021-08-09 11:39:20 -07:00
WarmUpTill
87aa8d3b40 Remove code used for backwards compatibility 2021-07-29 15:16:29 -07:00
WarmUpTill
c964ed04d3 Clean up includes 2021-07-22 09:40:31 -07:00
WarmUpTill
810235e0b7 Clean up duplicate code 2021-07-22 09:40:31 -07:00
WarmUpTill
84e4b740a8 Prevent accidental edits of actions and conditions when scrolling 2021-07-22 09:40:31 -07:00
WarmUpTill
058af0d3bb Move GetShortDesc() and GetId() to MacroSegment class 2021-07-22 09:40:31 -07:00
WarmUpTill
fd789b476b Persist collapse / expand state 2021-07-22 09:40:31 -07:00
WarmUpTill
3fc82df278 Handle macro control signals 2021-07-22 09:40:31 -07:00
WarmUpTill
497dbd89d4 Fix warning 2021-07-13 13:14:43 -07:00
WarmUpTill
7e3e621ae5 Log long condition checks 2021-07-03 09:12:30 -07:00
WarmUpTill
57c0734ba6 Display more information about macros in collapsed state 2021-06-19 06:58:06 -07:00
WarmUpTill
326cc0c46f Add generic time constraint to macro conditions
Almost every macro condition can benefit from having the option to
specify a time constraint.
Instead of adding it to each condition separately add it to all
conditions with the option of excluding it when registering a new
condition type.
2021-06-03 10:19:19 -07:00
WarmUpTill
d9997d374d Add option to un-/pause macros using hotkeys 2021-05-30 11:05:44 -07:00
WarmUpTill
48e6bcbb7a Fix conditions and actions referencing macros not loading correctly
The reason is that while loading the required macro might not have been
loaded resulting in the pointer to the macro never being set correctly
in the loading phase.
2021-05-27 12:05:44 -07:00
WarmUpTill
77642c54d8 Add macro count member
Used to indicate the number of times the actions were executed.
2021-05-27 12:05:44 -07:00
WarmUpTill
5eb8378612 Run condition check for paused macros
Otherwise conditions might behave in unexpected ways when resuming.
For example, audio could immediately match after unpause, when it
matched before it was paused due to timers not being updated.
2021-05-23 12:15:04 -07:00
WarmUpTill
961ea655fd
Macro pause (#201)
* Add option to pause individual macros
* Add macro action to pause and unpause macros
2021-05-23 08:54:59 +02:00
WarmUpTill
186198bfd4 Reduce macro logging in non-verbose mode 2021-05-22 12:14:56 +02:00
WarmUpTill
283025f1a8 Add helper function to convert to new id format 2021-05-22 03:07:09 -07:00
WarmUpTill
5b4ddfa669 Adjust logging to use new ids 2021-05-22 03:07:09 -07:00
WarmUpTill
572b974b82 Switch to using string as ids for actions and conditions
Using int is an id was getting messy with more and more conditions and
actions beeing added.
It also made the order of conditions and actions in the respective
comboboxes unchangable as there was a 1 to 1 relation of index and id.
2021-05-22 03:07:09 -07:00
WarmUpTill
72bd905e7c Improve logging for macros 2021-05-20 11:36:08 -07:00
WarmUpTill
305ce96ad0 Adjust includes to new file name 2021-05-17 12:20:54 -07:00
WarmUpTill
3abeb936b3 Fix random order of various macro entries 2021-05-15 01:03:07 -07:00