catching up (trying to) wiht CSpot

This commit is contained in:
Philippe G
2022-01-06 18:46:57 -08:00
parent 491d0d260d
commit 9af4cd5b23
57 changed files with 2165 additions and 343 deletions

View File

@@ -9,7 +9,7 @@ std::map<MercuryType, std::string> MercuryTypeMap({
{MercuryType::UNSUB, "UNSUB"},
});
MercuryManager::MercuryManager(std::unique_ptr<Session> session): bell::Task("mercuryManager", 6 * 1024, +1, 1)
MercuryManager::MercuryManager(std::unique_ptr<Session> session): bell::Task("mercuryManager", 6 * 1024, 2, 1)
{
tempMercuryHeader = Header_init_default;
this->timeProvider = std::make_shared<TimeProvider>();
@@ -30,7 +30,7 @@ MercuryManager::MercuryManager(std::unique_ptr<Session> session): bell::Task("me
MercuryManager::~MercuryManager()
{
pb_release(Header_fields, tempMercuryHeader);
//pb_release(Header_fields, &tempMercuryHeader);
}
bool MercuryManager::timeoutHandler()
@@ -177,7 +177,6 @@ void MercuryManager::runTask()
}
if (static_cast<MercuryType>(packet->command) == MercuryType::PING) // @TODO: Handle time synchronization through ping
{
CSPOT_LOG(debug, "Got ping, syncing timestamp");
this->timeProvider->syncWithPingPacket(packet->data);
this->lastPingTimestamp = this->timeProvider->getSyncedTimestamp();