start creating rw ass in obj factory
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
1893e87f5f
commit
db7dcc7e32
@ -1,3 +1,4 @@
|
|||||||
|
#include <mission/system/RwAssembly.h>
|
||||||
#include <mission/system/fdir/GomspacePowerFdir.h>
|
#include <mission/system/fdir/GomspacePowerFdir.h>
|
||||||
#include <mission/system/fdir/SyrlinksFdir.h>
|
#include <mission/system/fdir/SyrlinksFdir.h>
|
||||||
|
|
||||||
@ -729,17 +730,16 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
{addresses::RW3, gpioIds::CS_RW3},
|
{addresses::RW3, gpioIds::CS_RW3},
|
||||||
{addresses::RW4, gpioIds::CS_RW4}}};
|
{addresses::RW4, gpioIds::CS_RW4}}};
|
||||||
std::array<SpiCookie*, 4> rwCookies = {};
|
std::array<SpiCookie*, 4> rwCookies = {};
|
||||||
std::array<std::pair<object_id_t, gpioId_t>, 4> rwDevParams = {{{objects::RW1, gpioIds::EN_RW1},
|
std::array<object_id_t, 4> rwIds = {objects::RW1, objects::RW2, objects::RW3, objects::RW4};
|
||||||
{objects::RW2, gpioIds::EN_RW2},
|
std::array<gpioId_t, 4> rwGpioIds = {gpioIds::EN_RW1, gpioIds::EN_RW2, gpioIds::EN_RW3,
|
||||||
{objects::RW3, gpioIds::EN_RW3},
|
gpioIds::EN_RW4};
|
||||||
{objects::RW4, gpioIds::EN_RW4}}};
|
|
||||||
std::array<RwHandler*, 4> rws = {};
|
std::array<RwHandler*, 4> rws = {};
|
||||||
for (uint8_t idx = 0; idx < rwCookies.size(); idx++) {
|
for (uint8_t idx = 0; idx < rwCookies.size(); idx++) {
|
||||||
rwCookies[idx] = new SpiCookie(rwCookieParams[idx].first, rwCookieParams[idx].second,
|
rwCookies[idx] = new SpiCookie(rwCookieParams[idx].first, rwCookieParams[idx].second,
|
||||||
q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE, spi::RW_MODE,
|
q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE, spi::RW_MODE,
|
||||||
spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
|
spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
|
||||||
rws[idx] = new RwHandler(rwDevParams[idx].first, objects::SPI_COM_IF, rwCookies[idx], gpioComIF,
|
rws[idx] =
|
||||||
rwDevParams[idx].second);
|
new RwHandler(rwIds[idx], objects::SPI_COM_IF, rwCookies[idx], gpioComIF, rwGpioIds[idx]);
|
||||||
rwCookies[idx]->setCallbackArgs(rws[idx]);
|
rwCookies[idx]->setCallbackArgs(rws[idx]);
|
||||||
#if OBSW_TEST_RW == 1
|
#if OBSW_TEST_RW == 1
|
||||||
rws[idx]->setStartUpImmediately();
|
rws[idx]->setStartUpImmediately();
|
||||||
@ -748,6 +748,9 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
rws[idx]->setDebugMode(true);
|
rws[idx]->setDebugMode(true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RwHelper rwHelper(rwIds);
|
||||||
|
// auto* rwAss = new RwAssembly();
|
||||||
#endif /* OBSW_ADD_RW == 1 */
|
#endif /* OBSW_ADD_RW == 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user