Remove RTTI dependency, increase default timeout for communication

pull/64/head
Jonathan Schwartz 2023-12-06 22:35:17 +00:00
parent e56c714a0c
commit 28ba94fa25
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ public:
bool removeMessageCallback(int id);
std::shared_ptr<Message> waitForMessageSync(
const std::shared_ptr<MessageFilter>& f = {},
std::chrono::milliseconds timeout = std::chrono::milliseconds(50)) {
std::chrono::milliseconds timeout = std::chrono::milliseconds(500)) {
return waitForMessageSync([](){ return true; }, f, timeout);
}
// onceWaitingDo is a way to avoid race conditions.

View File

@ -29,7 +29,7 @@ public:
if(message->type == Message::Type::Frame || message->type == Message::Type::Main51 ||
message->type == Message::Type::RawMessage || message->type == Message::Type::ReadSettings) {
const auto frame = std::dynamic_pointer_cast<RawMessage>(message);
const auto frame = std::static_pointer_cast<RawMessage>(message);
if(!matchNetworkType(frame->network.getType()))
return false;
if(!matchNetID(frame->network.getNetID()))