From 7d0242c2f76acabc23bdff39cd5117e044dca63d Mon Sep 17 00:00:00 2001 From: Grigoris Pavlakis <grigpavl@ece.auth.gr> Date: Sun, 1 Sep 2019 10:12:19 +0300 Subject: [PATCH] Add warning for setParameterIds() --- inc/Services/Parameter.hpp | 3 +++ src/Services/ParameterService.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/inc/Services/Parameter.hpp b/inc/Services/Parameter.hpp index 850b1f06..7e6eae59 100644 --- a/inc/Services/Parameter.hpp +++ b/inc/Services/Parameter.hpp @@ -24,6 +24,9 @@ */ typedef uint16_t ParamId; typedef etl::bitset<NUM_OF_FLAGS> Flags; +typedef enum {STRING = 0, + INT32 = 1, + } TypesList; /** * Parameter class - Breakdown of fields diff --git a/src/Services/ParameterService.cpp b/src/Services/ParameterService.cpp index aff371d1..a6cb189f 100644 --- a/src/Services/ParameterService.cpp +++ b/src/Services/ParameterService.cpp @@ -89,6 +89,9 @@ void ParameterService::setParameterIds(Message& newParamValues) { uint16_t currId = newParamValues.readUint16(); // the parameter is checked for read-only status and manual update availability 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()); } else { -- GitLab