Got homing sequenc to work, ....again

This commit is contained in:
AlexanderHD27
2025-01-01 16:47:53 +01:00
parent edc2dd6294
commit c136056ed2
36 changed files with 2464 additions and 9 deletions

BIN
i2c-hub/backend/Protocol.md (Stored with Git LFS)

Binary file not shown.

BIN
i2c-hub/backend/src/gobotRPC_ctrl_interface.py (Stored with Git LFS) Normal file

Binary file not shown.

View File

9
i2c-hub/backend/test.txt Normal file
View File

@@ -0,0 +1,9 @@
fe fe fe fe fc 10 10 10 20 ff 48 65 6c 6c 6f 20
6f 72 6c 64 21 0a 84 00 01 00 42 00 00 00 12
00 00 00 c0 84 01 01 01 43 00 00 00 22 00 00
3f 00 84 00 01 00 42 00 00 00 32 00 00 00 80
54 68 69 73 20 69 73 20 52 61 6e 64 6f 6d 20
65 78 74 0a 84 01 01 02 43 00 00 00 63 00 00
3f 00 84 01 01 00 42 00 00 00 73 00 00 00 bf
81 10 40 42 00 00 00 01 02 03 04 05 06 00 11
13 14 fe fe fe fe fe fe fc

Binary file not shown.

BIN
i2c-hub/circuit/i2c-hub/i2c-hub.kicad_prl (Stored with Git LFS) Normal file

Binary file not shown.

BIN
i2c-hub/circuit/i2c-hub/i2c-hub.kicad_pro (Stored with Git LFS)

Binary file not shown.

View File

@@ -6,7 +6,7 @@ void GobotRPC_CtrlInterface::pushPacket(RPCPackage package) {
char buffer[MAX_PAGE_SIZES + 7];
buffer[0] = GOBOTRPC_CTRL_CMD_PACKET;
buffer[1] = package.length;
buffer[1] = package.length - 7;
buffer[2] = package.type | (package.rpcNum << 4);
memcpy(&buffer[3], &package.addr, 4);
memcpy(&buffer[7], package.buffer, package.length);

View File

@@ -56,7 +56,7 @@ FrameSubmitionResult GobotRPCParser::submit_frame(char *data, size_t length, uin
// 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) {
y if (res == COMPLEATE) {
this->buffer[slotNum].is_complete = true;
}
@@ -118,6 +118,7 @@ void GobotRPCParser::retrivePackage(RPCPackage *dest, int index) {
dest->type = buffer[index].type;
dest->length = buffer[index].length;
this->ctrlInterface->pushPacket(*dest);
freePackageSlot(index);
}

View File

@@ -12,7 +12,7 @@
#include "ctrl_interface_hardware.hpp"
void vTaskMain(void * args) {
GobotRPC_CtrlInterface_HardwareHandler_RP2040 uartHandler(uart0, 115200, 500, 0, 1);
GobotRPC_CtrlInterface_HardwareHandler_RP2040 uartHandler(uart0, 9600, 1500, 0, 1);
GobotRPC_CtrlInterface ctrlInterface(&uartHandler);
GobotRPCParser rpcRXParser(&ctrlInterface);
@@ -27,6 +27,9 @@ void vTaskMain(void * args) {
rpcRXParser.submit_frame(data3, 7, 0x43, xTaskGetTickCount());
rpcRXParser.submit_frame(data1, 7, 0x42, xTaskGetTickCount());
ctrlInterface.printf("This is Random Text\n");
vTaskDelay(10 / portTICK_PERIOD_MS);
rpcRXParser.submit_frame(data3, 7, 0x43, xTaskGetTickCount());