mcallegari / qlcplus

Q Light Controller Plus (QLC+) is a free and cross-platform software to control DMX or analog lighting systems like moving heads, dimmers, scanners etc. This project is a fork of the great QLC project written by Heikki Junnila that aims to continue the QLC development and to introduce new features.
Apache License 2.0
918 stars 349 forks source link

Add feature stopOnExit to script #1573

Closed ldebs closed 1 month ago

ldebs commented 1 month ago

This feature introduces a new script command: stoponexit.

The purpose of this command is to control whether functions started during the script should be stopped at the end. When stoponexit is set to true, all functions started afterward will be stopped when the script finishes. By default, stoponexit is true.

Example usage:

stoponexit:false startfunction:2

stoponexit:true startfunction:3

stoponexit:false startfunction:4

* QLC v5:
```plaintext
Engine.startFunction(1);

Engine.stopOnExit(false);
Engine.startFunction(2);

Engine.stopOnExit(true);
Engine.startFunction(3);

Engine.stopOnExit(false);
Engine.startFunction(4);

In this script, functions 1 and 3 will be stopped at the end, but functions 2 and 4 will continue running.

mcallegari commented 1 month ago

is this backward compatible or does it break current projects?

ldebs commented 1 month ago

It should be backward compatible since the default value of this flag is true, which is the standard behavior.

coveralls commented 1 month ago

Coverage Status

coverage: 32.026% (-0.002%) from 32.028% when pulling c567776ab0850e2ff90f245ff13192317055f52d on ldebs:master into eea4be0faa5ad5cf2b1b4929c0d3ae9bddf30257 on mcallegari:master.

ldebs commented 1 month ago

Sorry for the initialization order; I hadn't compiled the QML version. I just did, and I changed the implementation of the QML version to be compliant with the description I gave of this feature. Currently, my local code also includes a new feature to wait for a function in the script. I need to separate this new feature in order to extract the right modification to amend the stopOnExit feature.

ldebs commented 1 month ago

Commit correction of v5 behavior done. Test on v5 ok.

ldebs commented 1 month ago

Merged with #1581