From a29163db315c86f37e84fb399fc60d21596b114c Mon Sep 17 00:00:00 2001 From: PonomarevDA Date: Thu, 7 Mar 2024 21:00:58 +0300 Subject: [PATCH] [TEMP] update libparams --- Libs/libparams | 2 +- Src/cyphal_application/README.md | 19 ++++++++++++------- Src/cyphal_application/application.cpp | 2 +- Src/dronecan_application/application.cpp | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Libs/libparams b/Libs/libparams index 436b89a..3551159 160000 --- a/Libs/libparams +++ b/Libs/libparams @@ -1 +1 @@ -Subproject commit 436b89ac9e04e47bc81dc8edca676338e60698b9 +Subproject commit 3551159371ed3fd0e0071485e2f89dfcc3c6a33f diff --git a/Src/cyphal_application/README.md b/Src/cyphal_application/README.md index 4babd95..74b6b77 100644 --- a/Src/cyphal_application/README.md +++ b/Src/cyphal_application/README.md @@ -1,12 +1,17 @@ The node has the following interface: -| № | Type | Message | Topic name | -| -- | ---- | ------- | ----------- | -| 1 | pub | uavcan.si.sample.voltage.Scalar.1.0 | crct.5v | {'type': 'Port', 'note': 'Voltage 5V', 'data_type': 'uavcan.si.sample.voltage.Scalar.1.0', 'enum_base': 'PARAM_PUB_CRCT_5V'}| -| 2 | pub | uavcan.si.sample.voltage.Scalar.1.0 | crct.vin | {'type': 'Port', 'note': 'Voltage Vin', 'data_type': 'uavcan.si.sample.voltage.Scalar.1.0', 'enum_base': 'PARAM_PUB_CRCT_VIN'}| -| 3 | pub | uavcan.si.sample.temperature.Scalar.1.0 | crct.temperature | {'type': 'Port', 'note': 'STM32 internal temperature', 'data_type': 'uavcan.si.sample.temperature.Scalar.1.0', 'enum_base': 'PARAM_PUB_CRCT_TEMPERATURE'}| -| 4 | sub | reg.udral.service.actuator.common.sp.Vector31 | setpoint | {'type': 'Port', 'data_type': 'reg.udral.service.actuator.common.sp.Vector31', 'enum_base': 'PARAM_SUB_SETPOINT'}| -| 5 | pub | reg.udral.service.actuator.common.Feedback.0.1 | feedback | {'type': 'Port', 'data_type': 'reg.udral.service.actuator.common.Feedback.0.1', 'enum_base': 'PARAM_PUB_FEEDBACK_1'}| +Cyphal Publishers: +| № | Data type and topic name | Description | +| -- | ------------------------- | ----------- | +| 1 | [uavcan.si.sample.voltage.Scalar](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/uavcan/si/sample/voltage/Scalar.1.0.dsdl)
crct.5v | Voltage 5V (after DC-DC).
The normal values are within [4.5, 5.5] Volts.
| +| 2 | [uavcan.si.sample.voltage.Scalar](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/uavcan/si/sample/voltage/Scalar.1.0.dsdl)
crct.vin | Voltage Vin (before DC-DC).
It make sense only when you power up the node from Molex 6-pin connector.
The normal values are within [5.5, 55] Volts.
| +| 3 | [uavcan.si.sample.temperature.Scalar](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/uavcan/si/sample/temperature/Scalar.1.0.dsdl)
crct.temperature | STM32 internal temperature.
It it expected that the temperature is a little bit higher then your room environment.
| +| 4 | [reg.udral.service.actuator.common.Feedback](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/reg/udral/service/actuator/common/Feedback.0.1.dsdl)
feedback | | + +Cyphal Subscribers: +| № | Data type and topic name | Description | +| -- | ------------------------- | ----------- | +| 1 | [reg.udral.service.actuator.common.sp.Vector31](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/reg/udral/service/actuator/common/sp/Vector31.0.1.dsdl)
setpoint | | The node has the following registers: diff --git a/Src/cyphal_application/application.cpp b/Src/cyphal_application/application.cpp index 1fd2a65..0be5024 100644 --- a/Src/cyphal_application/application.cpp +++ b/Src/cyphal_application/application.cpp @@ -13,7 +13,7 @@ #include "periphery/led/led.hpp" void init_persistent_storage() { - paramsInit(static_cast(IntParamsIndexes::INTEGER_PARAMS_AMOUNT), NUM_OF_STR_PARAMS); + paramsInit(static_cast(IntParamsIndexes::INTEGER_PARAMS_AMOUNT), NUM_OF_STR_PARAMS, -1, 1); paramsLoadFromFlash(); auto node_name_param_idx = static_cast(IntParamsIndexes::INTEGER_PARAMS_AMOUNT); diff --git a/Src/dronecan_application/application.cpp b/Src/dronecan_application/application.cpp index 4875d83..64280a6 100644 --- a/Src/dronecan_application/application.cpp +++ b/Src/dronecan_application/application.cpp @@ -12,7 +12,7 @@ extern IWDG_HandleTypeDef hiwdg; #endif /* HAL_IWDG_MODULE_ENABLED */ void application_entry_point() { - paramsInit(static_cast(IntParamsIndexes::INTEGER_PARAMS_AMOUNT), NUM_OF_STR_PARAMS); + paramsInit(static_cast(IntParamsIndexes::INTEGER_PARAMS_AMOUNT), NUM_OF_STR_PARAMS, -1, 1); paramsLoadFromFlash(); auto node_id = paramsGetIntegerValue(IntParamsIndexes::PARAM_UAVCAN_NODE_ID);