[FSD] In order to get the UNIT tests working, we need to call the "FSD direct message" send function

* added sendDirectMessage and renamed other function to sendQueudedMessage
* UNIT tests call "direct message" sending
* minor style changes
This commit is contained in:
Klaus Basan
2019-11-14 20:26:16 +01:00
committed by Mat Sutcliffe
parent f6f719a67e
commit 3a4f114308
3 changed files with 54 additions and 42 deletions

View File

@@ -248,11 +248,23 @@ namespace BlackCore
//! Message send to FSD
template <class T>
void sendMessage(const T &message)
void sendQueudedMessage(const T &message)
{
if (!message.isValid()) { return; }
if (m_unitTestMode)
{
this->sendDirectMessage(message);
return;
}
m_queuedFsdMessages.enqueue(messageToFSDString(message));
// this->sendMessageString(messageToFSDString(message));
}
//! Message send to FSD
template <class T>
void sendDirectMessage(const T &message)
{
if (!message.isValid()) { return; }
this->sendMessageString(messageToFSDString(message));
}
//! Unit test/debug functions @{