ACS board and init payload
This commit is contained in:
parent
f3a651602b
commit
2e6a93c479
11
CHANGELOG.md
11
CHANGELOG.md
@ -40,6 +40,8 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [v2.0.5] to be released
|
# [v2.0.5] to be released
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
- The dual lane assembly transition failed handler started new transitions towards the current mode
|
- The dual lane assembly transition failed handler started new transitions towards the current mode
|
||||||
instead of the target mode. This means that if the dual lane assembly never reached the initial
|
instead of the target mode. This means that if the dual lane assembly never reached the initial
|
||||||
submode (e.g. mode normal and submode dual side), it will transition back to the current mode,
|
submode (e.g. mode normal and submode dual side), it will transition back to the current mode,
|
||||||
@ -47,11 +49,18 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
recovery handling becomes stuck in the custom recovery sequence when swichting power back on.
|
recovery handling becomes stuck in the custom recovery sequence when swichting power back on.
|
||||||
- The dual lane custom recovery handling was adapted to always perform proper power switch handling
|
- The dual lane custom recovery handling was adapted to always perform proper power switch handling
|
||||||
irrespective of current or target modes.
|
irrespective of current or target modes.
|
||||||
|
- Compile fix if SCEX is compiled for the EM.
|
||||||
|
- Set up Rad Sensor chip select even for EM to avoid SPI bus issues.
|
||||||
|
- Correct ADIS Gyroscope type configuration for the EM, where the 16507 type is used instead of the
|
||||||
|
16505 type.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
- The CMake build generator will now search for the cross-compiler binaries in the environmental
|
- The CMake build generator will now search for the cross-compiler binaries in the environmental
|
||||||
variable named `CROSS_COMPILE_BIN_PATH` first when setting up the build system. This prevents
|
variable named `CROSS_COMPILE_BIN_PATH` first when setting up the build system. This prevents
|
||||||
CMake from selecting wrong cross-compilers if multiple cross-compilers with the same name are used
|
CMake from selecting wrong cross-compilers if multiple cross-compilers with the same name are used
|
||||||
on the same system.
|
on the same system.
|
||||||
- Compile fix if SCEX is compiled for the EM.
|
- Add ACS board for EM by default now.
|
||||||
|
|
||||||
# [v2.0.4] 2023-04-19
|
# [v2.0.4] 2023-04-19
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ set(OBSW_ADD_THERMAL_TEMP_INSERTER
|
|||||||
${OBSW_Q7S_EM}
|
${OBSW_Q7S_EM}
|
||||||
CACHE STRING "Add thermal sensor temperature inserter")
|
CACHE STRING "Add thermal sensor temperature inserter")
|
||||||
set(OBSW_ADD_ACS_BOARD
|
set(OBSW_ADD_ACS_BOARD
|
||||||
${INIT_VAL}
|
1
|
||||||
CACHE STRING "Add ACS board module")
|
CACHE STRING "Add ACS board module")
|
||||||
set(OBSW_ADD_GPS_CTRL
|
set(OBSW_ADD_GPS_CTRL
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
|
@ -240,20 +240,7 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
|||||||
|
|
||||||
ReturnValue_t ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF,
|
ReturnValue_t ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF,
|
||||||
Stack5VHandler& stackHandler) {
|
Stack5VHandler& stackHandler) {
|
||||||
using namespace gpio;
|
createRadSensorChipSelect(gpioComIF);
|
||||||
if (gpioComIF == nullptr) {
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
|
||||||
std::stringstream consumer;
|
|
||||||
consumer << "0x" << std::hex << objects::RAD_SENSOR;
|
|
||||||
GpiodRegularByLineName* gpio = new GpiodRegularByLineName(
|
|
||||||
q7s::gpioNames::RAD_SENSOR_CHIP_SELECT, consumer.str(), Direction::OUT, Levels::HIGH);
|
|
||||||
gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_RADFET, consumer.str(), Direction::OUT,
|
|
||||||
Levels::LOW);
|
|
||||||
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
|
||||||
gpioChecker(gpioComIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
|
||||||
|
|
||||||
SpiCookie* spiCookieRadSensor =
|
SpiCookie* spiCookieRadSensor =
|
||||||
new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, RAD_SENSOR::READ_SIZE,
|
new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, RAD_SENSOR::READ_SIZE,
|
||||||
@ -367,7 +354,7 @@ void ObjectFactory::createAcsBoardGpios(GpioCookie& cookie) {
|
|||||||
|
|
||||||
void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF,
|
void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF,
|
||||||
SerialComIF* uartComIF, PowerSwitchIF& pwrSwitcher,
|
SerialComIF* uartComIF, PowerSwitchIF& pwrSwitcher,
|
||||||
bool enableHkSets) {
|
bool enableHkSets, adis1650x::Type adisType) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
||||||
createAcsBoardGpios(*gpioCookieAcsBoard);
|
createAcsBoardGpios(*gpioCookieAcsBoard);
|
||||||
@ -453,9 +440,8 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
|||||||
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, adis1650x::MAXIMUM_REPLY_SIZE,
|
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, adis1650x::MAXIMUM_REPLY_SIZE,
|
||||||
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
auto adisHandler =
|
auto adisHandler = new GyrAdis1650XHandler(objects::GYRO_0_ADIS_HANDLER,
|
||||||
new GyrAdis1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
objects::ACS_BOARD_POLLING_TASK, spiCookie, adisType);
|
||||||
spiCookie, adis1650x::Type::ADIS16505);
|
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
|
||||||
adisHandler->setCustomFdir(fdir);
|
adisHandler->setCustomFdir(fdir);
|
||||||
assemblyChildren[4] = adisHandler;
|
assemblyChildren[4] = adisHandler;
|
||||||
@ -488,9 +474,8 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
|||||||
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, adis1650x::MAXIMUM_REPLY_SIZE,
|
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, adis1650x::MAXIMUM_REPLY_SIZE,
|
||||||
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
adisHandler =
|
adisHandler = new GyrAdis1650XHandler(objects::GYRO_2_ADIS_HANDLER,
|
||||||
new GyrAdis1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
objects::ACS_BOARD_POLLING_TASK, spiCookie, adisType);
|
||||||
spiCookie, adis1650x::Type::ADIS16505);
|
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
||||||
adisHandler->setCustomFdir(fdir);
|
adisHandler->setCustomFdir(fdir);
|
||||||
assemblyChildren[6] = adisHandler;
|
assemblyChildren[6] = adisHandler;
|
||||||
@ -1022,3 +1007,20 @@ void ObjectFactory::testAcsBrdAss(AcsBoardAssembly* acsAss) {
|
|||||||
sif::warning << "Sending mode command failed" << std::endl;
|
sif::warning << "Sending mode command failed" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectFactory::createRadSensorChipSelect(LinuxLibgpioIF* gpioIF) {
|
||||||
|
using namespace gpio;
|
||||||
|
if (gpioIF == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
||||||
|
std::stringstream consumer;
|
||||||
|
consumer << "0x" << std::hex << objects::RAD_SENSOR;
|
||||||
|
GpiodRegularByLineName* gpio = new GpiodRegularByLineName(
|
||||||
|
q7s::gpioNames::RAD_SENSOR_CHIP_SELECT, consumer.str(), Direction::OUT, Levels::HIGH);
|
||||||
|
gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, gpio);
|
||||||
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_RADFET, consumer.str(), Direction::OUT,
|
||||||
|
Levels::LOW);
|
||||||
|
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
||||||
|
gpioChecker(gpioIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
||||||
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <fsfw/returnvalues/returnvalue.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||||
|
#include <mission/acs/gyroAdisHelpers.h>
|
||||||
#include <mission/com/CcsdsIpCoreHandler.h>
|
#include <mission/com/CcsdsIpCoreHandler.h>
|
||||||
#include <mission/com/PersistentLogTmStoreTask.h>
|
#include <mission/com/PersistentLogTmStoreTask.h>
|
||||||
#include <mission/genericFactory.h>
|
#include <mission/genericFactory.h>
|
||||||
@ -58,10 +59,12 @@ void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher
|
|||||||
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||||
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
||||||
void createTmpComponents();
|
void createTmpComponents();
|
||||||
|
void createRadSensorChipSelect(LinuxLibgpioIF* gpioIF);
|
||||||
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
|
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
|
||||||
void createAcsBoardGpios(GpioCookie& cookie);
|
void createAcsBoardGpios(GpioCookie& cookie);
|
||||||
void createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF,
|
void createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF,
|
||||||
PowerSwitchIF& pwrSwitcher, bool enableHkSets);
|
PowerSwitchIF& pwrSwitcher, bool enableHkSets,
|
||||||
|
adis1650x::Type adisType);
|
||||||
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable,
|
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable,
|
||||||
HeaterHandler*& heaterHandler);
|
HeaterHandler*& heaterHandler);
|
||||||
void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets);
|
void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets);
|
||||||
|
@ -55,6 +55,10 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#if OBSW_ADD_SYRLINKS == 1
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
dummyCfg.addSyrlinksDummies = false;
|
dummyCfg.addSyrlinksDummies = false;
|
||||||
#endif
|
#endif
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
||||||
|
dummyCfg.addPlocDummies = false;
|
||||||
|
dummyCfg.addCamSwitcherDummy = false;
|
||||||
|
#endif
|
||||||
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||||
dummyCfg.addPowerDummies = false;
|
dummyCfg.addPowerDummies = false;
|
||||||
// The ACU broke.
|
// The ACU broke.
|
||||||
@ -93,9 +97,12 @@ void ObjectFactory::produce(void* args) {
|
|||||||
// TODO: Careful! Switching this on somehow messes with the communication with the ProASIC
|
// TODO: Careful! Switching this on somehow messes with the communication with the ProASIC
|
||||||
// and will cause xsc_boot_copy commands to always boot to 0 0
|
// and will cause xsc_boot_copy commands to always boot to 0 0
|
||||||
// createRadSensorComponent(gpioComIF);
|
// createRadSensorComponent(gpioComIF);
|
||||||
|
// Still initialize chip select to avoid SPI bus issues.
|
||||||
|
createRadSensorChipSelect(gpioComIF);
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true);
|
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true,
|
||||||
|
adis1650x::Type::ADIS16507);
|
||||||
#else
|
#else
|
||||||
// Still add all GPIOs for EM.
|
// Still add all GPIOs for EM.
|
||||||
GpioCookie* acsBoardGpios = new GpioCookie();
|
GpioCookie* acsBoardGpios = new GpioCookie();
|
||||||
@ -123,6 +130,8 @@ void ObjectFactory::produce(void* args) {
|
|||||||
createStrComponents(pwrSwitcher);
|
createStrComponents(pwrSwitcher);
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
|
||||||
|
createPayloadComponents(gpioComIF, *pwrSwitcher);
|
||||||
|
|
||||||
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
||||||
CcsdsIpCoreHandler* ipCoreHandler = nullptr;
|
CcsdsIpCoreHandler* ipCoreHandler = nullptr;
|
||||||
CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel,
|
CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel,
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
|
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
|
||||||
|
#include <devices/gpioIds.h>
|
||||||
#include <fsfw/storagemanager/LocalPool.h>
|
#include <fsfw/storagemanager/LocalPool.h>
|
||||||
#include <fsfw/storagemanager/PoolManager.h>
|
#include <fsfw/storagemanager/PoolManager.h>
|
||||||
#include <mission/power/gsDefs.h>
|
#include <mission/power/gsDefs.h>
|
||||||
@ -59,7 +60,8 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true);
|
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true,
|
||||||
|
adis1650x::Type::ADIS16505);
|
||||||
#endif
|
#endif
|
||||||
HeaterHandler* heaterHandler;
|
HeaterHandler* heaterHandler;
|
||||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
||||||
|
@ -217,9 +217,11 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
|||||||
tmp.second->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
tmp.second->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto* camSwitcher =
|
if (cfg.addCamSwitcherDummy) {
|
||||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher, power::Switches::PDU2_CH8_PAYLOAD_CAMERA);
|
auto* camSwitcher = new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher,
|
||||||
|
power::Switches::PDU2_CH8_PAYLOAD_CAMERA);
|
||||||
camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||||
|
}
|
||||||
auto* scexDummy = new ScexDummy(objects::SCEX, objects::DUMMY_COM_IF, comCookieDummy);
|
auto* scexDummy = new ScexDummy(objects::SCEX, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
scexDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
scexDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||||
auto* plPcduDummy =
|
auto* plPcduDummy =
|
||||||
|
@ -19,6 +19,7 @@ struct DummyCfg {
|
|||||||
bool addTempSensorDummies = true;
|
bool addTempSensorDummies = true;
|
||||||
bool addRtdComIFDummy = true;
|
bool addRtdComIFDummy = true;
|
||||||
bool addPlocDummies = true;
|
bool addPlocDummies = true;
|
||||||
|
bool addCamSwitcherDummy = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch, GpioIF* gpioIF);
|
void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch, GpioIF* gpioIF);
|
||||||
|
Loading…
Reference in New Issue
Block a user