commanding of HeaterHandler and GpioIF working

This commit is contained in:
2021-02-01 11:17:20 +01:00
parent 560e538f62
commit fd1e4f3473
20 changed files with 474 additions and 264 deletions

View File

@ -1,15 +1,16 @@
#include <bsp_q7s/gpio/cookies/GpioCookie.h>
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
GpioCookie::GpioCookie() {
}
void GpioCookie::addGpio(GpioMap newEntry){
gpioMapIter = gpioMap.find(newEntry);
void GpioCookie::addGpio(gpioId_t gpioId, GpioConfig_t gpioConfig){
gpioMapIter = gpioMap.find(gpioId);
if(gpioMapIter == gpioMap.end()) {
std::pair status = gpioMap.emplace(newEntry);
std::pair status = gpioMap.emplace(gpioId, gpioConfig);
if (status.second == false) {
sif::error << "GpioCookie::addGpio: Failed to add GPIO "
<< newEntry.first << "to GPIO map" << std::endl;
<< gpioId << "to GPIO map" << std::endl;
}
}
else {
@ -18,7 +19,7 @@ void GpioCookie::addGpio(GpioMap newEntry){
}
}
GpioMap getGpioMap() const{
GpioMap GpioCookie::getGpioMap() const{
return gpioMap;
}