Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update params #12

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
with:
repository: PonomarevDA/libparams
path: Libs/libparams
fetch-depth: 0
- run: cd ./Libs/libparams && git checkout ecac253
ref: v0.6.7

- name: Install dependencies
run: |
Expand Down
22 changes: 19 additions & 3 deletions Cyphal/params.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
uavcan.node.id : ["Integer", "PARAM_NODE_ID", "mutable", 50, 0, 256]
system.name : ["String", "PARAM_NODE_NAME", "mutable", ""]
uavcan.node.description : ["String", "PARAM_NODE_DESCRIPTION", "mutable", ""]
uavcan.node.id:
type: Integer
enum: PARAM_NODE_ID
flags: mutable
default: 50
min: 0
max: 256

system.name:
type: String
enum: PARAM_NODE_NAME
flags: mutable
default: ""

uavcan.node.description:
type: String
enum: PARAM_NODE_DESCRIPTION
flags: mutable
default: ""
4 changes: 2 additions & 2 deletions examples/ubuntu_minimal/params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include "storage.h"

IntegerDesc_t integer_desc_pool[] = {
{(uint8_t*)"id", 0, 127, 50},
{"id", 0, 127, 50},
};
IntegerParamValue_t integer_values_pool[sizeof(integer_desc_pool) / sizeof(IntegerDesc_t)];

StringDesc_t __attribute__((weak)) string_desc_pool[NUM_OF_STR_PARAMS] = {
{(uint8_t*)"name", "", false},
{"name", "", false},

};
StringParamValue_t string_values_pool[sizeof(string_desc_pool) / sizeof(StringDesc_t)];
8 changes: 4 additions & 4 deletions examples/ubuntu_publisher_example/params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
#include "storage.h"

IntegerDesc_t integer_desc_pool[] = {
{(uint8_t*)"id", 0, 127, 50},
{(uint8_t*)"uavcan.pub.feedback.id", 2100, 2100, 2100},
{"id", 0, 127, 50},
{"uavcan.pub.feedback.id", 2100, 2100, 2100},
};
IntegerParamValue_t integer_values_pool[sizeof(integer_desc_pool) / sizeof(IntegerDesc_t)];

StringDesc_t __attribute__((weak)) string_desc_pool[NUM_OF_STR_PARAMS] = {
{(uint8_t*)"name", "", false},
{(uint8_t*)"uavcan.pub.feedback.type", "reg.udral.service.actuator.common.Feedback.0.1", true},
{"name", "", false},
{"uavcan.pub.feedback.type", "reg.udral.service.actuator.common.Feedback.0.1", true},
};
StringParamValue_t string_values_pool[sizeof(string_desc_pool) / sizeof(StringDesc_t)];