diff --git a/inc/Services/Parameter.hpp b/inc/Services/Parameter.hpp index 99bb6f15fb5d1fd36dca5226b6abb21d99e75528..6301f3ae69477a9dff93bca4ee8b7c78da2f5a92 100644 --- a/inc/Services/Parameter.hpp +++ b/inc/Services/Parameter.hpp @@ -67,6 +67,7 @@ class Parameter { ValueType getCurrentValue(); uint8_t getPTC(); + uint8_t getPFC(); }; diff --git a/src/Services/Parameter.cpp b/src/Services/Parameter.cpp index 4c15b2f7416979c0654e9733d406de5168434bb5..e50d3fd87f1a4bb93754920ccca32acaf6372106 100644 --- a/src/Services/Parameter.cpp +++ b/src/Services/Parameter.cpp @@ -24,4 +24,13 @@ void Parameter::setCurrentValue(ValueType newVal) { ValueType Parameter::getCurrentValue() { return currentValue; -} \ No newline at end of file +} + +uint8_t Parameter::getPTC() { + return ptc; +} + +uint8_t Parameter::getPFC() { + return pfc; +} + diff --git a/src/Services/ParameterService.cpp b/src/Services/ParameterService.cpp index 762af1bbdf39022f183d3426121d72ae061ae7aa..86dbbcb1a48897ce7759ec9307bc0c96be80340f 100644 --- a/src/Services/ParameterService.cpp +++ b/src/Services/ParameterService.cpp @@ -1,35 +1,10 @@ #include "Services/ParameterService.hpp" #include "Services/Parameter.hpp" -ParameterService::ParameterService() { +ParameterService::ParameterService() { + // test addings addNewParameter(3, 14); addNewParameter(3, 14); - -// // Test code, setting up some of the parameter fields -// -// time_t currTime = time(nullptr); -// struct tm* today = localtime(&currTime); -// -// Parameter test1, test2; -// -// test1.currentValue = today->tm_hour; // the current hour -// test1.ptc = 3; // unsigned int -// test1.pfc = 14; // 32 bits -// -// test2.currentValue = today->tm_min; // the current minute -// test2.ptc = 3; // unsigned int -// test2.pfc = 14; // 32 bits -// -// // MAKE SURE THE IDS ARE UNIQUE WHEN INSERTING! -// /** -// * @todo: Make a separate insert() function for parameter insertion to protect from blunders -// * if needed to -// */ -// -// paramsList.insert(std::make_pair(0, test1)); -// paramsList.insert(std::make_pair(1, test2)); -// -//#endif } bool ParameterService::addNewParameter(uint8_t ptc, uint8_t pfc, uint32_t initialValue, UpdatePtr ptr) {