refactor: Address (Windows) compile warnings (#840)

* Windows compile errors and (Qt 5.15 deprecation) warnings

* Usability - Enable/Disable Instance button

Co-authored-by: brindosch <edeltraud70@gmx.de>
This commit is contained in:
LordGrey
2020-06-28 23:05:32 +02:00
committed by GitHub
parent e365a2839d
commit bfb50b8d91
61 changed files with 530 additions and 365 deletions

View File

@@ -1,5 +1,8 @@
#include "LedDeviceUdpH801.h"
const ushort H801_DEFAULT_PORT = 30977;
static const char H801_DEFAULT_HOST[] = "255.255.255.255";
LedDeviceUdpH801::LedDeviceUdpH801(const QJsonObject &deviceConfig)
: ProviderUdp()
{
@@ -31,8 +34,8 @@ bool LedDeviceUdpH801::init(const QJsonObject &deviceConfig)
}
_message = QByteArray(_prefix_size + _colors + _id_size * _ids.size() + _suffix_size, 0x00);
_message[0] = 0xFB;
_message[1] = 0xEB;
_message[0] = static_cast<char>(0xFB);
_message[1] = static_cast<char>(0xEB);
for (int i = 0; i < _ids.length(); i++) {
_message[_prefix_size + _colors + i * _id_size + 0] = (_ids[i] >> 0x00) & 0xFF;