From df19ecf95381982bdd7426b66bab2ab2f7eef132 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Tue, 15 Apr 2025 12:38:02 +0200 Subject: [PATCH] Attempts to get I2C communcation working --- Participants/ParticipantUDP.cpp | 4 +++- Thing.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Participants/ParticipantUDP.cpp b/Participants/ParticipantUDP.cpp index f643587..8ead868 100644 --- a/Participants/ParticipantUDP.cpp +++ b/Participants/ParticipantUDP.cpp @@ -104,6 +104,7 @@ void ParticipantUDP::Update(unsigned long currentTimeMs) { if (thing == nullptr) continue; + std::cout << "Update thing " << (int)thing->id << std::endl; if (this->isIsolated == false) { PoseMsg* poseMsg = new PoseMsg(this->networkId, thing); this->Send(thing->owner, poseMsg); @@ -353,7 +354,8 @@ void ParticipantUDP::Process(Participant* sender, InvestigateMsg* msg) { void ParticipantUDP::Process(Participant* sender, ThingMsg* msg) { #if defined(DEBUG) std::cout << this->name << ": process ThingMsg [" << (int)msg->networkId - << "/" << (int)msg->thingId << "] " << (int)msg->thingType << " " << (int)msg->parentId << "\n"; + << "/" << (int)msg->thingId << "] " << (int)msg->thingType << " " + << (int)msg->parentId << "\n"; #endif } diff --git a/Thing.cpp b/Thing.cpp index 86e4008..96c888f 100644 --- a/Thing.cpp +++ b/Thing.cpp @@ -43,7 +43,7 @@ Thing::Thing(Participant* owner, int thingType, unsigned char thingId) { // std::cout << "add thing [" << (int)this->id << "] to owner " // << this->owner->ipAddress << ":" << this->owner->port << std::endl; - this->owner->Add(this, false); + this->owner->Add(this, true); } // Thing::Thing(Participant* owner,