This commit is contained in:
2022-02-11 17:03:20 +01:00
parent 632b8c7355
commit 201bfd1b07
8 changed files with 386 additions and 284 deletions

View File

@ -11,10 +11,10 @@ SusHandler::SusHandler(object_id_t objectId, object_id_t comIF, CookieIF *comCoo
gpioComIF(gpioComIF),
chipSelectId(chipSelectId),
dataset(this) {
if (comCookie == NULL) {
if (comCookie == nullptr) {
sif::error << "SusHandler: Invalid com cookie" << std::endl;
}
if (gpioComIF == NULL) {
if (gpioComIF == nullptr) {
sif::error << "SusHandler: Invalid GpioComIF" << std::endl;
}
}
@ -164,9 +164,9 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8
dataset.ain3 = (*(packet + 8) << 8 | *(packet + 9));
dataset.ain4 = (*(packet + 10) << 8 | *(packet + 11));
dataset.ain5 = (*(packet + 12) << 8 | *(packet + 13));
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_SUS
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_SUS == 1
sif::info << "SUS object id 0x" << std::hex << this->getObjectId()
<< ", Temperature: " << dataset.temperatureCelcius << " °C" << std::endl;
<< ", Temperature: " << dataset.temperatureCelcius << " C" << std::endl;
sif::info << "SUS object id 0x" << std::hex << this->getObjectId() << ", AIN0: " << std::dec
<< dataset.ain0 << std::endl;
sif::info << "SUS object id 0x" << std::hex << this->getObjectId() << ", AIN1: " << std::dec