Use invokeMethod() on m_appControl-pointer to call getCurrentProgramMode().
This commit is contained in:
parent
dfba8e3807
commit
af72ad43a4
@ -513,8 +513,15 @@ int VMC::SendVersion(QString VersionString) {
|
||||
int VMC::SendCurrentState()
|
||||
{
|
||||
QByteArray message(QByteArray::fromHex("3E1132"));
|
||||
message.append(static_cast<char>(main->getCurrentProgramMode()));
|
||||
|
||||
PROGRAM_MODE currentMode;
|
||||
if (QMetaObject::invokeMethod(m_appControl,
|
||||
"getCurrentProgramMode",
|
||||
Qt::DirectConnection,
|
||||
Q_RETURN_ARG(PROGRAM_MODE, currentMode))) {
|
||||
message.append(static_cast<char>(currentMode));
|
||||
SendMessage(message);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user