Update to v1.8.0 #100

Merged
muellerr merged 125 commits from develop into main 2021-09-24 10:17:43 +02:00
3 changed files with 18 additions and 15 deletions
Showing only changes of commit dbcf4f5d69 - Show all commits

View File

@ -135,6 +135,7 @@ void initmission::initTasks() {
} }
bool startTestPst = true; bool startTestPst = true;
static_cast<void>(startTestPst);
#if OBSW_ADD_TEST_PST == 1 #if OBSW_ADD_TEST_PST == 1
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask("ACS_PST", 50, FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask("ACS_PST", 50,
PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc); PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc);
@ -145,14 +146,14 @@ void initmission::initTasks() {
} }
#endif /* RPI_TEST_ACS_BOARD == 1 */ #endif /* RPI_TEST_ACS_BOARD == 1 */
#if OBSW_ADD_TEST_CODE == 1
PeriodicTaskIF* testTask = factory->createPeriodicTask( PeriodicTaskIF* testTask = factory->createPeriodicTask(
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc); "TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
#if OBSW_ADD_TEST_CODE == 1
result = testTask->addComponent(objects::TEST_TASK); result = testTask->addComponent(objects::TEST_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK); initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
} }
#endif /* OBSW_ADD_TEST_CODE == 1 */
#if RPI_ADD_SPI_TEST == 1 #if RPI_ADD_SPI_TEST == 1
result = testTask->addComponent(objects::SPI_TEST); result = testTask->addComponent(objects::SPI_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
@ -171,6 +172,7 @@ void initmission::initTasks() {
initmission::printAddObjectError("UART_TEST", objects::UART_TEST); initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
} }
#endif /* RPI_ADD_GPIO_TEST == 1 */ #endif /* RPI_ADD_GPIO_TEST == 1 */
#endif /* OBSW_ADD_TEST_CODE == 1 */
sif::info << "Starting tasks.." << std::endl; sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask(); tmTcDistributor->startTask();

View File

@ -132,20 +132,20 @@ void ObjectFactory::produce(void* args){
spiDev = "/dev/spidev0.0"; spiDev = "/dev/spidev0.0";
spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev, spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED); MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler = new MGMHandlerLIS3MDL(objects::MGM_0_LIS3_HANDLER, auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie); objects::SPI_COM_IF, spiCookie, 0);
mgmLis3Handler->setStartUpImmediately(); mgmLis3Handler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev, spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED); RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_1_RM3100_HANDLER, auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie); objects::SPI_COM_IF, spiCookie, 0);
mgmRm3100Handler->setStartUpImmediately(); mgmRm3100Handler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev, spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED); L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF, auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie); spiCookie, 0);
gyroL3gHandler->setStartUpImmediately(); gyroL3gHandler->setStartUpImmediately();
#endif /* RPI_TEST_ACS_BOARD == 1 */ #endif /* RPI_TEST_ACS_BOARD == 1 */

View File

@ -45,14 +45,15 @@ private:
/* ACS board specific variables */ /* ACS board specific variables */
#ifdef RASPBERRY_PI #ifdef RASPBERRY_PI
uint8_t mgm0Lis3mdlChipSelect = 2; uint8_t mgm0Lis3mdlChipSelect = gpio::MGM_0_BCM_PIN;
uint8_t mgm1Rm3100ChipSelect = 3; uint8_t mgm1Rm3100ChipSelect = gpio::MGM_1_BCM_PIN;
uint8_t gyro0AdisChipSelect = 4; uint8_t mgm2Lis3mdlChipSelect = gpio::MGM_2_BCM_PIN;
uint8_t gyro1L3gd20ChipSelect = 5; uint8_t mgm3Rm3100ChipSelect = gpio::MGM_3_BCM_PIN;
int8_t gyro2AdisChipSelect = 6;
uint8_t gyro3L3gd20ChipSelect = 16; uint8_t gyro0AdisChipSelect = gpio::GYRO_0_BCM_PIN;
uint8_t mgm2Lis3mdlChipSelect = 17; uint8_t gyro1L3gd20ChipSelect = gpio::GYRO_1_BCM_PIN;
uint8_t mgm3Rm3100ChipSelect = 27; uint8_t gyro2AdisChipSelect = gpio::GYRO_2_BCM_PIN;
uint8_t gyro3L3gd20ChipSelect = gpio::GYRO_3_BCM_PIN;
#elif defined(XIPHOS_Q7S) #elif defined(XIPHOS_Q7S)
uint8_t mgm0Lis3mdlChipSelect = q7s::GPIO_MGM_0_LIS3_CS; uint8_t mgm0Lis3mdlChipSelect = q7s::GPIO_MGM_0_LIS3_CS;
uint8_t mgm1Rm3100ChipSelect = q7s::GPIO_MGM_1_RM3100_CS; uint8_t mgm1Rm3100ChipSelect = q7s::GPIO_MGM_1_RM3100_CS;