create low level rtd handler in obj factory
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-05-12 12:12:47 +02:00
parent 6b9e49e632
commit a173ef4308
7 changed files with 60 additions and 32 deletions

View File

@ -81,6 +81,10 @@ ReturnValue_t Max31865EiveHandler::buildCommandFromCommand(DeviceCommandId_t dev
return RETURN_OK;
}
void Max31865EiveHandler::setInstantNormal(bool instantNormal) {
this->instantNormal = instantNormal;
}
void Max31865EiveHandler::simpleCommand(EiveMax31855::RtdCommands cmd) {
cmdBuf[0] = cmd;
rawPacket = cmdBuf.data();
@ -131,3 +135,8 @@ ReturnValue_t Max31865EiveHandler::initializeLocalDataPool(localpool::DataPool&
poolManager.subscribeForPeriodicPacket(sensorDataset.getSid(), false, 30.0, false);
return RETURN_OK;
}
void Max31865EiveHandler::setDeviceInfo(uint8_t idx_, std::string locString_) {
idx = idx_;
locString = std::move(locString_);
}

View File

@ -8,6 +8,8 @@
class Max31865EiveHandler : public DeviceHandlerBase {
public:
Max31865EiveHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
void setInstantNormal(bool instantNormal);
void setDeviceInfo(uint8_t idx, std::string locString);
private:
void doStartUp() override;
@ -27,6 +29,8 @@ class Max31865EiveHandler : public DeviceHandlerBase {
void simpleCommand(EiveMax31855::RtdCommands cmd);
std::array<uint8_t, 12> cmdBuf = {};
uint8_t idx = 0;
std::string locString = "Unknown";
EiveMax31855::ReadOutStruct exchangeStruct;
bool instantNormal = false;
MAX31865::Max31865Set sensorDataset;

View File

@ -532,9 +532,9 @@ void Max31865PT1000Handler::modeChanged() {
}
}
void Max31865PT1000Handler::setDeviceInfo(uint8_t idx, const std::string &locString_) {
void Max31865PT1000Handler::setDeviceInfo(uint8_t idx, std::string locString_) {
deviceIdx = idx;
locString = locString_;
locString = std::move(locString_);
}
void Max31865PT1000Handler::setDebugMode(bool enable) { this->debugMode = enable; }

View File

@ -48,7 +48,7 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
static constexpr uint8_t DEFAULT_CONFIG = 0b11000001;
void setInstantNormal(bool instantNormal);
void setDeviceInfo(uint8_t idx, const std::string &locString);
void setDeviceInfo(uint8_t idx, std::string locString);
/**
* Expected temperature range is -100 C and 100 C.