Skip to content

Commit

Permalink
update params
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomarevDA committed Nov 1, 2023
1 parent 2f2b3c8 commit de9be50
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
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)];

0 comments on commit de9be50

Please sign in to comment.