Skip to content
Snippets Groups Projects
Unverified Commit 7d0242c2 authored by Grigoris Pavlakis's avatar Grigoris Pavlakis
Browse files

Add warning for setParameterIds()

parent bd3cffa5
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
*/ */
typedef uint16_t ParamId; typedef uint16_t ParamId;
typedef etl::bitset<NUM_OF_FLAGS> Flags; typedef etl::bitset<NUM_OF_FLAGS> Flags;
typedef enum {STRING = 0,
INT32 = 1,
} TypesList;
/** /**
* Parameter class - Breakdown of fields * Parameter class - Breakdown of fields
......
...@@ -89,6 +89,9 @@ void ParameterService::setParameterIds(Message& newParamValues) { ...@@ -89,6 +89,9 @@ void ParameterService::setParameterIds(Message& newParamValues) {
uint16_t currId = newParamValues.readUint16(); uint16_t currId = newParamValues.readUint16();
// the parameter is checked for read-only status and manual update availability // the parameter is checked for read-only status and manual update availability
if (paramsList.find(currId) != paramsList.end()) { if (paramsList.find(currId) != paramsList.end()) {
// WARNING! SETTING WORKS ONLY WITH UINT32_T INPUT!
// I need a way to know the input's type!
paramsList.at(currId)->setCurrentValue(newParamValues.readUint32()); paramsList.at(currId)->setCurrentValue(newParamValues.readUint32());
} }
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment