Merge remote-tracking branch 'origin_gitea/main' into Braccio

This commit is contained in:
Pascal Serrarens 2025-04-11 11:09:09 +02:00
commit 5bce1b7d2a
2 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,10 @@ unsigned char BinaryMsg::Serialize(char* buffer) {
if (this->dataLength <= 0) // in this case, no data is actually sent if (this->dataLength <= 0) // in this case, no data is actually sent
return 0; return 0;
#if defined(DEBUG)
std::cout << "Send BinaryMsg [" << (int)this->networkId << "/" << (int)this->thingId
<< "] " << (int)this->dataLength << std::endl;
#endif
unsigned char ix = 0; unsigned char ix = 0;
buffer[ix++] = this->id; buffer[ix++] = this->id;
buffer[ix++] = this->networkId; buffer[ix++] = this->networkId;

View File

@ -32,6 +32,10 @@ ThingMsg::ThingMsg(unsigned char networkId, Thing* thing) {
ThingMsg::~ThingMsg() {} ThingMsg::~ThingMsg() {}
unsigned char ThingMsg::Serialize(char* buffer) { unsigned char ThingMsg::Serialize(char* buffer) {
#if defined(DEBUG)
std::cout << "Send ThingMsg [" << (int)this->networkId << "/" << (int)this->thingId
<< "] " << (int)this->thingType << " " << (int)this->parentId << std::endl;
#endif
unsigned char ix = 0; unsigned char ix = 0;
buffer[ix++] = this->id; buffer[ix++] = this->id;
buffer[ix++] = this->networkId; buffer[ix++] = this->networkId;