Skip to content

Commit

Permalink
Manual merge of master
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Dec 4, 2020
1 parent 1bada65 commit b4e7581
Show file tree
Hide file tree
Showing 415 changed files with 13,276 additions and 6,225 deletions.
26 changes: 15 additions & 11 deletions appveyor.yml
@@ -1,4 +1,6 @@
version: 4.12.3.{build}
version: 4.12.4.{build}

image: Visual Studio 2019

environment:
MSYSTEM: MSYS
Expand All @@ -14,16 +16,18 @@ configuration:
install:
#- pacman --noconfirm -Sy
#- pacman --noconfirm --needed -S pacman-mirrors
#- pacman --noconfirm -Sy
#- pacman --noconfirm -Syu
- pacman --noconfirm --needed -S unzip mingw32/mingw-w64-i686-libmad mingw32/mingw-w64-i686-libsndfile mingw32/mingw-w64-i686-flac mingw32/mingw-w64-i686-fftw mingw32/mingw-w64-i686-nsis
- wget http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libs-7.4.0-1-any.pkg.tar.xz -P /c/projects
- wget http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-7.4.0-1-any.pkg.tar.xz -P /c/projects
- wget http://www.qlcplus.org/misc/mingw-w64-i686-qt5-5.6.2-4-any.pkg.tar.xz -P /c/projects
- pacman --noconfirm -Rdd mingw-w64-i686-gcc
- pacman --noconfirm -Rdd mingw-w64-i686-gcc-libs
- pacman --noconfirm --needed -U /c/projects/mingw-w64-i686-gcc-libs-7.4.0-1-any.pkg.tar.xz
- pacman --noconfirm --needed -U /c/projects/mingw-w64-i686-gcc-7.4.0-1-any.pkg.tar.xz
- pacman --noconfirm --needed -U /c/projects/mingw-w64-i686-qt5-5.6.2-4-any.pkg.tar.xz
#- wget http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libs-9.3.0-2-any.pkg.tar.xz -P /c/projects
#- wget http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-9.3.0-2-any.pkg.tar.xz -P /c/projects
- wget http://www.qlcplus.org/misc/mingw-w64-i686-qt5-5.14.2-2-any.pkg.tar.zst -P /c/projects
- wget http://www.qlcplus.org/misc/qttools-5.14.2.zip -P /c/projects
#- pacman --noconfirm -Rdd mingw-w64-i686-gcc
#- pacman --noconfirm -Rdd mingw-w64-i686-gcc-libs
#- pacman --noconfirm --needed -U /c/projects/mingw-w64-i686-gcc-libs-9.3.0-2-any.pkg.tar.xz
#- pacman --noconfirm --needed -U /c/projects/mingw-w64-i686-gcc-9.3.0-2-any.pkg.tar.xz
- pacman --noconfirm --needed -U /c/projects/mingw-w64-i686-qt5-5.14.2-2-any.pkg.tar.zst
- unzip -d /c/msys64/mingw32/ /c/projects/qttools-5.14.2.zip

build_script:
- ps: >-
Expand Down Expand Up @@ -66,4 +70,4 @@ build_script:
artifacts:
- path: QLC+_$(APPVEYOR_BUILD_VERSION).exe
name: qlcplus_4_12_3
name: qlcplus_4_12_4
29 changes: 28 additions & 1 deletion debian/changelog
@@ -1,15 +1,37 @@
qlcplus (4.12.4) stable; urgency=low

* engine: RGB Matrix can now control white, amber, UV, dimmer and shutter channels too (started by Hans-Jürgen Tappe)
* engine: add "acts on" property to channels (thanks to Michał Kluska)
* Virtual Console/Button: fix submaster not affecting a Chaser startup intensity
* Plugins/E1.31: make CID unique on each network interface
* New input profile: Novation Launchpad Mini MK3 (thanks to Felix)
* New input profile: KORG nanoKONTROL Studio (thanks to Hans-Jürgen Tappe)
* New fixture: Varytec Giga Bar Pix 8 RGB (thanks to Felix)
* New fixture: Clay Paky Mini-B
* New fixture: Eurolite LED PT-100/32 Pixel DMX Tube (thanks to Torsten Caninenberg)
* New fixture: U'King LED Spot Moving Head 100W (thanks to Jay Seaman)
* New fixtures: Equinox Microbar Quad System, U'King 7x10W Mini Moving Head (thanks to Peter Crowther)
* New fixture: Starway MaxSpot 500 (thanks to David Thomas)

-- Massimo Callegari <massimocallegari@yahoo.it> Sun, 20 Dec 2020 12:13:14 +0200

qlcplus (4.12.3) stable; urgency=low

* engine: fix cloning a Show
* engine: audio/video files not found are now shown in error log
* engine: reduce audio playback startup latency in some cases
* engine: improved audio input level (thanks to Damien Zammit)
* UI: fix virtual console resize
* UI: fix crash on 2D monitor strobing
* UI: fix sorting in DMX dump dialog
* UI/Audio Editor: fix selected device index (thanks to Santiago Benejam Torres)
* UI/Simple Desk: fix playback sliders numbering
* Virtual Console: fix Animation and Audio Trigger widgets to respond to submaster (thanks to Branimir Amidžić)
* Virtual Console: fix submaster not affecting a Sequence in a Cue List (thanks to ryhel)
* Virtual Console/Cue List: fix input when side fader type is set to None
* Resources: added Novation Launch Control XL input profile (thanks to pille)
* Resources: updated Novation Launchpad Pro input profile (thanks to Nate Doyon)
* Resources: added RGB script 'Alternate' (thanks to Hans-Jürgen Tappe)
* New fixtures: Cameo Auro Spot 300, Auro Spot 400, Storm, Zenit B60 (thanks to Jannis Achstetter and Henrik Bauer)
* New fixtures: American DJ Vizi Wash LED 108, Eurolite LED B-40 Beam, Eurolite TMH X3 (thanks to Jannis Achstetter and Henrik Bauer)
* New fixtures: Litecraft OutLED AT10, Litecraft WashX.36, Martin JEM ZR24-7 (thanks to Jannis Achstetter and Henrik Bauer)
Expand Down Expand Up @@ -49,8 +71,13 @@ qlcplus (4.12.3) stable; urgency=low
* New fixture: American DJ Emerald Scan (thanks to Skye Peterson)
* New fixture: lightmaXX Platinum CLS-3 MKII (thanks to Hans-Juergen Tappe)
* New fixture: Chauvet Scorpion Dual RGB (thanks to Ryan Morgan)
* New fixtures: Rockville Motionstrip RGBW, U'King 4 Head Beam RGBW (thanks to Donny Lockart)
* New fixture: Ayra ERO Micro Spot (thanks to Bob)
* New fixture: American DJ 12P Hex IP (thanks to István Király)
* New fixture: Showtec Club Par 12-6 RGBWAUV (thanks to Santiago Benejam Torres)
* New fixture: Ledj Stage Color Quad (thanks to Peter Crowther)

-- Massimo Callegari <massimocallegari@yahoo.it> Sun, 26 Apr 2020 12:13:14 +0200
-- Massimo Callegari <massimocallegari@yahoo.it> Sun, 30 Aug 2020 12:13:14 +0200

qlcplus (4.12.2) stable; urgency=low

Expand Down
9 changes: 8 additions & 1 deletion engine/src/chaserrunner.cpp
Expand Up @@ -20,6 +20,9 @@
*/

#include <QElapsedTimer>
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
#include <QRandomGenerator>
#endif
#include <QDebug>

#include "chaserrunner.h"
Expand Down Expand Up @@ -380,7 +383,11 @@ void ChaserRunner::shuffle(QVector<int> & data)
int n = data.size();
for (int i = n - 1; i > 0; --i)
{
qSwap(data[i], data[qrand() % (i + 1)]);
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
qSwap(data[i], data[qrand() % (i + 1)]);
#else
qSwap(data[i], data[QRandomGenerator::global()->generate() % (i + 1)]);
#endif
}
}

Expand Down
6 changes: 6 additions & 0 deletions engine/src/doc.cpp
Expand Up @@ -26,6 +26,9 @@
#include <QList>
#include <QTime>
#include <QDir>
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
#include <QRandomGenerator>
#endif

#include "qlcfixturemode.h"
#include "qlcfixturedef.h"
Expand Down Expand Up @@ -85,7 +88,10 @@ Doc::Doc(QObject* parent, int universes)
{
Bus::init(this);
resetModified();
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
qsrand(QTime::currentTime().msec());
#endif

}

Doc::~Doc()
Expand Down
9 changes: 9 additions & 0 deletions engine/src/inputoutputmap.cpp
Expand Up @@ -280,6 +280,15 @@ QList<Universe *> InputOutputMap::universes() const
return m_universeArray;
}

Universe *InputOutputMap::universe(quint32 id)
{
for (int i = 0; i < m_universeArray.size(); i++)
if (m_universeArray.at(i)->id() == id)
return m_universeArray.at(i);

return NULL;
}

QList<Universe*> InputOutputMap::claimUniverses()
{
m_universeMutex.lock();
Expand Down
6 changes: 6 additions & 0 deletions engine/src/inputoutputmap.h
Expand Up @@ -241,6 +241,12 @@ class InputOutputMap : public QObject
*/
QList<Universe*> universes() const;

/**
* Get a reference to a Universe from the given Universe ID
* Return NULL if no Universe is found
*/
Universe *universe(quint32 id);

/**
* Claim access to a universe. This is declared virtual to make
* unit testing a bit easier.
Expand Down
173 changes: 173 additions & 0 deletions engine/src/keypadparser.cpp
@@ -0,0 +1,173 @@
/*
Q Light Controller Plus
keypadparser.cpp
Copyright (c) Massimo Callegari
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.txt
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#include "keypadparser.h"
#include "qlcmacros.h"

KeyPadParser::KeyPadParser()
{

}

QList<SceneValue> KeyPadParser::parseCommand(Doc *doc, QString command, QByteArray &uniData)
{
QList<SceneValue> values;
if (doc == NULL)
return values;

QStringList tokens = command.split(" ");

int lastCommand = CommandNone;
quint32 fromChannel = 0;
quint32 toChannel = 0;
quint32 byChannel = 1;
float fromValue = 0;
float toValue = 0;
int thruCount = 0;

foreach (QString token, tokens)
{
if (token.isEmpty())
continue;

if (token == "AT")
{
lastCommand = CommandAT;
}
else if (token == "THRU")
{
lastCommand = CommandTHRU;
}
else if (token == "FULL")
{
lastCommand = CommandFULL;
}
else if (token == "ZERO")
{
lastCommand = CommandZERO;
}
else if (token == "BY")
{
lastCommand = CommandBY;
}
else if (token == "+")
{
lastCommand = CommandPlus;
}
else if (token == "-")
{
lastCommand = CommandMinus;
}
else if (token == "+%")
{
lastCommand = CommandPlusPercent;
}

else if (token == "-%")
{
lastCommand = CommandMinusPercent;
}
else if (token == "%")
{
if (lastCommand == CommandPlus)
lastCommand = CommandPlusPercent;
else if (lastCommand == CommandMinus)
lastCommand = CommandMinusPercent;
}
else
{
// most likely a number
bool ok = false;
int number = token.toUInt(&ok);

if (ok == false)
continue;

switch (lastCommand)
{
case CommandNone:
// no command: this is a channel number
fromChannel = number;
toChannel = fromChannel;
break;
case CommandAT:
fromValue = float(number);
toValue = fromValue;
break;
case CommandTHRU:
if (thruCount == 0)
toChannel = number;
else
toValue = float(number);
thruCount++;
break;
case CommandFULL:
fromValue = toValue = 255;
break;
case CommandZERO:
fromValue = toValue = 0;
break;
case CommandBY:
byChannel = number;
break;
case CommandPlus:
case CommandMinus:
toValue = number;
break;
case CommandPlusPercent:
case CommandMinusPercent:
toValue = float(number) / 100.0;
break;
}
}
}

float valueDelta = 0;
if (toValue != fromValue)
{
valueDelta = (float(toChannel) - float(fromChannel)) / float(byChannel);
valueDelta = (float(toValue) - float(fromValue)) / valueDelta;
}

for (quint32 i = fromChannel - 1; i <= toChannel - 1; i += byChannel)
{
uchar uniValue = 0;
SceneValue scv;

if (quint32(uniData.length()) >= i)
uniValue = uchar(uniData.at(i));

scv.channel = i;
if (lastCommand == CommandPlus)
scv.value = CLAMP(uniValue + toValue, 0, 255);
else if (lastCommand == CommandMinus)
scv.value = CLAMP(uniValue - toValue, 0, 255);
else if (lastCommand == CommandPlusPercent)
scv.value = CLAMP(uniValue * (1.0 + toValue), 0, 255);
else if (lastCommand == CommandMinusPercent)
scv.value = CLAMP(uniValue - (float(uniValue) * toValue), 0, 255);
else
scv.value = uchar(fromValue);

values.append(scv);
fromValue += valueDelta;
}

return values;
}
47 changes: 47 additions & 0 deletions engine/src/keypadparser.h
@@ -0,0 +1,47 @@
/*
Q Light Controller Plus
keypadparser.h
Copyright (c) Massimo Callegari
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.txt
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#ifndef KEYPADPARSER_H
#define KEYPADPARSER_H

#include "scenevalue.h"

class KeyPadParser
{
public:
KeyPadParser();

enum KeyPadCommands
{
CommandNone,
CommandAT,
CommandTHRU,
CommandFULL,
CommandZERO,
CommandBY,
CommandPlus,
CommandPlusPercent,
CommandMinus,
CommandMinusPercent
};

static QList<SceneValue> parseCommand(Doc *doc, QString command, QByteArray &uniData);
};

#endif // KEYPADPARSER_H

0 comments on commit b4e7581

Please sign in to comment.