Renamed Files and added Heart beat

This commit is contained in:
AlexanderHD27
2024-12-30 17:17:07 +01:00
parent 58043ee0d5
commit edc2dd6294
14 changed files with 188 additions and 136 deletions

View File

@@ -2,8 +2,6 @@
#include "protocol.hpp"
#include <string.h>
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
RPCHeader parseRPCHeader(char data)
{
RPCHeader header;
@@ -54,6 +52,9 @@ FrameSubmitionResult GobotRPCParser::submit_frame(char *data, size_t length, uin
this->buffer[slotNum].timestamp = timestamp;
this->buffer[slotNum].length = MAX(this->buffer[slotNum].length, header.segment*7 + (length - 1));
volatile FrameSubmitionResult res = getPackageStatus(&(this->buffer[slotNum]));
// Push the update to the control interface
ctrlInterface->pushPackageSlotUpdate(res == COMPLEATE, this->buffer[slotNum].is_in_use, slotNum, addr, timestamp, this->buffer[slotNum].used_bit_masked);
if (res == COMPLEATE) {
this->buffer[slotNum].is_complete = true;