This commit is contained in:
parent
feb59d321c
commit
c29d7e6f3e
@ -680,8 +680,8 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
|
||||
std::array<DeviceHandlerBase*, 4> rws = {};
|
||||
new RwPollingTask(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, *gpioComIF);
|
||||
for (uint8_t idx = 0; idx < rwCookies.size(); idx++) {
|
||||
rwCookies[idx] = new SpiCookie(rwCookieParams[idx].first, rwCookieParams[idx].second,
|
||||
rws::MAX_REPLY_SIZE, spi::RW_MODE, spi::RW_SPEED);
|
||||
rwCookies[idx] = new RwCookie(idx, rwCookieParams[idx].first, rwCookieParams[idx].second,
|
||||
rws::MAX_REPLY_SIZE, spi::RW_MODE, spi::RW_SPEED);
|
||||
auto* rwHandler = new RwHandler(rwIds[idx], objects::SPI_RW_COM_IF, rwCookies[idx], gpioComIF,
|
||||
rwGpioIds[idx], idx);
|
||||
rwCookies[idx]->setCallbackArgs(rwHandler);
|
||||
|
@ -107,6 +107,7 @@ ReturnValue_t RwPollingTask::initializeInterface(CookieIF* cookie) {
|
||||
|
||||
auto* rwCookie = dynamic_cast<RwCookie*>(cookie);
|
||||
if (rwCookie == nullptr) {
|
||||
sif::error << "RwPollingTask::initializeInterface: Wrong cookie" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
rwCookies[rwCookie->rwIdx] = rwCookie;
|
||||
|
@ -514,6 +514,24 @@ void RwHandler::handleTemperatureReply(const uint8_t* packet) {
|
||||
}
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase* RwHandler::getDataSetHandle(sid_t sid) {
|
||||
switch (sid.ownerSetId) {
|
||||
case (rws::SetIds::STATUS_SET_ID): {
|
||||
return &statusSet;
|
||||
}
|
||||
case (rws::SetIds::LAST_RESET_ID): {
|
||||
return &lastResetStatusSet;
|
||||
}
|
||||
case (rws::SetIds::SPEED_CMD_SET): {
|
||||
return &rwSpeedActuationSet;
|
||||
}
|
||||
case (rws::SetIds::TM_SET_ID): {
|
||||
return &tmDataset;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void RwHandler::handleGetTelemetryReply(const uint8_t* packet) {
|
||||
PoolReadGuard rg(&tmDataset);
|
||||
uint8_t offset = 2;
|
||||
|
@ -56,6 +56,7 @@ class RwHandler : public DeviceHandlerBase {
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||
|
||||
private:
|
||||
//! [EXPORT] : [COMMENT] Action Message with invalid speed was received. Valid speeds must be in
|
||||
|
Loading…
Reference in New Issue
Block a user