Merge remote-tracking branch 'origin/develop' into mueller/acs-ss-init
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:
@ -19,18 +19,18 @@ LibgpiodTest::LibgpiodTest(object_id_t objectId, object_id_t gpioIfobjectId, Gpi
|
||||
LibgpiodTest::~LibgpiodTest() {}
|
||||
|
||||
ReturnValue_t LibgpiodTest::performPeriodicAction() {
|
||||
int gpioState;
|
||||
gpio::Levels gpioState;
|
||||
ReturnValue_t result;
|
||||
|
||||
switch (testCase) {
|
||||
case (TestCases::READ): {
|
||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_0, &gpioState);
|
||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_0, gpioState);
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "LibgpiodTest::performPeriodicAction: Failed to read gpio " << std::endl;
|
||||
return RETURN_FAILED;
|
||||
} else {
|
||||
sif::debug << "LibgpiodTest::performPeriodicAction: MIO 0 state = " << gpioState
|
||||
<< std::endl;
|
||||
sif::debug << "LibgpiodTest::performPeriodicAction: MIO 0 state = " <<
|
||||
static_cast<int>(gpioState) << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -38,19 +38,19 @@ ReturnValue_t LibgpiodTest::performPeriodicAction() {
|
||||
break;
|
||||
}
|
||||
case (TestCases::BLINK): {
|
||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_0, &gpioState);
|
||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_0, gpioState);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "LibgpiodTest::performPeriodicAction: Failed to read gpio " << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
if (gpioState == 1) {
|
||||
if (gpioState == gpio::Levels::HIGH) {
|
||||
result = gpioInterface->pullLow(gpioIds::TEST_ID_0);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "LibgpiodTest::performPeriodicAction: Could not pull GPIO low!"
|
||||
<< std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
} else if (gpioState == 0) {
|
||||
} else if (gpioState == gpio::Levels::LOW) {
|
||||
result = gpioInterface->pullHigh(gpioIds::TEST_ID_0);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "LibgpiodTest::performPeriodicAction: Could not pull GPIO high!"
|
||||
@ -72,7 +72,7 @@ ReturnValue_t LibgpiodTest::performPeriodicAction() {
|
||||
}
|
||||
|
||||
ReturnValue_t LibgpiodTest::performOneShotAction() {
|
||||
int gpioState;
|
||||
gpio::Levels gpioState;
|
||||
ReturnValue_t result;
|
||||
|
||||
switch (testCase) {
|
||||
@ -93,8 +93,8 @@ ReturnValue_t LibgpiodTest::performOneShotAction() {
|
||||
<< std::endl;
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_1, &gpioState);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK and gpioState == 1) {
|
||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_1, gpioState);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK and gpioState == gpio::Levels::HIGH) {
|
||||
sif::info << "LibgpiodTest::performOneShotAction: "
|
||||
"GPIO state read successfully and is high"
|
||||
<< std::endl;
|
||||
@ -110,8 +110,8 @@ ReturnValue_t LibgpiodTest::performOneShotAction() {
|
||||
"GPIO pulled low successfully for loopback test"
|
||||
<< std::endl;
|
||||
}
|
||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_1, &gpioState);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK and gpioState == 0) {
|
||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_1, gpioState);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK and gpioState == gpio::Levels::LOW) {
|
||||
sif::info << "LibgpiodTest::performOneShotAction: "
|
||||
"GPIO state read successfully and is low"
|
||||
<< std::endl;
|
||||
|
@ -76,9 +76,4 @@ static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 2048;
|
||||
#define FSFW_HAL_I2C_WIRETAPPING 0
|
||||
#define FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV 0
|
||||
|
||||
#define FSFW_HAL_L3GD20_GYRO_DEBUG 0
|
||||
#define FSFW_HAL_RM3100_MGM_DEBUG 0
|
||||
#define FSFW_HAL_LIS3MDL_MGM_DEBUG 0
|
||||
#define FSFW_HAL_ADIS1650X_GYRO_DEBUG 0
|
||||
|
||||
#endif /* CONFIG_FSFWCONFIG_H_ */
|
||||
|
@ -1,210 +0,0 @@
|
||||
/**
|
||||
* @brief This file can be used to add preprocessor define for conditional
|
||||
* code inclusion exclusion or various other project constants and
|
||||
* properties in one place.
|
||||
*/
|
||||
#ifndef FSFWCONFIG_OBSWCONFIG_H_
|
||||
#define FSFWCONFIG_OBSWCONFIG_H_
|
||||
|
||||
#cmakedefine RASPBERRY_PI
|
||||
#cmakedefine XIPHOS_Q7S
|
||||
#cmakedefine BEAGLEBONEBLACK
|
||||
#cmakedefine EGSE
|
||||
#cmakedefine TE0720_1CFA
|
||||
|
||||
#include "commonConfig.h"
|
||||
#include "OBSWVersion.h"
|
||||
|
||||
#define Q7S_EM 0
|
||||
|
||||
/*******************************************************************/
|
||||
/** All of the following flags should be enabled for mission code */
|
||||
/*******************************************************************/
|
||||
|
||||
//! Timers can mess up the code when debugging
|
||||
//! All of this should be enabled for mission code!
|
||||
#if defined XIPHOS_Q7S
|
||||
|
||||
#define Q7S_EM 0
|
||||
|
||||
#define OBSW_USE_CCSDS_IP_CORE 1
|
||||
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
||||
#define OBSW_TM_TO_PTME 0
|
||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||
#define OBSW_TC_FROM_PDEC 0
|
||||
|
||||
#define OBSW_ENABLE_TIMERS 1
|
||||
#define OBSW_ADD_MGT 1
|
||||
#define OBSW_ADD_BPX_BATTERY_HANDLER 1
|
||||
#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@
|
||||
#define OBSW_ADD_PLOC_SUPERVISOR 0
|
||||
#define OBSW_ADD_PLOC_MPSOC 0
|
||||
#define OBSW_ADD_SUN_SENSORS 1
|
||||
#define OBSW_ADD_SUS_BOARD_ASS 1
|
||||
#define OBSW_ADD_ACS_BOARD 1
|
||||
#define OBSW_ADD_ACS_HANDLERS 1
|
||||
#define OBSW_ADD_RW 0
|
||||
#define OBSW_ADD_RTD_DEVICES 1
|
||||
#define OBSW_ADD_TMP_DEVICES 1
|
||||
#define OBSW_ADD_RAD_SENSORS 1
|
||||
#define OBSW_ADD_PL_PCDU 1
|
||||
#define OBSW_ADD_SYRLINKS 1
|
||||
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
|
||||
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
|
||||
|
||||
#endif // XIPHOS_Q7S
|
||||
|
||||
// This is a really tricky switch.. It initializes the PCDU switches to their default states
|
||||
// at powerup. I think it would be better
|
||||
// to leave it off for now. It makes testing a lot more difficult and it might mess with
|
||||
// something the operators might want to do by giving the software too much intelligence
|
||||
// at the wrong place. The system component might command all the Switches accordingly anyway
|
||||
#define OBSW_INITIALIZE_SWITCHES 0
|
||||
#define OBSW_ENABLE_PERIODIC_HK 0
|
||||
|
||||
#ifdef TE0720_1CFA
|
||||
|
||||
#define OBSW_USE_CCSDS_IP_CORE 0
|
||||
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
||||
#define OBSW_TM_TO_PTME 0
|
||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||
#define OBSW_TC_FROM_PDEC 0
|
||||
#define OBSW_ENABLE_TIMERS 1
|
||||
#define OBSW_ADD_MGT 0
|
||||
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
|
||||
#define OBSW_ADD_STAR_TRACKER 0
|
||||
#define OBSW_ADD_PLOC_SUPERVISOR 0
|
||||
#define OBSW_ADD_PLOC_MPSOC 1
|
||||
#define OBSW_ADD_SUN_SENSORS 0
|
||||
#define OBSW_ADD_ACS_BOARD 1
|
||||
#define OBSW_ADD_ACS_HANDLERS 0
|
||||
#define OBSW_ADD_RW 0
|
||||
#define OBSW_ADD_RTD_DEVICES 0
|
||||
#define OBSW_ADD_TMP_DEVICES 0
|
||||
#define OBSW_ADD_RAD_SENSORS 0
|
||||
#define OBSW_ADD_PL_PCDU 0
|
||||
#define OBSW_ADD_SYRLINKS 0
|
||||
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
|
||||
#define OBSW_SYRLINKS_SIMULATED 1
|
||||
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
|
||||
#define OBSW_ENABLE_PERIODIC_HK 0
|
||||
#define OBSW_PRINT_CORE_HK 0
|
||||
#define OBSW_INITIALIZE_SWITCHES 0
|
||||
|
||||
#endif
|
||||
|
||||
/*******************************************************************/
|
||||
/** All of the following flags should be disabled for mission code */
|
||||
/*******************************************************************/
|
||||
|
||||
// Can be used to switch device to NORMAL mode immediately
|
||||
#define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 1
|
||||
#define OBSW_PRINT_MISSED_DEADLINES 1
|
||||
|
||||
#define OBSW_SYRLINKS_SIMULATED 1
|
||||
#define OBSW_ADD_TEST_CODE 0
|
||||
#define OBSW_ADD_TEST_TASK 0
|
||||
#define OBSW_ADD_TEST_PST 0
|
||||
// If this is enabled, all other SPI code should be disabled
|
||||
#define OBSW_ADD_SPI_TEST_CODE 0
|
||||
// If this is enabled, all other I2C code should be disabled
|
||||
#define OBSW_ADD_I2C_TEST_CODE 0
|
||||
#define OBSW_ADD_UART_TEST_CODE 0
|
||||
|
||||
#define OBSW_TEST_ACS 0
|
||||
#define OBSW_DEBUG_ACS 0
|
||||
#define OBSW_TEST_SUS 0
|
||||
#define OBSW_DEBUG_SUS 0
|
||||
#define OBSW_TEST_RTD 0
|
||||
#define OBSW_DEBUG_RTD 0
|
||||
#define OBSW_TEST_RAD_SENSOR 0
|
||||
#define OBSW_DEBUG_RAD_SENSOR 0
|
||||
#define OBSW_TEST_PL_PCDU 0
|
||||
#define OBSW_DEBUG_PL_PCDU 0
|
||||
#define OBSW_TEST_BPX_BATT 0
|
||||
#define OBSW_DEBUG_BPX_BATT 0
|
||||
#define OBSW_TEST_IMTQ 0
|
||||
#define OBSW_DEBUG_IMTQ 0
|
||||
#define OBSW_TEST_RW 0
|
||||
#define OBSW_DEBUG_RW 0
|
||||
|
||||
#define OBSW_TEST_LIBGPIOD 0
|
||||
#define OBSW_TEST_PLOC_HANDLER 0
|
||||
#define OBSW_TEST_CCSDS_BRIDGE 0
|
||||
#define OBSW_TEST_CCSDS_PTME 0
|
||||
#define OBSW_TEST_TE7020_HEATER 0
|
||||
#define OBSW_TEST_GPIO_OPEN_BY_LABEL 0
|
||||
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
|
||||
#define OBSW_DEBUG_P60DOCK 0
|
||||
|
||||
#define OBSW_PRINT_CORE_HK 0
|
||||
#define OBSW_DEBUG_PDU1 0
|
||||
#define OBSW_DEBUG_PDU2 0
|
||||
#define OBSW_DEBUG_GPS 0
|
||||
#define OBSW_DEBUG_ACU 0
|
||||
#define OBSW_DEBUG_SYRLINKS 0
|
||||
|
||||
#define OBSW_DEBUG_PDEC_HANDLER 0
|
||||
|
||||
#ifdef TE0720_1CFA
|
||||
#define OBSW_DEBUG_PLOC_SUPERVISOR 1
|
||||
#define OBSW_DEBUG_PLOC_MPSOC 1
|
||||
#else
|
||||
#define OBSW_DEBUG_PLOC_SUPERVISOR 0
|
||||
#define OBSW_DEBUG_PLOC_MPSOC 0
|
||||
#endif
|
||||
|
||||
#ifdef EGSE
|
||||
#define OBSW_DEBUG_STARTRACKER 1
|
||||
#else
|
||||
#define OBSW_DEBUG_STARTRACKER 0
|
||||
#endif
|
||||
|
||||
#ifdef RASPBERRY_PI
|
||||
|
||||
#define OBSW_ENABLE_TIMERS 1
|
||||
#define OBSW_ADD_STAR_TRACKER 0
|
||||
#define OBSW_ADD_PLOC_SUPERVISOR 0
|
||||
#define OBSW_ADD_PLOC_MPSOC 0
|
||||
#define OBSW_ADD_SUN_SENSORS 0
|
||||
#define OBSW_ADD_MGT 0
|
||||
#define OBSW_ADD_ACS_BOARD 0
|
||||
#define OBSW_ADD_ACS_HANDLERS 0
|
||||
#define OBSW_ADD_GPS_0 0
|
||||
#define OBSW_ADD_GPS_1 0
|
||||
#define OBSW_ADD_RW 0
|
||||
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
|
||||
#define OBSW_ADD_RTD_DEVICES 0
|
||||
#define OBSW_ADD_PL_PCDU 0
|
||||
#define OBSW_ADD_TMP_DEVICES 0
|
||||
#define OBSW_ADD_RAD_SENSORS 0
|
||||
#define OBSW_ADD_SYRLINKS 0
|
||||
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
|
||||
|
||||
#endif // RASPBERRY_PI
|
||||
|
||||
#define OBSW_TCP_SERVER_WIRETAPPING 0
|
||||
|
||||
/*******************************************************************/
|
||||
/** CMake Defines */
|
||||
/*******************************************************************/
|
||||
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
||||
|
||||
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
||||
#cmakedefine LIBGPS_VERSION_MINOR @LIBGPS_VERSION_MINOR@
|
||||
|
||||
#ifdef RASPBERRY_PI
|
||||
#include "rpiConfig.h"
|
||||
#elif defined(XIPHOS_Q7S)
|
||||
#include "q7sConfig.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "objects/systemObjectList.h"
|
||||
#include "events/subsystemIdRanges.h"
|
||||
#include "returnvalues/classIds.h"
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* FSFWCONFIG_OBSWCONFIG_H_ */
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 186 translations.
|
||||
* @brief Auto-generated event translation file. Contains 187 translations.
|
||||
* @details
|
||||
* Generated on: 2022-04-08 14:13:35
|
||||
* Generated on: 2022-05-03 16:32:00
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -87,6 +87,7 @@ const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
||||
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
|
||||
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
|
||||
const char *FDIR_REACTION_IGNORED_STRING = "FDIR_REACTION_IGNORED";
|
||||
const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED";
|
||||
const char *GPIO_PULL_LOW_FAILED_STRING = "GPIO_PULL_LOW_FAILED";
|
||||
const char *SWITCH_ALREADY_ON_STRING = "SWITCH_ALREADY_ON";
|
||||
@ -354,6 +355,8 @@ const char *translateEvents(Event event) {
|
||||
return SWITCH_HAS_CHANGED_STRING;
|
||||
case (11302):
|
||||
return SWITCHING_Q7S_DENIED_STRING;
|
||||
case (11303):
|
||||
return FDIR_REACTION_IGNORED_STRING;
|
||||
case (11400):
|
||||
return GPIO_PULL_HIGH_FAILED_STRING;
|
||||
case (11401):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 117 translations.
|
||||
* Generated on: 2022-04-08 14:13:35
|
||||
* Generated on: 2022-05-03 16:32:00
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -510,8 +510,6 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
|
||||
|
||||
ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) {
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
#ifndef TE0720_1CFA
|
||||
#if Q7S_EM != 1
|
||||
// PCDU handlers receives two messages and both must be handled
|
||||
thisSequence->addSlot(objects::PCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
|
||||
@ -543,8 +541,6 @@ ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) {
|
||||
sif::error << "GomSpace PST initialization failed" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
#endif /* Q7S_EM == 0 */
|
||||
#endif
|
||||
static_cast<void>(length);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
@ -42,17 +42,17 @@ void PapbVcInterface::startPacketTransfer() { *vcBaseReg = CONFIG_START; }
|
||||
void PapbVcInterface::endPacketTransfer() { *vcBaseReg = CONFIG_END; }
|
||||
|
||||
ReturnValue_t PapbVcInterface::pollPapbBusySignal() {
|
||||
int papbBusyState = 0;
|
||||
gpio::Levels papbBusyState = gpio::Levels::LOW;
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
|
||||
/** Check if PAPB interface is ready to receive data */
|
||||
result = gpioComIF->readGpio(papbBusyId, &papbBusyState);
|
||||
result = gpioComIF->readGpio(papbBusyId, papbBusyState);
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "PapbVcInterface::pollPapbBusySignal: Failed to read papb busy signal"
|
||||
<< std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
if (!papbBusyState) {
|
||||
if (papbBusyState == gpio::Levels::LOW) {
|
||||
sif::warning << "PapbVcInterface::pollPapbBusySignal: PAPB busy" << std::endl;
|
||||
return PAPB_BUSY;
|
||||
}
|
||||
@ -62,9 +62,9 @@ ReturnValue_t PapbVcInterface::pollPapbBusySignal() {
|
||||
|
||||
void PapbVcInterface::isVcInterfaceBufferEmpty() {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
int papbEmptyState = 1;
|
||||
gpio::Levels papbEmptyState = gpio::Levels::HIGH;
|
||||
|
||||
result = gpioComIF->readGpio(papbEmptyId, &papbEmptyState);
|
||||
result = gpioComIF->readGpio(papbEmptyId, papbEmptyState);
|
||||
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
|
||||
@ -72,7 +72,7 @@ void PapbVcInterface::isVcInterfaceBufferEmpty() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (papbEmptyState == 1) {
|
||||
if (papbEmptyState == gpio::Levels::HIGH) {
|
||||
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is empty" << std::endl;
|
||||
} else {
|
||||
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is not empty" << std::endl;
|
||||
|
Reference in New Issue
Block a user