this is crap but might just work
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
6521e419eb
commit
2f2d164526
@ -9,8 +9,6 @@
|
||||
#include "commonConfig.h"
|
||||
#include "q7sConfig.h"
|
||||
|
||||
#cmakedefine RELEASE_BUILD
|
||||
|
||||
/*******************************************************************/
|
||||
/** All of the following flags should be enabled for mission code */
|
||||
/*******************************************************************/
|
||||
|
@ -347,7 +347,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
|
||||
SpiCookie* spiCookie =
|
||||
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
||||
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, 40);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
auto mgmLis3Handler0 = new MgmLIS3MDLHandler(
|
||||
objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
|
||||
@ -363,7 +363,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
|
||||
spiCookie =
|
||||
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
||||
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, 40);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
auto mgmRm3100Handler1 =
|
||||
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
||||
spi::RM3100_TRANSITION_DELAY);
|
||||
@ -380,7 +380,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
|
||||
spiCookie =
|
||||
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
||||
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, 40);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
auto* mgmLis3Handler2 = new MgmLIS3MDLHandler(
|
||||
objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
|
||||
@ -396,7 +396,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
|
||||
spiCookie =
|
||||
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
||||
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, 40);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
auto* mgmRm3100Handler3 =
|
||||
new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
||||
spi::RM3100_TRANSITION_DELAY);
|
||||
@ -415,7 +415,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
|
||||
spiCookie =
|
||||
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
|
||||
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, 40);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
auto adisHandler =
|
||||
new GyroADIS1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
||||
ADIS1650X::Type::ADIS16505);
|
||||
@ -432,7 +432,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
|
||||
// Gyro 1 Side A
|
||||
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
||||
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, 40);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
auto gyroL3gHandler1 = new GyroHandlerL3GD20H(
|
||||
objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
|
||||
@ -449,7 +449,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
|
||||
spiCookie =
|
||||
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
|
||||
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, 40);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
adisHandler = new GyroADIS1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_MAIN_COM_IF,
|
||||
spiCookie, ADIS1650X::Type::ADIS16505);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
||||
@ -462,7 +462,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
|
||||
// Gyro 3 Side B
|
||||
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
||||
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, 40);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
auto gyroL3gHandler3 = new GyroHandlerL3GD20H(
|
||||
objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <cstdint>
|
||||
#include "fsfw/version.h"
|
||||
|
||||
#cmakedefine RELEASE_BUILD
|
||||
|
||||
#cmakedefine RASPBERRY_PI
|
||||
#cmakedefine XIPHOS_Q7S
|
||||
#cmakedefine BEAGLEBONEBLACK
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "commonConfig.h"
|
||||
#include "fsfw/timemanager/clockDefinitions.h"
|
||||
#include "fsfw_hal/linux/serial/SerialCookie.h"
|
||||
#include "fsfw_hal/linux/spi/spiDefinitions.h"
|
||||
@ -47,11 +48,18 @@ static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3;
|
||||
static constexpr uint32_t RW_SPEED = 300'000;
|
||||
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
|
||||
|
||||
static constexpr dur_millis_t RTD_CS_TIMEOUT = 100;
|
||||
#ifdef RELEASE_BUILD
|
||||
static constexpr uint8_t CS_FACTOR = 1;
|
||||
#else
|
||||
static constexpr uint8_t CS_FACTOR = 3;
|
||||
#endif
|
||||
|
||||
static constexpr dur_millis_t RTD_CS_TIMEOUT = 50 * CS_FACTOR;
|
||||
static constexpr uint32_t RTD_SPEED = 2'000'000;
|
||||
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
|
||||
|
||||
static constexpr dur_millis_t SUS_CS_TIMEOUT = 100;
|
||||
static constexpr dur_millis_t SUS_CS_TIMEOUT = 50 * CS_FACTOR;
|
||||
static constexpr dur_millis_t ACS_BOARD_CS_TIMEOUT = 50 * CS_FACTOR;
|
||||
|
||||
} // namespace spi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user