Compare commits
76 Commits
dev-gobot-
...
i2c-helper
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2824bdac6e | ||
|
|
b040662551 | ||
|
|
0b620a76ca | ||
|
|
89f494ba58 | ||
|
|
c73a9212eb | ||
|
|
9ab6cbe097 | ||
|
|
2a038367a8 | ||
|
|
1f5148dcdd | ||
|
|
1e317adedd | ||
|
|
caf7586b5b | ||
|
|
08154454fa | ||
|
|
7dd6686b01 | ||
|
|
db464efa36 | ||
|
|
aa9d00bf6e | ||
|
|
bac01e3a9b | ||
|
|
1fd8737fe4 | ||
|
|
cbf702c6d5 | ||
|
|
894d5f4380 | ||
|
|
78a5148a1e | ||
|
|
0bb125fad9 | ||
|
|
ad61e7e9b7 | ||
|
|
c136056ed2 | ||
|
|
edc2dd6294 | ||
|
|
58043ee0d5 | ||
|
|
65df7b1912 | ||
|
|
877040362c | ||
|
|
ec2225aa4e | ||
|
|
6ef60a3f2f | ||
|
|
6f107aea76 | ||
|
|
801e791199 | ||
|
|
bdec2db94d | ||
|
|
c1dc89eb58 | ||
|
|
f26cc07558 | ||
|
|
51ce3af221 | ||
|
|
e091d4df18 | ||
|
|
c6fd825e39 | ||
|
|
e7a0035041 | ||
|
|
f002a01308 | ||
|
|
6ba0535af9 | ||
|
|
4bfb1f533e | ||
|
|
5683168a47 | ||
|
|
9c0c676be8 | ||
|
|
b150a905a3 | ||
|
|
46f3514c6a | ||
|
|
a755a954f6 | ||
|
|
7eebf619ae | ||
|
|
93c40e1805 | ||
|
|
c7c5cea341 | ||
|
|
91c2125458 | ||
|
|
f0ae696c4d | ||
|
|
51587757b1 | ||
|
|
096a6c18d6 | ||
|
|
f4b591a5e6 | ||
|
|
a2032d72fd | ||
|
|
57e73127cc | ||
|
|
53a5c10cee | ||
|
|
f5281e37c8 | ||
|
|
783799832c | ||
|
|
61abb16b83 | ||
|
|
0dc0f82938 | ||
|
|
1786fa0b41 | ||
|
|
f3490212bf | ||
|
|
84e351d154 | ||
|
|
986927d740 | ||
|
|
6be2dd0b7d | ||
|
|
b2ffcb5d72 | ||
|
|
1ad6c75788 | ||
|
|
e97472c2a3 | ||
|
|
bba35c9622 | ||
|
|
9640a5b747 | ||
|
|
49d52ca0ed | ||
|
|
08598ca7a3 | ||
|
|
36f6f1863b | ||
|
|
0c1b8f4e86 | ||
|
|
29af5335f5 | ||
|
|
8b97a1853d |
BIN
gobotrpc/.gitignore
LFS
vendored
BIN
gobotrpc/.gitignore
LFS
vendored
Binary file not shown.
22
gobotrpc/.vscode/tasks.json
vendored
22
gobotrpc/.vscode/tasks.json
vendored
@@ -1,22 +0,0 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "Run Main",
|
||||
"command": "python3 generator/main.py",
|
||||
"type": "shell",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated",
|
||||
"focus": true,
|
||||
"clear": true
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
Binary file not shown.
BIN
gobotrpc/generator/main.py
LFS
BIN
gobotrpc/generator/main.py
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
gobotrpc/generator/src/util.py
LFS
BIN
gobotrpc/generator/src/util.py
LFS
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
add_libary(gobotrpc STATIC)
|
||||
|
||||
target_sources(gobotrpc
|
||||
PRIVATE
|
||||
{%- for n in cpp_files %}
|
||||
{{ n }}
|
||||
{%- endfor %}
|
||||
)
|
||||
|
||||
target_include_directories(gobotrpc
|
||||
PUBLIC
|
||||
include
|
||||
)
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
/**
|
||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
||||
*/
|
||||
|
||||
{% for enum in enum_list -%}
|
||||
enum class {{ enum.name }} {{ "{" }}
|
||||
{% for key in enum.map -%}
|
||||
{{ "\t" }}{{ key }} = {{ enum.map[key] }},
|
||||
{% endfor %}{{ "}" }};
|
||||
|
||||
{% endfor %}
|
||||
@@ -1,29 +0,0 @@
|
||||
#pragma once
|
||||
/**
|
||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
||||
*/
|
||||
|
||||
#include {{ "<stdint.h>" }}
|
||||
#include "{{ enum_header_file }}"
|
||||
|
||||
enum {{ prefix }}RPCNames {{"{"}}
|
||||
{%- for n in rpcNames %}
|
||||
{{ n }} = {{ rpcNames[n] }},
|
||||
{%- endfor %}
|
||||
{{"}"}};
|
||||
|
||||
enum {{ prefix }}RPCTypes {{"{"}}
|
||||
{%- for n in rpcTypes %}
|
||||
{{ n }} = {{ rpcTypes[n] }},
|
||||
{%- endfor %}
|
||||
{{"}"}};
|
||||
|
||||
int getPackageSize(uint8_t data);
|
||||
|
||||
{% for struct in package_list %}
|
||||
struct {{ struct.name }} {{ "{" }}
|
||||
{% for field in struct.fields -%}
|
||||
{{ "\t" }}{{ field.type }} {{ field.name }} : {{ field.size_bits }};
|
||||
{% endfor -%}
|
||||
{{ "}" }};
|
||||
{% endfor %}
|
||||
@@ -1,20 +0,0 @@
|
||||
#pragma once
|
||||
/**
|
||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
||||
*/
|
||||
|
||||
#include {{ "<stdint.h>" }}
|
||||
{%- for h in headers %}
|
||||
#include {{ "\"" + h + "\"" }}
|
||||
{%- endfor %}
|
||||
|
||||
int getPackageSize(uint8_t data) {
|
||||
switch(data) {
|
||||
{%- for n in rpcSizes %}
|
||||
case {{ prefix }}RPCNames::{{ n }}:
|
||||
return {{ rpcSizes[n] }};
|
||||
{%- endfor %}
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
25
gobotrpc/out/cpp/.vscode/tasks.json
vendored
25
gobotrpc/out/cpp/.vscode/tasks.json
vendored
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "CMake: build",
|
||||
"command": "build",
|
||||
"targets": [
|
||||
"all"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [],
|
||||
"detail": "CMake template build task",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": true,
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.28.3)
|
||||
project(TestingGobotRPCParser)
|
||||
|
||||
|
||||
# GoogleTest requires at least C++23
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Adding gtest
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
gcov
|
||||
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
|
||||
add_executable(TestingGobotRPCParser test/main.cpp)
|
||||
target_link_libraries(TestingGobotRPCParser gtest_main)
|
||||
@@ -1,11 +0,0 @@
|
||||
add_libary(gobotrpc STATIC)
|
||||
|
||||
target_sources(gobotrpc
|
||||
PRIVATE
|
||||
src/package_util.cpp
|
||||
)
|
||||
|
||||
target_include_directories(gobotrpc
|
||||
PUBLIC
|
||||
include
|
||||
)
|
||||
@@ -1,33 +0,0 @@
|
||||
#pragma once
|
||||
/**
|
||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
||||
*/
|
||||
|
||||
enum class GOBOTRPC_ENUM_NodeType {
|
||||
kHub = 0,
|
||||
kHead = 1,
|
||||
kCorexy = 2,
|
||||
kVacun = 3,
|
||||
};
|
||||
|
||||
enum class GOBOTRPC_ENUM_NodeStatus {
|
||||
kReady = 0,
|
||||
kWorking = 1,
|
||||
kBusy = 2,
|
||||
kError = 3,
|
||||
};
|
||||
|
||||
enum class GOBOTRPC_ENUM_ErrorCode {
|
||||
};
|
||||
|
||||
enum class GOBOTRPC_ENUM_HeadPos {
|
||||
kUp = 0,
|
||||
kDown = 1,
|
||||
};
|
||||
|
||||
enum class GOBOTRPC_ENUM_StoneStatus {
|
||||
kEmpty = 0,
|
||||
kLow = 1,
|
||||
kFill = 2,
|
||||
};
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
#pragma once
|
||||
/**
|
||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "enums.hpp"
|
||||
|
||||
enum GOBOTRPC_RPCNames {
|
||||
kInvalid = 255,
|
||||
kGetInfo = 1,
|
||||
kReset = 2,
|
||||
kResetInfo = 3,
|
||||
kStatusUpdate = 4,
|
||||
kError = 5,
|
||||
kHome = 7,
|
||||
kGoto = 9,
|
||||
kSetBoardCorner = 11,
|
||||
kSetVacumOffset = 13,
|
||||
kReleaseMotors = 15,
|
||||
kDrop = 17,
|
||||
kStoneStatus = 19,
|
||||
kMoveZAxis = 21,
|
||||
kSetVacum = 23,
|
||||
};
|
||||
|
||||
enum GOBOTRPC_RPCTypes {
|
||||
kReq = 0,
|
||||
kRes = 1,
|
||||
};
|
||||
|
||||
int getPackageSize(uint8_t data);
|
||||
|
||||
|
||||
struct GOBOTRPC_GetInfoReq {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_GetInfoRes {
|
||||
int32_t addr : 32;
|
||||
GOBOTRPC_ENUM_NodeType type : 8;
|
||||
GOBOTRPC_ENUM_NodeStatus status : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_ResetReq {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_ResetInfoRes {
|
||||
GOBOTRPC_ENUM_NodeStatus status : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_StatusUpdateRes {
|
||||
GOBOTRPC_ENUM_NodeStatus status : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_ErrorRes {
|
||||
GOBOTRPC_ENUM_ErrorCode error : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_HomeReq {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_HomeRes {
|
||||
int32_t x : 32;
|
||||
int32_t y : 32;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_GotoReq {
|
||||
int8_t x : 8;
|
||||
int8_t y : 8;
|
||||
bool offset : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_GotoRes {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_SetBoardCornerReq {
|
||||
int32_t x1 : 32;
|
||||
int32_t y1 : 32;
|
||||
int32_t x2 : 32;
|
||||
int32_t y2 : 32;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_SetBoardCornerRes {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_SetVacumOffsetReq {
|
||||
int32_t x : 32;
|
||||
int32_t y : 32;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_SetVacumOffsetRes {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_ReleaseMotorsReq {
|
||||
bool enable : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_ReleaseMotorsRes {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_DropReq {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_DropRes {
|
||||
GOBOTRPC_ENUM_StoneStatus status : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_StoneStatusReq {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_StoneStatusRes {
|
||||
GOBOTRPC_ENUM_StoneStatus status : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_MoveZAxisReq {
|
||||
GOBOTRPC_ENUM_HeadPos pos : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_MoveZAxisRes {
|
||||
};
|
||||
|
||||
struct GOBOTRPC_SetVacumReq {
|
||||
bool enable : 8;
|
||||
};
|
||||
|
||||
struct GOBOTRPC_SetVacumRes {
|
||||
};
|
||||
@@ -1,63 +0,0 @@
|
||||
#pragma once
|
||||
/**
|
||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "package_structs.hpp"
|
||||
#include "enums.hpp"
|
||||
|
||||
int getPackageSize(uint8_t data) {
|
||||
switch(data) {
|
||||
case RPCNames::GOBOTRPC_GetInfoReq:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_GetInfoRes:
|
||||
return 6;
|
||||
case RPCNames::GOBOTRPC_ResetReq:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_ResetInfoRes:
|
||||
return 1;
|
||||
case RPCNames::GOBOTRPC_StatusUpdateRes:
|
||||
return 1;
|
||||
case RPCNames::GOBOTRPC_ErrorRes:
|
||||
return 1;
|
||||
case RPCNames::GOBOTRPC_HomeReq:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_HomeRes:
|
||||
return 8;
|
||||
case RPCNames::GOBOTRPC_GotoReq:
|
||||
return 3;
|
||||
case RPCNames::GOBOTRPC_GotoRes:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_SetBoardCornerReq:
|
||||
return 16;
|
||||
case RPCNames::GOBOTRPC_SetBoardCornerRes:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_SetVacumOffsetReq:
|
||||
return 8;
|
||||
case RPCNames::GOBOTRPC_SetVacumOffsetRes:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_ReleaseMotorsReq:
|
||||
return 1;
|
||||
case RPCNames::GOBOTRPC_ReleaseMotorsRes:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_DropReq:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_DropRes:
|
||||
return 1;
|
||||
case RPCNames::GOBOTRPC_StoneStatusReq:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_StoneStatusRes:
|
||||
return 1;
|
||||
case RPCNames::GOBOTRPC_MoveZAxisReq:
|
||||
return 1;
|
||||
case RPCNames::GOBOTRPC_MoveZAxisRes:
|
||||
return 0;
|
||||
case RPCNames::GOBOTRPC_SetVacumReq:
|
||||
return 1;
|
||||
case RPCNames::GOBOTRPC_SetVacumRes:
|
||||
return 0;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(DummyTest, BasicAssertions) {
|
||||
// Expect two strings not to be equal.
|
||||
EXPECT_STRNE("hello", "world");
|
||||
// Expect equality.
|
||||
EXPECT_EQ(7 * 6, 42);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
defusedxml==0.7.1
|
||||
ezodf==0.3.2
|
||||
Jinja2==3.1.5
|
||||
lxml==5.3.0
|
||||
MarkupSafe==3.0.2
|
||||
mkl-service==2.4.0
|
||||
odfpy==1.4.1
|
||||
setuptools==75.1.0
|
||||
wheel==0.44.0
|
||||
16
spec/gobot-spec/.obsidian/workspace.json
vendored
16
spec/gobot-spec/.obsidian/workspace.json
vendored
@@ -34,21 +34,9 @@
|
||||
"icon": "lucide-file",
|
||||
"title": "CAN Protocol"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cb5a4191e020890f",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "release-notes",
|
||||
"state": {
|
||||
"currentVersion": "1.7.7"
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "Release Notes 1.7.7"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 2
|
||||
"currentTab": 1
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
@@ -190,7 +178,7 @@
|
||||
"command-palette:Open command palette": false
|
||||
}
|
||||
},
|
||||
"active": "cb5a4191e020890f",
|
||||
"active": "e41a6e6ed9e71bfa",
|
||||
"lastOpenFiles": [
|
||||
"Untitled.canvas",
|
||||
"CAN Protocol.md",
|
||||
|
||||
Reference in New Issue
Block a user