Compare commits
69 Commits
Author | SHA1 | Date | |
---|---|---|---|
577e45fec3 | |||
8611144a70 | |||
25de385766 | |||
4277a98c16 | |||
34cd92840f | |||
3f94bf7855 | |||
1b05f45e24 | |||
be4a6b2434 | |||
f68f4066be | |||
3f1f3fa916 | |||
379c868abb | |||
c9ec0f67bd | |||
eee829919b | |||
3150261e3e | |||
fe01d3d4b5 | |||
bc6b492976 | |||
11ccd1f535 | |||
b891198bee | |||
da831ff789 | |||
078299a07c | |||
2f5ec84237 | |||
2694f0cbc8 | |||
6e4d27a454 | |||
ab74382c12 | |||
2be5cdabb0 | |||
11e1222a7c | |||
573ff334b8 | |||
19dd7a0964 | |||
a92f664770 | |||
bb27700cc2 | |||
3e3355a926 | |||
55d32a2bb0 | |||
2f990d8bbc | |||
8482d56fd0 | |||
e349504b41 | |||
0bb5f08d23 | |||
0dbe6b9854 | |||
043a458f42 | |||
c682d75aff | |||
aea4313b7d | |||
11c54e270f | |||
881a03fbed | |||
f9e04ed9a2 | |||
d8f84ed00d | |||
b516f12a61 | |||
de4bf6dd55 | |||
22f8d256dd | |||
7cf3247cbd | |||
8843a0d8c5 | |||
ec18cb7007 | |||
74bb27e61f | |||
5890e639fe | |||
7c2755db26 | |||
0b81a92941 | |||
f39d03afc2 | |||
b54ced65f6 | |||
ff8ebfe67a | |||
99e6ea6000 | |||
1fd5d065b6 | |||
53c38d9c05 | |||
5e2f7fa3ed | |||
7ddfdc0978 | |||
bb895c9e12 | |||
017171f221 | |||
f2210010de | |||
66b38fa294 | |||
038a529b06 | |||
ee3926fe2a | |||
f62b312d3c |
42
CHANGELOG.md
42
CHANGELOG.md
@ -16,6 +16,42 @@ will consitute of a breaking change warranting a new major release:
|
||||
|
||||
# [unreleased]
|
||||
|
||||
# [v1.39.0] 2023-03-21
|
||||
|
||||
Requires firmware update for new FPGA design where reset line is routed into the software.
|
||||
2 relevant PRs:
|
||||
- https://egit.irs.uni-stuttgart.de/eive/q7s-vivado/pulls/53
|
||||
- https://egit.irs.uni-stuttgart.de/eive/q7s-vivado/pulls/54
|
||||
|
||||
## Added
|
||||
|
||||
- Added NaN and Inf check for the `MEKF`. If these are detected, the `AcsController` will reset
|
||||
the `MEKF` on its own once. This way, there will not be an event spam and operators will have
|
||||
to look into the reason of wrong outputs. To restore the reset ability, an action command has
|
||||
been added.
|
||||
- Contingency handling for non-working I2C bus bug. Reboot the system if the I2C is not working.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed transition for dual power lane assemblies: When going from dual side submode to single side
|
||||
submode, perform logical commanding first, similarly to when going to OFF mode.
|
||||
- GPS time is only set to valid if at least one satellite is in view.
|
||||
|
||||
## Changed
|
||||
|
||||
- Bugfixes for STR mode transitions: Booting to mode ON with submode FIRMWARE now works properly.
|
||||
Furthermore, the submode in the NORMAL mode now should be 0 instead of some ON mode submode.
|
||||
- Updated GYR bias values to newest measurements. This also corrects the ADIS values to always
|
||||
consit of just one digit.
|
||||
- The CCSDS IP core handler now exposes a parameter to enable the priority select mode
|
||||
for the PTME core. This mode prioritizes virtual channels with a lower index, so for example
|
||||
the virtual channel (VC0) will have the highest priority, while VC3 will have the lowestg
|
||||
priority. This mode will be enabled by default for now, but can be set via the parameter IF with
|
||||
the unique parameter ID 0. The update of this mode requires a PTME reset. Therefore, it will only
|
||||
be performed when the transmitter is off to avoid weird bugs.
|
||||
- Connect and handle reset line for the PTME core in the software now.
|
||||
- Safe mode controller failure event now only triggers once per minute.
|
||||
|
||||
# [v1.38.0] 2023-03-17
|
||||
|
||||
eive-tmtc: v2.19.2
|
||||
@ -57,8 +93,7 @@ eive-tmtc: v2.19.1
|
||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/462
|
||||
- Add `PcduHandlerDummy` component.
|
||||
- Added parameter for timeout until `MEKF_INVALID_MODE_VIOLATION` event is triggered.
|
||||
- EIVE system: Add boot mode which is also the initial mode. The fallback mode of the boot mode
|
||||
will be the SAFE mode. The boot mode can also be used to switch as many devices as possible OFF.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Pointing control of the `AcsController` was still expecting submodes instead of modes.
|
||||
@ -84,9 +119,6 @@ eive-tmtc: v2.19.1
|
||||
commanding is done autonomously by the COM subsystem internally or by the operator. This prevents
|
||||
the transmitter from going off during fallbacks to the SAFE mode, which might not always be
|
||||
desired.
|
||||
|
||||
## Changed
|
||||
|
||||
- Initialize switch states to a special `SWITCH_STATE_UNKNOWN` (2) variable. Return
|
||||
`PowerSwitchIF::SWITCH_UNKNOWN` in switch state getter if this is the state.
|
||||
- Wait 1 second before commanding SAFE mode. This ensures or at least increases the chance that
|
||||
|
@ -10,7 +10,7 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
set(OBSW_VERSION_MAJOR 1)
|
||||
set(OBSW_VERSION_MINOR 38)
|
||||
set(OBSW_VERSION_MINOR 39)
|
||||
set(OBSW_VERSION_REVISION 0)
|
||||
|
||||
# set(CMAKE_VERBOSE TRUE)
|
||||
|
20
automation/Jenkinsfile
vendored
20
automation/Jenkinsfile
vendored
@ -1,6 +1,7 @@
|
||||
pipeline {
|
||||
environment {
|
||||
BUILDDIR_Q7 = 'build_q7'
|
||||
BUILDDIR_Q7S = 'build_q7s_fm'
|
||||
BUILDDIR_Q7S_EM = 'build_q7s_em'
|
||||
BUILDDIR_LINUX = 'build_linux'
|
||||
}
|
||||
agent {
|
||||
@ -12,15 +13,24 @@ pipeline {
|
||||
stages {
|
||||
stage('Clean') {
|
||||
steps {
|
||||
sh 'rm -rf $BUILDDIR_Q7'
|
||||
sh 'rm -rf $BUILDDIR_Q7S'
|
||||
sh 'rm -rf $BUILDDIR_Q7S_EM'
|
||||
sh 'rm -rf $BUILDDIR_LINUX'
|
||||
}
|
||||
}
|
||||
stage('Build Q7S') {
|
||||
steps {
|
||||
dir(BUILDDIR_Q7) {
|
||||
dir(BUILDDIR_Q7S) {
|
||||
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..'
|
||||
sh 'cmake --build . -j4'
|
||||
sh 'cmake --build . -j6'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build Q7S EM') {
|
||||
steps {
|
||||
dir(BUILDDIR_Q7S_EM) {
|
||||
sh 'cmake -DTGT_BSP="arm/q7s" -DEIVE_Q7S_EM=ON -DCMAKE_BUILD_TYPE=Debug ..'
|
||||
sh 'cmake --build . -j6'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,7 +38,7 @@ pipeline {
|
||||
steps {
|
||||
dir(BUILDDIR_LINUX) {
|
||||
sh 'cmake ..'
|
||||
sh 'cmake --build . -j4'
|
||||
sh 'cmake --build . -j6'
|
||||
sh './eive-unittest'
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 278 translations.
|
||||
* @brief Auto-generated event translation file. Contains 279 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-15 10:10:04
|
||||
* Generated on: 2023-03-21 23:34:22
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -260,6 +260,7 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -791,6 +792,8 @@ const char *translateEvents(Event event) {
|
||||
return REBOOT_COUNTER_STRING;
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 169 translations.
|
||||
* Generated on: 2023-03-14 17:08:41
|
||||
* Generated on: 2023-03-21 23:34:22
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -90,6 +90,8 @@ static constexpr char PAPB_BUSY_SIGNAL_VC2[] = "papb_busy_signal_vc2";
|
||||
static constexpr char PAPB_EMPTY_SIGNAL_VC2[] = "papb_empty_signal_vc2";
|
||||
static constexpr char PAPB_BUSY_SIGNAL_VC3[] = "papb_busy_signal_vc3";
|
||||
static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
|
||||
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
||||
|
||||
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
|
||||
static constexpr char RS485_EN_TX_DATA[] = "tx_data_enable_ltc2872";
|
||||
static constexpr char RS485_EN_RX_CLOCK[] = "rx_clock_enable_ltc2872";
|
||||
|
@ -31,14 +31,15 @@
|
||||
xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP;
|
||||
xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY;
|
||||
|
||||
CoreController::CoreController(object_id_t objectId)
|
||||
CoreController::CoreController(object_id_t objectId, const std::atomic_uint16_t& i2cErrors)
|
||||
: ExtendedControllerBase(objectId, 5),
|
||||
cmdExecutor(4096),
|
||||
cmdReplyBuf(4096, true),
|
||||
cmdRepliesSizes(128),
|
||||
opDivider5(5),
|
||||
opDivider10(10),
|
||||
hkSet(this) {
|
||||
hkSet(this),
|
||||
i2cErrors(i2cErrors) {
|
||||
cmdExecutor.setRingBuffer(&cmdReplyBuf, &cmdRepliesSizes);
|
||||
try {
|
||||
sdcMan = SdCardManager::instance();
|
||||
@ -107,6 +108,12 @@ void CoreController::performControlOperation() {
|
||||
sdStateMachine();
|
||||
performMountedSdCardOperations();
|
||||
readHkData();
|
||||
if(i2cErrors >= 5) {
|
||||
bool protOpPerformed = false;
|
||||
triggerEvent(I2C_UNAVAILABLE_REBOOT);
|
||||
gracefulShutdownTasks(CURRENT_CHIP, CURRENT_COPY, protOpPerformed);
|
||||
std::system("xsc_boot_copy -r");
|
||||
}
|
||||
if (shellCmdIsExecuting) {
|
||||
bool replyReceived = false;
|
||||
// TODO: We could read the data in the ring buffer and send it as an action data reply.
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
||||
#include "mission/trace.h"
|
||||
#include <atomic>
|
||||
|
||||
class Timer;
|
||||
class SdCardManager;
|
||||
@ -131,8 +132,9 @@ class CoreController : public ExtendedControllerBase {
|
||||
//! P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1.
|
||||
//! P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.
|
||||
static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO);
|
||||
static constexpr Event I2C_UNAVAILABLE_REBOOT = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM);
|
||||
|
||||
CoreController(object_id_t objectId);
|
||||
CoreController(object_id_t objectId, const std::atomic_uint16_t& i2cErrors);
|
||||
virtual ~CoreController();
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
@ -262,6 +264,7 @@ class CoreController : public ExtendedControllerBase {
|
||||
PoolEntry<float> plVoltageEntry = PoolEntry<float>(0.0);
|
||||
|
||||
core::HkSet hkSet;
|
||||
const std::atomic_uint16_t& i2cErrors;
|
||||
|
||||
#if OBSW_SD_CARD_MUST_BE_ON == 1
|
||||
bool remountAttemptFlag = true;
|
||||
|
@ -123,6 +123,7 @@ using gpio::Levels;
|
||||
|
||||
ResetArgs RESET_ARGS_GNSS;
|
||||
std::atomic_bool LINK_STATE = CcsdsIpCoreHandler::LINK_DOWN;
|
||||
std::atomic_uint16_t I2C_FATAL_ERRORS = 0;
|
||||
|
||||
void Factory::setStaticFrameworkObjectIds() {
|
||||
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
||||
@ -747,6 +748,9 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_BUSY, gpio);
|
||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
||||
gpio::Direction::OUT, gpio::Levels::HIGH);
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::PTME_RESETN, gpio);
|
||||
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
||||
// Creating virtual channel interfaces
|
||||
VirtualChannelIF* vc0 =
|
||||
@ -771,9 +775,14 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
||||
new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG);
|
||||
PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig);
|
||||
|
||||
*args.ipCoreHandler = new CcsdsIpCoreHandler(
|
||||
objects::CCSDS_HANDLER, objects::CCSDS_PACKET_DISTRIBUTOR, *ptmeConfig, LINK_STATE,
|
||||
&args.gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA);
|
||||
PtmeGpios gpios;
|
||||
gpios.enableTxClock = gpioIds::RS485_EN_TX_CLOCK;
|
||||
gpios.enableTxData = gpioIds::RS485_EN_TX_CLOCK;
|
||||
gpios.ptmeResetn = gpioIds::PTME_RESETN;
|
||||
|
||||
*args.ipCoreHandler =
|
||||
new CcsdsIpCoreHandler(objects::CCSDS_HANDLER, objects::CCSDS_PACKET_DISTRIBUTOR, *ptmeConfig,
|
||||
LINK_STATE, &args.gpioComIF, gpios);
|
||||
// This VC will receive all live TM
|
||||
auto* vcWithQueue =
|
||||
new VirtualChannelWithQueue(objects::PTME_VC0_LIVE_TM, ccsds::VC0, "PTME VC0 LIVE TM", *ptme,
|
||||
@ -953,7 +962,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY);
|
||||
imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||
|
||||
new ImtqPollingTask(objects::IMTQ_POLLING);
|
||||
new ImtqPollingTask(objects::IMTQ_POLLING, I2C_FATAL_ERRORS);
|
||||
I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, imtq::MAX_REPLY_SIZE, q7s::I2C_PL_EIVE);
|
||||
auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::IMTQ_POLLING, imtqI2cCookie,
|
||||
pcdu::Switches::PDU1_CH3_MGT_5V);
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <mission/tmtc/PusTmFunnel.h>
|
||||
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
|
||||
class LinuxLibgpioIF;
|
||||
class SerialComIF;
|
||||
@ -22,6 +23,8 @@ class HealthTableIF;
|
||||
class AcsBoardAssembly;
|
||||
class GpioIF;
|
||||
|
||||
extern std::atomic_uint16_t I2C_FATAL_ERRORS;
|
||||
|
||||
namespace ObjectFactory {
|
||||
|
||||
struct CcsdsComponentArgs {
|
||||
|
@ -66,7 +66,7 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF);
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER);
|
||||
new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS);
|
||||
|
||||
// Regular FM code, does not work for EM if the hardware is not connected
|
||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||
|
@ -38,7 +38,7 @@ void ObjectFactory::produce(void* args) {
|
||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER);
|
||||
new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS);
|
||||
createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||
auto* stackHandler = new Stack5VHandler(*pwrSwitcher);
|
||||
|
||||
|
@ -102,6 +102,7 @@ enum gpioId_t {
|
||||
VC2_PAPB_BUSY,
|
||||
VC3_PAPB_EMPTY,
|
||||
VC3_PAPB_BUSY,
|
||||
PTME_RESETN,
|
||||
|
||||
PDEC_RESET,
|
||||
|
||||
|
2
fsfw
2
fsfw
Submodule fsfw updated: 43fd0b2f59...227524a21d
@ -259,6 +259,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;bsp_q7s/core/CoreController.h
|
||||
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;bsp_q7s/core/CoreController.h
|
||||
14010;0x36ba;I2C_UNAVAILABLE_REBOOT;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
|
|
@ -190,8 +190,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x2207;TMF_AllDeleted;No description;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2208;TMF_InvalidData;No description;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2209;TMF_NotReady;No description;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2401;MT_TooDetailedRequest;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2402;MT_TooGeneralRequest;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2401;MT_NoPacketFound;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2402;MT_PossiblePacketLoss;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2403;MT_NoMatch;No description;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2404;MT_Full;No description;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2405;MT_NewNodeCreated;No description;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
@ -370,8 +370,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
@ -401,9 +401,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4500;HSPI_HalTimeoutRetval;No description;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4501;HSPI_HalBusyRetval;No description;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4502;HSPI_HalErrorRetval;No description;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
@ -456,22 +456,28 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x5d03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5da0;GOMS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da1;GOMS_InvalidRampTime;Action Message with invalid ramp time was received.;161;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da2;GOMS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da3;GOMS_ExecutionFailed;Command execution failed;163;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da4;GOMS_CrcError;Reaction wheel reply has invalid crc;164;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da5;GOMS_ValueNotRead;No description;165;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CcsdsIpCoreHandler.h
|
||||
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h
|
||||
0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a3;SADPL_ExecutionFailed;Command execution failed;163;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a4;SADPL_CrcError;Reaction wheel reply has invalid crc;164;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a5;SADPL_ValueNotRead;No description;165;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x6900;ACSCTRL_FileDeletionFailed;No description;0;ACS_CTRL;mission/controller/AcsController.h
|
||||
0x6a02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a05;ACSMEKF_MekfNoSusMgmStrData;No description;5;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a06;ACSMEKF_MekfCovarianceInversionFailed;No description;6;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a07;ACSMEKF_MekfInitialized;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a08;ACSMEKF_MekfRunning;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6b01;ACSSAF_SafectrlMekfInputInvalid;No description;1;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h
|
||||
0x6c01;ACSPTG_PtgctrlMekfInputInvalid;No description;1;ACS_PTG;mission/controller/acs/control/PtgCtrl.h
|
||||
0x6d01;ACSDTB_DetumbleNoSensordata;No description;1;ACS_DETUMBLE;mission/controller/acs/control/Detumble.h
|
||||
|
|
@ -259,6 +259,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;bsp_q7s/core/CoreController.h
|
||||
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;bsp_q7s/core/CoreController.h
|
||||
14010;0x36ba;I2C_UNAVAILABLE_REBOOT;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
|
|
@ -190,8 +190,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x2207;TMF_AllDeleted;No description;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2208;TMF_InvalidData;No description;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2209;TMF_NotReady;No description;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2401;MT_TooDetailedRequest;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2402;MT_TooGeneralRequest;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2401;MT_NoPacketFound;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2402;MT_PossiblePacketLoss;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2403;MT_NoMatch;No description;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2404;MT_Full;No description;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2405;MT_NewNodeCreated;No description;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
@ -370,8 +370,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
@ -401,9 +401,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4500;HSPI_HalTimeoutRetval;No description;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4501;HSPI_HalBusyRetval;No description;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4502;HSPI_HalErrorRetval;No description;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
@ -448,8 +448,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||
0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||
0x52b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||
0x5300;STRH_NoReplyAvailable;No description;0;STR_HANDLER;linux/devices/ImtqPollingTask.h
|
||||
0x5302;STRH_InvalidCrc;No description;2;STR_HANDLER;linux/devices/ScexHelper.h
|
||||
0x53a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;160;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53a1;STRH_PingFailed;Ping command failed;161;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53a2;STRH_VersionReqFailed;Status in version reply signals error;162;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
@ -475,6 +473,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x53b6;STRH_StartrackerAlreadyBooted;Star tracker is already in firmware mode;182;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53b7;STRH_StartrackerRunningFirmware;Star tracker is in firmware mode but must be in bootloader mode to execute this command;183;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53b8;STRH_StartrackerRunningBootloader;Star tracker is in bootloader mode but must be in firmware mode to execute this command;184;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x5400;DWLPWRON_NoReplyAvailable;No description;0;DWLPWRON_CMD;linux/devices/ImtqPollingTask.h
|
||||
0x5402;DWLPWRON_InvalidCrc;No description;2;DWLPWRON_CMD;linux/devices/ScexHelper.h
|
||||
0x54e0;DWLPWRON_InvalidMode;Received command has invalid JESD mode (valid modes are 0 - 5);224;DWLPWRON_CMD;linux/devices/devicedefinitions/PlocMPSoCDefinitions.h
|
||||
0x54e1;DWLPWRON_InvalidLaneRate;Received command has invalid lane rate (valid lane rate are 0 - 9);225;DWLPWRON_CMD;linux/devices/devicedefinitions/PlocMPSoCDefinitions.h
|
||||
0x5700;PLSPVhLP_RequestDone;No description;0;PLOC_SUPV_HELPER;linux/devices/ploc/PlocSupvUartMan.h
|
||||
@ -506,6 +506,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x5d03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5da0;GOMS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da1;GOMS_InvalidRampTime;Action Message with invalid ramp time was received.;161;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da2;GOMS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da3;GOMS_ExecutionFailed;Command execution failed;163;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da4;GOMS_CrcError;Reaction wheel reply has invalid crc;164;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da5;GOMS_ValueNotRead;No description;165;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h
|
||||
0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h
|
||||
0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
@ -535,12 +541,11 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x65a0;PLMPHLP_FileClosedAccidentally;File accidentally close;160;PLOC_MPSOC_HELPER;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a3;SADPL_ExecutionFailed;Command execution failed;163;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a4;SADPL_CrcError;Reaction wheel reply has invalid crc;164;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a5;SADPL_ValueNotRead;No description;165;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x67a0;MPSOCRTVIF_CrcFailure;Space Packet received from PLOC has invalid CRC;160;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h
|
||||
0x67a1;MPSOCRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC;161;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h
|
||||
0x67a2;MPSOCRTVIF_ReceivedExeFailure;Received execution failure reply from PLOC;162;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h
|
||||
@ -581,8 +586,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x6a04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a05;ACSMEKF_MekfNoSusMgmStrData;No description;5;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a06;ACSMEKF_MekfCovarianceInversionFailed;No description;6;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a07;ACSMEKF_MekfInitialized;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a08;ACSMEKF_MekfRunning;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6b01;ACSSAF_SafectrlMekfInputInvalid;No description;1;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h
|
||||
0x6c01;ACSPTG_PtgctrlMekfInputInvalid;No description;1;ACS_PTG;mission/controller/acs/control/PtgCtrl.h
|
||||
0x6d01;ACSDTB_DetumbleNoSensordata;No description;1;ACS_DETUMBLE;mission/controller/acs/control/Detumble.h
|
||||
|
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 278 translations.
|
||||
* @brief Auto-generated event translation file. Contains 279 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-15 10:10:04
|
||||
* Generated on: 2023-03-21 23:34:22
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -260,6 +260,7 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -791,6 +792,8 @@ const char *translateEvents(Event event) {
|
||||
return REBOOT_COUNTER_STRING;
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 173 translations.
|
||||
* Generated on: 2023-03-14 17:08:41
|
||||
* Generated on: 2023-03-21 23:34:22
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -451,95 +451,99 @@ void AcsBoardPolling::gyroAdisHandler(GyroAdis& gyro) {
|
||||
cdHasTimedOut = gyro.countdown.hasTimedOut();
|
||||
mustPerformStartup = gyro.performStartup;
|
||||
}
|
||||
if (mode == acs::SimpleSensorMode::NORMAL and cdHasTimedOut) {
|
||||
if (mustPerformStartup) {
|
||||
uint8_t regList[6];
|
||||
// Read configuration
|
||||
regList[0] = adis1650x::DIAG_STAT_REG;
|
||||
regList[1] = adis1650x::FILTER_CTRL_REG;
|
||||
regList[2] = adis1650x::RANG_MDL_REG;
|
||||
regList[3] = adis1650x::MSC_CTRL_REG;
|
||||
regList[4] = adis1650x::DEC_RATE_REG;
|
||||
regList[5] = adis1650x::PROD_ID_REG;
|
||||
size_t transferLen =
|
||||
adis1650x::prepareReadCommand(regList, sizeof(regList), cmdBuf.data(), cmdBuf.size());
|
||||
result = readAdisCfg(*gyro.cookie, transferLen);
|
||||
if (result != returnvalue::OK) {
|
||||
gyro.replyResult = result;
|
||||
return;
|
||||
}
|
||||
result = spiComIF.readReceivedMessage(gyro.cookie, &rawReply, &dummy);
|
||||
if (result != returnvalue::OK or rawReply == nullptr) {
|
||||
gyro.replyResult = result;
|
||||
return;
|
||||
}
|
||||
uint16_t prodId = (rawReply[12] << 8) | rawReply[13];
|
||||
if (((gyro.type == adis1650x::Type::ADIS16505) and (prodId != adis1650x::PROD_ID_16505)) or
|
||||
((gyro.type == adis1650x::Type::ADIS16507) and (prodId != adis1650x::PROD_ID_16507))) {
|
||||
sif::warning << "AcsPollingTask: Invalid ADIS product ID " << prodId << std::endl;
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
MutexGuard mg(ipcLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
gyro.ownReply.cfgWasSet = true;
|
||||
gyro.ownReply.cfg.diagStat = (rawReply[2] << 8) | rawReply[3];
|
||||
gyro.ownReply.cfg.filterSetting = (rawReply[4] << 8) | rawReply[5];
|
||||
gyro.ownReply.cfg.rangMdl = (rawReply[6] << 8) | rawReply[7];
|
||||
gyro.ownReply.cfg.mscCtrlReg = (rawReply[8] << 8) | rawReply[9];
|
||||
gyro.ownReply.cfg.decRateReg = (rawReply[10] << 8) | rawReply[11];
|
||||
gyro.ownReply.cfg.prodId = prodId;
|
||||
gyro.ownReply.data.sensitivity = adis1650x::rangMdlToSensitivity(gyro.ownReply.cfg.rangMdl);
|
||||
gyro.performStartup = false;
|
||||
}
|
||||
// Read regular registers
|
||||
std::memcpy(cmdBuf.data(), adis1650x::BURST_READ_ENABLE.data(),
|
||||
adis1650x::BURST_READ_ENABLE.size());
|
||||
std::memset(cmdBuf.data() + 2, 0, 10 * 2);
|
||||
result = spiComIF.sendMessage(gyro.cookie, cmdBuf.data(), adis1650x::SENSOR_READOUT_SIZE);
|
||||
if (mode == acs::SimpleSensorMode::OFF) {
|
||||
return;
|
||||
}
|
||||
if (not cdHasTimedOut) {
|
||||
return;
|
||||
}
|
||||
if (mustPerformStartup) {
|
||||
uint8_t regList[6];
|
||||
// Read configuration
|
||||
regList[0] = adis1650x::DIAG_STAT_REG;
|
||||
regList[1] = adis1650x::FILTER_CTRL_REG;
|
||||
regList[2] = adis1650x::RANG_MDL_REG;
|
||||
regList[3] = adis1650x::MSC_CTRL_REG;
|
||||
regList[4] = adis1650x::DEC_RATE_REG;
|
||||
regList[5] = adis1650x::PROD_ID_REG;
|
||||
size_t transferLen =
|
||||
adis1650x::prepareReadCommand(regList, sizeof(regList), cmdBuf.data(), cmdBuf.size());
|
||||
result = readAdisCfg(*gyro.cookie, transferLen);
|
||||
if (result != returnvalue::OK) {
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
gyro.replyResult = result;
|
||||
return;
|
||||
}
|
||||
result = spiComIF.readReceivedMessage(gyro.cookie, &rawReply, &dummy);
|
||||
if (result != returnvalue::OK or rawReply == nullptr) {
|
||||
gyro.replyResult = result;
|
||||
return;
|
||||
}
|
||||
uint16_t prodId = (rawReply[12] << 8) | rawReply[13];
|
||||
if (((gyro.type == adis1650x::Type::ADIS16505) and (prodId != adis1650x::PROD_ID_16505)) or
|
||||
((gyro.type == adis1650x::Type::ADIS16507) and (prodId != adis1650x::PROD_ID_16507))) {
|
||||
sif::warning << "AcsPollingTask: Invalid ADIS product ID " << prodId << std::endl;
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
uint16_t checksum = (rawReply[20] << 8) | rawReply[21];
|
||||
|
||||
// Now verify the read checksum with the expected checksum according to datasheet p. 20
|
||||
uint16_t calcChecksum = 0;
|
||||
for (size_t idx = 2; idx < 20; idx++) {
|
||||
calcChecksum += rawReply[idx];
|
||||
}
|
||||
if (checksum != calcChecksum) {
|
||||
sif::warning << "AcsPollingTask: Invalid ADIS reply checksum" << std::endl;
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
auto burstMode = adis1650x::burstModeFromMscCtrl(gyro.ownReply.cfg.mscCtrlReg);
|
||||
if (burstMode != adis1650x::BurstModes::BURST_16_BURST_SEL_0) {
|
||||
sif::error << "GyroADIS1650XHandler::interpretDeviceReply: Analysis for select burst mode"
|
||||
" not implemented!"
|
||||
<< std::endl;
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
MutexGuard mg(ipcLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
gyro.ownReply.dataWasSet = true;
|
||||
gyro.ownReply.cfg.diagStat = rawReply[2] << 8 | rawReply[3];
|
||||
gyro.ownReply.data.angVelocities[0] = (rawReply[4] << 8) | rawReply[5];
|
||||
gyro.ownReply.data.angVelocities[1] = (rawReply[6] << 8) | rawReply[7];
|
||||
gyro.ownReply.data.angVelocities[2] = (rawReply[8] << 8) | rawReply[9];
|
||||
|
||||
gyro.ownReply.data.accelerations[0] = (rawReply[10] << 8) | rawReply[11];
|
||||
gyro.ownReply.data.accelerations[1] = (rawReply[12] << 8) | rawReply[13];
|
||||
gyro.ownReply.data.accelerations[2] = (rawReply[14] << 8) | rawReply[15];
|
||||
|
||||
gyro.ownReply.data.temperatureRaw = (rawReply[16] << 8) | rawReply[17];
|
||||
gyro.ownReply.cfgWasSet = true;
|
||||
gyro.ownReply.cfg.diagStat = (rawReply[2] << 8) | rawReply[3];
|
||||
gyro.ownReply.cfg.filterSetting = (rawReply[4] << 8) | rawReply[5];
|
||||
gyro.ownReply.cfg.rangMdl = (rawReply[6] << 8) | rawReply[7];
|
||||
gyro.ownReply.cfg.mscCtrlReg = (rawReply[8] << 8) | rawReply[9];
|
||||
gyro.ownReply.cfg.decRateReg = (rawReply[10] << 8) | rawReply[11];
|
||||
gyro.ownReply.cfg.prodId = prodId;
|
||||
gyro.ownReply.data.sensitivity = adis1650x::rangMdlToSensitivity(gyro.ownReply.cfg.rangMdl);
|
||||
gyro.performStartup = false;
|
||||
}
|
||||
// Read regular registers
|
||||
std::memcpy(cmdBuf.data(), adis1650x::BURST_READ_ENABLE.data(),
|
||||
adis1650x::BURST_READ_ENABLE.size());
|
||||
std::memset(cmdBuf.data() + 2, 0, 10 * 2);
|
||||
result = spiComIF.sendMessage(gyro.cookie, cmdBuf.data(), adis1650x::SENSOR_READOUT_SIZE);
|
||||
if (result != returnvalue::OK) {
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
result = spiComIF.readReceivedMessage(gyro.cookie, &rawReply, &dummy);
|
||||
if (result != returnvalue::OK or rawReply == nullptr) {
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
uint16_t checksum = (rawReply[20] << 8) | rawReply[21];
|
||||
|
||||
// Now verify the read checksum with the expected checksum according to datasheet p. 20
|
||||
uint16_t calcChecksum = 0;
|
||||
for (size_t idx = 2; idx < 20; idx++) {
|
||||
calcChecksum += rawReply[idx];
|
||||
}
|
||||
if (checksum != calcChecksum) {
|
||||
sif::warning << "AcsPollingTask: Invalid ADIS reply checksum" << std::endl;
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
auto burstMode = adis1650x::burstModeFromMscCtrl(gyro.ownReply.cfg.mscCtrlReg);
|
||||
if (burstMode != adis1650x::BurstModes::BURST_16_BURST_SEL_0) {
|
||||
sif::error << "GyroADIS1650XHandler::interpretDeviceReply: Analysis for select burst mode"
|
||||
" not implemented!"
|
||||
<< std::endl;
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
MutexGuard mg(ipcLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
gyro.ownReply.dataWasSet = true;
|
||||
gyro.ownReply.cfg.diagStat = rawReply[2] << 8 | rawReply[3];
|
||||
gyro.ownReply.data.angVelocities[0] = (rawReply[4] << 8) | rawReply[5];
|
||||
gyro.ownReply.data.angVelocities[1] = (rawReply[6] << 8) | rawReply[7];
|
||||
gyro.ownReply.data.angVelocities[2] = (rawReply[8] << 8) | rawReply[9];
|
||||
|
||||
gyro.ownReply.data.accelerations[0] = (rawReply[10] << 8) | rawReply[11];
|
||||
gyro.ownReply.data.accelerations[1] = (rawReply[12] << 8) | rawReply[13];
|
||||
gyro.ownReply.data.accelerations[2] = (rawReply[14] << 8) | rawReply[15];
|
||||
|
||||
gyro.ownReply.data.temperatureRaw = (rawReply[16] << 8) | rawReply[17];
|
||||
}
|
||||
|
||||
void AcsBoardPolling::mgmLis3Handler(MgmLis3& mgm) {
|
||||
|
@ -302,7 +302,10 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
|
||||
// TIME is set for every message, no need for a counter
|
||||
bool timeValid = false;
|
||||
if (TIME_SET == (TIME_SET & gps.set)) {
|
||||
timeValid = true;
|
||||
// To prevent totally incorrect times from being declared valid.
|
||||
if(gpsSet.satInView.isValid() and gpsSet.satInView.value >= 1) {
|
||||
timeValid = true;
|
||||
}
|
||||
timeval time = {};
|
||||
#if LIBGPS_VERSION_MINOR <= 17
|
||||
gpsSet.unixSeconds.value = std::floor(gps.fix.time);
|
||||
|
@ -10,7 +10,9 @@
|
||||
|
||||
#include "fsfw/FSFW.h"
|
||||
|
||||
ImtqPollingTask::ImtqPollingTask(object_id_t imtqPollingTask) : SystemObject(imtqPollingTask) {
|
||||
ImtqPollingTask::ImtqPollingTask(object_id_t imtqPollingTask,
|
||||
std::atomic_uint16_t& i2cFatalErrors): SystemObject(imtqPollingTask),
|
||||
i2cFatalErrors(i2cFatalErrors) {
|
||||
semaphore = SemaphoreFactory::instance()->createBinarySemaphore();
|
||||
semaphore->acquire();
|
||||
ipcLock = MutexFactory::instance()->createMutex();
|
||||
@ -427,12 +429,20 @@ ReturnValue_t ImtqPollingTask::performI2cFullRequest(uint8_t* reply, size_t repl
|
||||
if (ioctl(fd, I2C_SLAVE, i2cAddr) < 0) {
|
||||
sif::warning << "Opening IMTQ slave device failed with code " << errno << ": "
|
||||
<< strerror(errno) << std::endl;
|
||||
if(errno == EBUSY) {
|
||||
i2cFatalErrors++;
|
||||
}
|
||||
}
|
||||
|
||||
int written = write(fd, cmdBuf.data(), cmdLen);
|
||||
if (written < 0) {
|
||||
sif::error << "IMTQ: Failed to send with error code " << errno
|
||||
<< ". Error description: " << strerror(errno) << std::endl;
|
||||
// This is a weird issue which sometimes occurs on debug builds. All I2C buses are busy
|
||||
// for all writes,
|
||||
if(errno == EBUSY) {
|
||||
i2cFatalErrors++;
|
||||
}
|
||||
return returnvalue::FAILED;
|
||||
} else if (static_cast<size_t>(written) != cmdLen) {
|
||||
sif::error << "IMTQ: Could not write all bytes" << std::endl;
|
||||
|
@ -8,12 +8,13 @@
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||
#include "mission/devices/devicedefinitions/imtqHelpers.h"
|
||||
#include <atomic>
|
||||
|
||||
class ImtqPollingTask : public SystemObject,
|
||||
public ExecutableObjectIF,
|
||||
public DeviceCommunicationIF {
|
||||
public:
|
||||
ImtqPollingTask(object_id_t imtqPollingTask);
|
||||
ImtqPollingTask(object_id_t imtqPollingTask, std::atomic_uint16_t& i2cFatalErrors);
|
||||
|
||||
ReturnValue_t performOperation(uint8_t operationCode) override;
|
||||
ReturnValue_t initialize() override;
|
||||
@ -28,6 +29,7 @@ class ImtqPollingTask : public SystemObject,
|
||||
ReturnValue_t comStatus = returnvalue::OK;
|
||||
MutexIF* ipcLock;
|
||||
MutexIF* bufLock;
|
||||
std::atomic_uint16_t& i2cFatalErrors;
|
||||
I2cCookie* i2cCookie = nullptr;
|
||||
const char* i2cDev = nullptr;
|
||||
address_t i2cAddr = 0;
|
||||
|
@ -268,18 +268,18 @@ void StarTrackerHandler::doStartUp() {
|
||||
default:
|
||||
return;
|
||||
}
|
||||
setMode(_MODE_TO_ON, SUBMODE_BOOTLOADER);
|
||||
startupState = StartupState::DONE;
|
||||
internalState = InternalState::IDLE;
|
||||
setMode(_MODE_TO_ON);
|
||||
}
|
||||
|
||||
void StarTrackerHandler::doShutDown() {
|
||||
// If the star tracker is shutdown also stop all running processes in the image loader task
|
||||
strHelper->stopProcess();
|
||||
setMode(_MODE_POWER_DOWN);
|
||||
}
|
||||
|
||||
void StarTrackerHandler::doOffActivity() {
|
||||
startupState = StartupState::IDLE;
|
||||
internalState = InternalState::IDLE;
|
||||
startupState = StartupState::IDLE;
|
||||
bootState = FwBootState::NONE;
|
||||
setMode(_MODE_POWER_DOWN);
|
||||
}
|
||||
|
||||
ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||
@ -302,81 +302,103 @@ ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id
|
||||
|
||||
ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
||||
switch (internalState) {
|
||||
case InternalState::BOOT:
|
||||
*id = startracker::BOOT;
|
||||
bootCountdown.setTimeout(BOOT_TIMEOUT);
|
||||
internalState = InternalState::BOOT_DELAY;
|
||||
return buildCommandFromCommand(*id, nullptr, 0);
|
||||
case InternalState::REQ_VERSION:
|
||||
internalState = InternalState::VERIFY_BOOT;
|
||||
// Again read program to check if firmware boot was successful
|
||||
*id = startracker::REQ_VERSION;
|
||||
return buildCommandFromCommand(*id, nullptr, 0);
|
||||
case InternalState::LOGLEVEL:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::LOGLEVEL;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::LIMITS:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::LIMITS;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::TRACKING:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::TRACKING;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::MOUNTING:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::MOUNTING;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::IMAGE_PROCESSOR:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::IMAGE_PROCESSOR;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::CAMERA:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::CAMERA;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::CENTROIDING:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::CENTROIDING;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::LISA:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::LISA;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::MATCHING:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::MATCHING;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::VALIDATION:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::VALIDATION;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::ALGO:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::ALGO;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::LOG_SUBSCRIPTION:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::LOGSUBSCRIPTION;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::DEBUG_CAMERA:
|
||||
internalState = InternalState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::DEBUG_CAMERA;
|
||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||
paramJsonFile.size());
|
||||
case InternalState::BOOT_FIRMWARE: {
|
||||
if (bootState == FwBootState::WAIT_FOR_EXECUTION or bootState == FwBootState::VERIFY_BOOT) {
|
||||
return NOTHING_TO_SEND;
|
||||
}
|
||||
if (bootState == FwBootState::NONE) {
|
||||
*id = startracker::BOOT;
|
||||
bootCountdown.setTimeout(BOOT_TIMEOUT);
|
||||
bootState = FwBootState::BOOT_DELAY;
|
||||
return buildCommandFromCommand(*id, nullptr, 0);
|
||||
}
|
||||
if (bootState == FwBootState::BOOT_DELAY) {
|
||||
if (bootCountdown.isBusy()) {
|
||||
return NOTHING_TO_SEND;
|
||||
}
|
||||
bootState = FwBootState::REQ_VERSION;
|
||||
}
|
||||
switch (bootState) {
|
||||
case (FwBootState::REQ_VERSION): {
|
||||
bootState = FwBootState::VERIFY_BOOT;
|
||||
// Again read program to check if firmware boot was successful
|
||||
*id = startracker::REQ_VERSION;
|
||||
return buildCommandFromCommand(*id, nullptr, 0);
|
||||
}
|
||||
case (FwBootState::LOGLEVEL): {
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::LOGLEVEL;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
}
|
||||
case (FwBootState::LIMITS): {
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::LIMITS;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
}
|
||||
case (FwBootState::TRACKING): {
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::TRACKING;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
}
|
||||
case FwBootState::MOUNTING:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::MOUNTING;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::IMAGE_PROCESSOR:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::IMAGE_PROCESSOR;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::CAMERA:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::CAMERA;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::CENTROIDING:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::CENTROIDING;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::LISA:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::LISA;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::MATCHING:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::MATCHING;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::VALIDATION:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::VALIDATION;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::ALGO:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::ALGO;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::LOG_SUBSCRIPTION:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::LOGSUBSCRIPTION;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
case FwBootState::DEBUG_CAMERA:
|
||||
bootState = FwBootState::WAIT_FOR_EXECUTION;
|
||||
*id = startracker::DEBUG_CAMERA;
|
||||
return buildCommandFromCommand(
|
||||
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
|
||||
default: {
|
||||
sif::error << "STR: Unexpected boot state" << (int)bootState << std::endl;
|
||||
return NOTHING_TO_SEND;
|
||||
}
|
||||
}
|
||||
}
|
||||
case InternalState::BOOT_BOOTLOADER:
|
||||
internalState = InternalState::BOOTLOADER_CHECK;
|
||||
*id = startracker::SWITCH_TO_BOOTLOADER_PROGRAM;
|
||||
@ -707,6 +729,15 @@ void StarTrackerHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||
|
||||
void StarTrackerHandler::doOnTransition(Submode_t subModeFrom) {
|
||||
uint8_t dhbSubmode = getSubmode();
|
||||
// We hide that the transition to submode firmware actually goes through the submode bootloader.
|
||||
// This is because the startracker always starts in bootloader mode but we want to allow direct
|
||||
// transitions to firmware mode.
|
||||
if (startupState == StartupState::DONE) {
|
||||
subModeFrom = SUBMODE_BOOTLOADER;
|
||||
}
|
||||
if (dhbSubmode == SUBMODE_NONE) {
|
||||
bootFirmware(MODE_ON);
|
||||
}
|
||||
if (dhbSubmode == SUBMODE_BOOTLOADER && subModeFrom == SUBMODE_FIRMWARE) {
|
||||
bootBootloader();
|
||||
} else if (dhbSubmode == SUBMODE_FIRMWARE && subModeFrom == SUBMODE_FIRMWARE) {
|
||||
@ -736,19 +767,23 @@ void StarTrackerHandler::doNormalTransition(Mode_t modeFrom, Submode_t subModeFr
|
||||
void StarTrackerHandler::bootFirmware(Mode_t toMode) {
|
||||
switch (internalState) {
|
||||
case InternalState::IDLE:
|
||||
internalState = InternalState::BOOT;
|
||||
sif::info << "STR: Booting to firmware mode" << std::endl;
|
||||
internalState = InternalState::BOOT_FIRMWARE;
|
||||
break;
|
||||
case InternalState::BOOT_DELAY:
|
||||
if (bootCountdown.hasTimedOut()) {
|
||||
internalState = InternalState::REQ_VERSION;
|
||||
}
|
||||
case InternalState::BOOT_FIRMWARE:
|
||||
break;
|
||||
case InternalState::FAILED_FIRMWARE_BOOT:
|
||||
internalState = InternalState::IDLE;
|
||||
break;
|
||||
case InternalState::DONE:
|
||||
setMode(toMode);
|
||||
if (toMode == MODE_NORMAL) {
|
||||
setMode(toMode, 0);
|
||||
} else {
|
||||
setMode(toMode, SUBMODE_FIRMWARE);
|
||||
}
|
||||
sif::info << "STR: Firmware boot success" << std::endl;
|
||||
internalState = InternalState::IDLE;
|
||||
startupState = StartupState::IDLE;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -776,10 +811,11 @@ void StarTrackerHandler::setUpJsonCfgs(JsonConfigs& cfgs, const char* paramJsonF
|
||||
void StarTrackerHandler::bootBootloader() {
|
||||
if (internalState == InternalState::IDLE) {
|
||||
internalState = InternalState::BOOT_BOOTLOADER;
|
||||
} else if (internalState == InternalState::BOOTING_BOOTLOADER_FAILED) {
|
||||
} else if (internalState == InternalState::FAILED_BOOTLOADER_BOOT) {
|
||||
internalState = InternalState::IDLE;
|
||||
} else if (internalState == InternalState::DONE) {
|
||||
internalState = InternalState::IDLE;
|
||||
startupState = StartupState::IDLE;
|
||||
setMode(MODE_ON);
|
||||
}
|
||||
}
|
||||
@ -1934,7 +1970,7 @@ ReturnValue_t StarTrackerHandler::checkProgram() {
|
||||
if (startupState == StartupState::WAIT_CHECK_PROGRAM) {
|
||||
startupState = StartupState::DONE;
|
||||
}
|
||||
if (internalState == InternalState::VERIFY_BOOT) {
|
||||
if (bootState == FwBootState::VERIFY_BOOT) {
|
||||
sif::warning << "StarTrackerHandler::checkProgram: Failed to boot firmware" << std::endl;
|
||||
// Device handler will run into timeout and fall back to transition source mode
|
||||
triggerEvent(BOOTING_FIRMWARE_FAILED_EVENT);
|
||||
@ -1947,11 +1983,11 @@ ReturnValue_t StarTrackerHandler::checkProgram() {
|
||||
if (startupState == StartupState::WAIT_CHECK_PROGRAM) {
|
||||
startupState = StartupState::BOOT_BOOTLOADER;
|
||||
}
|
||||
if (internalState == InternalState::VERIFY_BOOT) {
|
||||
internalState = InternalState::LOGLEVEL;
|
||||
if (bootState == FwBootState::VERIFY_BOOT) {
|
||||
bootState = FwBootState::LOGLEVEL;
|
||||
} else if (internalState == InternalState::BOOTLOADER_CHECK) {
|
||||
triggerEvent(BOOTING_BOOTLOADER_FAILED_EVENT);
|
||||
internalState = InternalState::BOOTING_BOOTLOADER_FAILED;
|
||||
internalState = InternalState::FAILED_BOOTLOADER_BOOT;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -2025,54 +2061,55 @@ ReturnValue_t StarTrackerHandler::handleActionReplySet(LocalPoolDataSetBase& dat
|
||||
void StarTrackerHandler::handleStartup(const uint8_t* parameterId) {
|
||||
switch (*parameterId) {
|
||||
case (startracker::ID::LOG_LEVEL): {
|
||||
internalState = InternalState::LIMITS;
|
||||
bootState = FwBootState::LIMITS;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::LIMITS): {
|
||||
internalState = InternalState::TRACKING;
|
||||
bootState = FwBootState::TRACKING;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::TRACKING): {
|
||||
internalState = InternalState::MOUNTING;
|
||||
bootState = FwBootState::MOUNTING;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::MOUNTING): {
|
||||
internalState = InternalState::IMAGE_PROCESSOR;
|
||||
bootState = FwBootState::IMAGE_PROCESSOR;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::IMAGE_PROCESSOR): {
|
||||
internalState = InternalState::CAMERA;
|
||||
bootState = FwBootState::CAMERA;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::CAMERA): {
|
||||
internalState = InternalState::CENTROIDING;
|
||||
bootState = FwBootState::CENTROIDING;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::CENTROIDING): {
|
||||
internalState = InternalState::LISA;
|
||||
bootState = FwBootState::LISA;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::LISA): {
|
||||
internalState = InternalState::MATCHING;
|
||||
bootState = FwBootState::MATCHING;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::MATCHING): {
|
||||
internalState = InternalState::VALIDATION;
|
||||
bootState = FwBootState::VALIDATION;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::VALIDATION): {
|
||||
internalState = InternalState::ALGO;
|
||||
bootState = FwBootState::ALGO;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::ALGO): {
|
||||
internalState = InternalState::LOG_SUBSCRIPTION;
|
||||
bootState = FwBootState::LOG_SUBSCRIPTION;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::LOG_SUBSCRIPTION): {
|
||||
internalState = InternalState::DEBUG_CAMERA;
|
||||
bootState = FwBootState::DEBUG_CAMERA;
|
||||
break;
|
||||
}
|
||||
case (startracker::ID::DEBUG_CAMERA): {
|
||||
bootState = FwBootState::NONE;
|
||||
internalState = InternalState::DONE;
|
||||
break;
|
||||
}
|
||||
|
@ -60,7 +60,6 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
||||
protected:
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
void doOffActivity() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
|
||||
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
|
||||
void fillCommandAndReplyMap() override;
|
||||
@ -247,14 +246,31 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
||||
|
||||
NormalState normalState = NormalState::TEMPERATURE_REQUEST;
|
||||
|
||||
enum class StartupState {
|
||||
IDLE,
|
||||
CHECK_PROGRAM,
|
||||
WAIT_CHECK_PROGRAM,
|
||||
BOOT_BOOTLOADER,
|
||||
WAIT_JCFG,
|
||||
DONE
|
||||
};
|
||||
StartupState startupState = StartupState::IDLE;
|
||||
|
||||
enum class InternalState {
|
||||
IDLE,
|
||||
BOOT,
|
||||
BOOT_FIRMWARE,
|
||||
DONE,
|
||||
FAILED_FIRMWARE_BOOT,
|
||||
BOOT_BOOTLOADER,
|
||||
BOOTLOADER_CHECK,
|
||||
FAILED_BOOTLOADER_BOOT
|
||||
};
|
||||
|
||||
enum class FwBootState {
|
||||
NONE,
|
||||
BOOT_DELAY,
|
||||
REQ_VERSION,
|
||||
VERIFY_BOOT,
|
||||
STARTUP_CHECK,
|
||||
BOOT_DELAY,
|
||||
FIRMWARE_CHECK,
|
||||
LOGLEVEL,
|
||||
LIMITS,
|
||||
TRACKING,
|
||||
@ -270,26 +286,11 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
||||
LOG_SUBSCRIPTION,
|
||||
DEBUG_CAMERA,
|
||||
WAIT_FOR_EXECUTION,
|
||||
DONE,
|
||||
FAILED_FIRMWARE_BOOT,
|
||||
BOOT_BOOTLOADER,
|
||||
BOOTLOADER_CHECK,
|
||||
BOOTING_BOOTLOADER_FAILED
|
||||
};
|
||||
FwBootState bootState = FwBootState::NONE;
|
||||
|
||||
InternalState internalState = InternalState::IDLE;
|
||||
|
||||
enum class StartupState {
|
||||
IDLE,
|
||||
CHECK_PROGRAM,
|
||||
WAIT_CHECK_PROGRAM,
|
||||
BOOT_BOOTLOADER,
|
||||
WAIT_JCFG,
|
||||
DONE
|
||||
};
|
||||
|
||||
StartupState startupState = StartupState::IDLE;
|
||||
|
||||
bool strHelperExecuting = false;
|
||||
|
||||
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 278 translations.
|
||||
* @brief Auto-generated event translation file. Contains 279 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-15 10:10:04
|
||||
* Generated on: 2023-03-21 23:34:22
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -260,6 +260,7 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -791,6 +792,8 @@ const char *translateEvents(Event event) {
|
||||
return REBOOT_COUNTER_STRING;
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 173 translations.
|
||||
* Generated on: 2023-03-14 17:08:41
|
||||
* Generated on: 2023-03-21 23:34:22
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -71,6 +71,22 @@ ReturnValue_t AxiPtmeConfig::disableTxclockInversion() {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::enableBatPriorityBit() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, true, BitPos::EN_BAT_PRIORITY);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::disableBatPriorityBit() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, false, BitPos::EN_BAT_PRIORITY);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::writeReg(uint32_t regOffset, uint32_t writeVal) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = mutex->lockMutex(timeoutType, mutexTimeout);
|
||||
|
@ -54,6 +54,9 @@ class AxiPtmeConfig : public SystemObject {
|
||||
ReturnValue_t enableTxclockInversion();
|
||||
ReturnValue_t disableTxclockInversion();
|
||||
|
||||
ReturnValue_t enableBatPriorityBit();
|
||||
ReturnValue_t disableBatPriorityBit();
|
||||
|
||||
private:
|
||||
// Address of register storing the bitrate configuration parameter
|
||||
static const uint32_t CADU_BITRATE_REG = 0x0;
|
||||
@ -61,7 +64,7 @@ class AxiPtmeConfig : public SystemObject {
|
||||
static const uint32_t COMMON_CONFIG_REG = 0x4;
|
||||
static const uint32_t ADRESS_DIVIDER = 4;
|
||||
|
||||
enum class BitPos : uint32_t { EN_TX_CLK_MANIPULATOR, INVERT_CLOCK };
|
||||
enum class BitPos : uint32_t { EN_TX_CLK_MANIPULATOR = 0, INVERT_CLOCK = 1, EN_BAT_PRIORITY = 2 };
|
||||
|
||||
std::string axiUio;
|
||||
std::string uioMap;
|
||||
|
@ -48,3 +48,11 @@ ReturnValue_t PtmeConfig::configTxManipulator(bool enable) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PtmeConfig::enableBatPriorityBit(bool enable) {
|
||||
if (enable) {
|
||||
return axiPtmeConfig->enableBatPriorityBit();
|
||||
} else {
|
||||
return axiPtmeConfig->disableBatPriorityBit();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef LINUX_OBC_PTMECONFIG_H_
|
||||
#define LINUX_OBC_PTMECONFIG_H_
|
||||
|
||||
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
|
||||
|
||||
#include "AxiPtmeConfig.h"
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
#include "fsfw/returnvalues/returnvalue.h"
|
||||
@ -53,6 +55,15 @@ class PtmeConfig : public SystemObject {
|
||||
*/
|
||||
ReturnValue_t configTxManipulator(bool enable);
|
||||
|
||||
/**
|
||||
* Enable the bat priority bit in the PTME wrapper component.
|
||||
* Please note that a reset of the PTME is still required as specified in the documentation.
|
||||
* This is done by a higher level component.
|
||||
* @param enable
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t enableBatPriorityBit(bool enable);
|
||||
|
||||
private:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::RATE_SETTER;
|
||||
|
||||
|
@ -55,6 +55,10 @@ ReturnValue_t AcsController::executeAction(ActionId_t actionId, MessageQueueId_t
|
||||
navigation.resetMekf(&mekfData);
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
case RESTORE_MEKF_NONFINITE_RECOVERY: {
|
||||
mekfLost = false;
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
default: {
|
||||
return HasActionsIF::INVALID_ACTION_ID;
|
||||
}
|
||||
@ -149,6 +153,10 @@ void AcsController::performSafe() {
|
||||
triggerEvent(acs::MEKF_INVALID_INFO);
|
||||
mekfInvalidFlag = true;
|
||||
}
|
||||
if (result == MultiplicativeKalmanFilter::MEKF_NOT_FINITE && !mekfLost) {
|
||||
navigation.resetMekf(&mekfData);
|
||||
mekfLost = true;
|
||||
}
|
||||
} else {
|
||||
mekfInvalidFlag = false;
|
||||
}
|
||||
@ -178,7 +186,7 @@ void AcsController::performSafe() {
|
||||
safeCtrlFailureFlag = true;
|
||||
}
|
||||
safeCtrlFailureCounter++;
|
||||
if (safeCtrlFailureCounter > 50) {
|
||||
if (safeCtrlFailureCounter > 150) {
|
||||
safeCtrlFailureFlag = false;
|
||||
safeCtrlFailureCounter = 0;
|
||||
}
|
||||
@ -231,6 +239,9 @@ void AcsController::performDetumble() {
|
||||
triggerEvent(acs::MEKF_INVALID_INFO);
|
||||
mekfInvalidFlag = true;
|
||||
}
|
||||
if (result == MultiplicativeKalmanFilter::MEKF_NOT_FINITE && !mekfLost) {
|
||||
navigation.resetMekf(&mekfData);
|
||||
}
|
||||
} else {
|
||||
mekfInvalidFlag = false;
|
||||
}
|
||||
@ -282,6 +293,9 @@ void AcsController::performPointingCtrl() {
|
||||
triggerEvent(acs::MEKF_INVALID_INFO);
|
||||
mekfInvalidFlag = true;
|
||||
}
|
||||
if (result == MultiplicativeKalmanFilter::MEKF_NOT_FINITE && !mekfLost) {
|
||||
navigation.resetMekf(&mekfData);
|
||||
}
|
||||
if (mekfInvalidCounter > acsParameters.onBoardParams.mekfViolationTimer) {
|
||||
// Trigger this so STR FDIR can set the device faulty.
|
||||
EventManagerIF::triggerEvent(objects::STAR_TRACKER, acs::MEKF_INVALID_MODE_VIOLATION, 0, 0);
|
||||
|
@ -64,6 +64,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
|
||||
uint16_t mekfInvalidCounter = 0;
|
||||
bool safeCtrlFailureFlag = false;
|
||||
uint8_t safeCtrlFailureCounter = 0;
|
||||
uint8_t resetMekfCount = 0;
|
||||
bool mekfLost = false;
|
||||
|
||||
int32_t cmdSpeedRws[4] = {0, 0, 0, 0};
|
||||
int16_t cmdDipolMtqs[3] = {0, 0, 0};
|
||||
@ -78,6 +80,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
|
||||
/** Device command IDs */
|
||||
static const DeviceCommandId_t SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0x0;
|
||||
static const DeviceCommandId_t RESET_MEKF = 0x1;
|
||||
static const DeviceCommandId_t RESTORE_MEKF_NONFINITE_RECOVERY = 0x2;
|
||||
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::ACS_CTRL;
|
||||
static constexpr ReturnValue_t FILE_DELETION_FAILED = MAKE_RETURN_CODE(0);
|
||||
|
@ -768,10 +768,10 @@ class AcsParameters : public HasParametersIF {
|
||||
double gyr2orientationMatrix[3][3] = {{0, 0, -1}, {0, -1, 0}, {-1, 0, 0}};
|
||||
double gyr3orientationMatrix[3][3] = {{0, 0, -1}, {0, 1, 0}, {1, 0, 0}};
|
||||
|
||||
double gyr0bias[3] = {0.06318149743589743, 0.4283235025641024, -0.16383500000000004};
|
||||
double gyr1bias[3] = {-0.12855128205128205, 1.6737307692307695, 1.031724358974359};
|
||||
double gyr2bias[3] = {0.15039212820512823, 0.7094475589743591, -0.22298363589743594};
|
||||
double gyr3bias[3] = {0.0021730769230769217, -0.6655897435897435, 0.034096153846153845};
|
||||
double gyr0bias[3] = {0.0, 0.4, -0.1};
|
||||
double gyr1bias[3] = {0.0956745283018868, 2.0854575471698116, 1.2505990566037737};
|
||||
double gyr2bias[3] = {0.1, 0.7, -0.2};
|
||||
double gyr3bias[3] = {-0.10721698113207549, -0.6111650943396226, 0.1716462264150944};
|
||||
|
||||
/* var = sigma^2, sigma = RND*sqrt(freq), following values are RND^2 and not var as freq is
|
||||
* assumed to be equal for the same class of sensors */
|
||||
|
@ -1080,6 +1080,12 @@ ReturnValue_t MultiplicativeKalmanFilter::mekfEst(
|
||||
|
||||
MatrixOperations<double>::add(*cov0, *cov1, *initialCovarianceMatrix, 6, 6);
|
||||
|
||||
if (not(MathOperations<double>::checkVectorIsFinite(propagatedQuaternion, 4)) ||
|
||||
not(MathOperations<double>::checkMatrixIsFinite(initialQuaternion, 6, 6))) {
|
||||
updateDataSetWithoutData(mekfData, MekfStatus::NOT_FINITE);
|
||||
return MEKF_NOT_FINITE;
|
||||
}
|
||||
|
||||
updateDataSet(mekfData, MekfStatus::RUNNING, quatBJ, rotRateEst);
|
||||
return MEKF_RUNNING;
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ class MultiplicativeKalmanFilter {
|
||||
NO_MODEL_VECTORS = 2,
|
||||
NO_SUS_MGM_STR_DATA = 3,
|
||||
COVARIANCE_INVERSION_FAILED = 4,
|
||||
NOT_FINITE = 5,
|
||||
INITIALIZED = 10,
|
||||
RUNNING = 11,
|
||||
};
|
||||
@ -74,8 +75,9 @@ class MultiplicativeKalmanFilter {
|
||||
static constexpr ReturnValue_t MEKF_NO_SUS_MGM_STR_DATA = returnvalue::makeCode(IF_MEKF_ID, 5);
|
||||
static constexpr ReturnValue_t MEKF_COVARIANCE_INVERSION_FAILED =
|
||||
returnvalue::makeCode(IF_MEKF_ID, 6);
|
||||
static constexpr ReturnValue_t MEKF_INITIALIZED = returnvalue::makeCode(IF_MEKF_ID, 7);
|
||||
static constexpr ReturnValue_t MEKF_RUNNING = returnvalue::makeCode(IF_MEKF_ID, 8);
|
||||
static constexpr ReturnValue_t MEKF_NOT_FINITE = returnvalue::makeCode(IF_MEKF_ID, 7);
|
||||
static constexpr ReturnValue_t MEKF_INITIALIZED = returnvalue::makeCode(IF_MEKF_ID, 8);
|
||||
static constexpr ReturnValue_t MEKF_RUNNING = returnvalue::makeCode(IF_MEKF_ID, 9);
|
||||
|
||||
private:
|
||||
/*Parameters*/
|
||||
|
@ -404,6 +404,26 @@ class MathOperations {
|
||||
std::memcpy(inverse, identity, sizeof(identity));
|
||||
return 0; // successful inversion
|
||||
}
|
||||
|
||||
static bool checkVectorIsFinite(const T1 *inputVector, uint8_t size) {
|
||||
for (uint8_t i = 0; i < size; i++) {
|
||||
if (not isfinite(inputVector[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool checkMatrixIsFinite(const T1 *inputMatrix, uint8_t rows, uint8_t cols) {
|
||||
for (uint8_t col = 0; col < cols; col++) {
|
||||
for (uint8_t row = 0; row < rows; row++) {
|
||||
if (not isfinite(inputMatrix[row * cols + cols])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* ACS_MATH_MATHOPERATIONS_H_ */
|
||||
|
@ -65,10 +65,7 @@ ReturnValue_t GyrAdis1650XHandler::buildTransitionDeviceCommand(DeviceCommandId_
|
||||
}
|
||||
case (InternalState::SHUTDOWN): {
|
||||
*id = adis1650x::REQUEST;
|
||||
acs::Adis1650XRequest *request = reinterpret_cast<acs::Adis1650XRequest *>(cmdBuf.data());
|
||||
request->mode = acs::SimpleSensorMode::OFF;
|
||||
request->type = adisType;
|
||||
return returnvalue::OK;
|
||||
return preparePeriodicRequest(acs::SimpleSensorMode::OFF);
|
||||
}
|
||||
default: {
|
||||
return NOTHING_TO_SEND;
|
||||
|
@ -34,10 +34,17 @@ void DualLaneAssemblyBase::performChildOperation() {
|
||||
}
|
||||
|
||||
void DualLaneAssemblyBase::startTransition(Mode_t mode, Submode_t submode) {
|
||||
// doStartTransition(mode, submode);
|
||||
using namespace duallane;
|
||||
pwrStateMachine.reset();
|
||||
if (mode != MODE_OFF) {
|
||||
// Special exception: A transition from dual side to single mode must be handled like
|
||||
// going OFF.
|
||||
if ((this->mode == MODE_ON or this->mode == DeviceHandlerIF::MODE_NORMAL) and
|
||||
this->submode == DUAL_MODE and submode != DUAL_MODE) {
|
||||
dualToSingleSideTransition = true;
|
||||
AssemblyBase::startTransition(mode, submode);
|
||||
return;
|
||||
}
|
||||
// If anything other than MODE_OFF is commanded, perform power state machine first
|
||||
// Cache the target modes, required by power state machine
|
||||
pwrStateMachine.start(mode, submode);
|
||||
@ -75,9 +82,13 @@ ReturnValue_t DualLaneAssemblyBase::pwrStateMachineWrapper() {
|
||||
// Will be called for transitions to MODE_OFF, where everything is done after power switching
|
||||
finishModeOp();
|
||||
} else if (opCode == OpCodes::TO_NOT_OFF_DONE) {
|
||||
// Will be called for transitions from MODE_OFF to anything else, where the mode still has
|
||||
// to be commanded after power switching
|
||||
AssemblyBase::startTransition(targetMode, targetSubmode);
|
||||
if (dualToSingleSideTransition) {
|
||||
finishModeOp();
|
||||
} else {
|
||||
// Will be called for transitions from MODE_OFF to anything else, where the mode still has
|
||||
// to be commanded after power switching
|
||||
AssemblyBase::startTransition(targetMode, targetSubmode);
|
||||
}
|
||||
} else if (opCode == OpCodes::TIMEOUT_OCCURED) {
|
||||
if (powerRetryCounter == 0) {
|
||||
powerRetryCounter++;
|
||||
@ -118,6 +129,13 @@ void DualLaneAssemblyBase::handleModeReached() {
|
||||
// Ignore failures for now.
|
||||
pwrStateMachineWrapper();
|
||||
} else {
|
||||
// For dual to single side transition, devices should be logically off, but the switch
|
||||
// handling still needs to be done.
|
||||
if (dualToSingleSideTransition) {
|
||||
pwrStateMachine.start(targetMode, targetSubmode);
|
||||
pwrStateMachineWrapper();
|
||||
return;
|
||||
}
|
||||
finishModeOp();
|
||||
}
|
||||
}
|
||||
@ -229,6 +247,7 @@ void DualLaneAssemblyBase::finishModeOp() {
|
||||
pwrStateMachine.reset();
|
||||
powerRetryCounter = 0;
|
||||
tryingOtherSide = false;
|
||||
dualToSingleSideTransition = false;
|
||||
dualModeErrorSwitch = true;
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ class DualLaneAssemblyBase : public AssemblyBase, public ConfirmsFailuresIF {
|
||||
uint8_t powerRetryCounter = 0;
|
||||
bool tryingOtherSide = false;
|
||||
bool dualModeErrorSwitch = true;
|
||||
bool dualToSingleSideTransition = false;
|
||||
duallane::Submodes defaultSubmode = duallane::Submodes::A_SIDE;
|
||||
|
||||
enum RecoveryCustomStates {
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
CcsdsIpCoreHandler::CcsdsIpCoreHandler(object_id_t objectId, object_id_t tcDestination,
|
||||
PtmeConfig& ptmeConfig, std::atomic_bool& linkState,
|
||||
GpioIF* gpioIF, gpioId_t enTxClock, gpioId_t enTxData)
|
||||
GpioIF* gpioIF, PtmeGpios gpioIds)
|
||||
: SystemObject(objectId),
|
||||
linkState(linkState),
|
||||
tcDestination(tcDestination),
|
||||
@ -22,9 +22,8 @@ CcsdsIpCoreHandler::CcsdsIpCoreHandler(object_id_t objectId, object_id_t tcDesti
|
||||
actionHelper(this, nullptr),
|
||||
modeHelper(this),
|
||||
ptmeConfig(ptmeConfig),
|
||||
gpioIF(gpioIF),
|
||||
enTxClock(enTxClock),
|
||||
enTxData(enTxData) {
|
||||
ptmeGpios(gpioIds),
|
||||
gpioIF(gpioIF) {
|
||||
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
|
||||
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
|
||||
eventQueue =
|
||||
@ -71,6 +70,12 @@ ReturnValue_t CcsdsIpCoreHandler::initialize() {
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
||||
if (batPriorityParam == 0) {
|
||||
disablePrioritySelectMode();
|
||||
} else {
|
||||
enablePrioritySelectMode();
|
||||
}
|
||||
|
||||
#if OBSW_SYRLINKS_SIMULATED == 1
|
||||
// Update data on rising edge
|
||||
ptmeConfig.invertTxClock(false);
|
||||
@ -111,7 +116,24 @@ ReturnValue_t CcsdsIpCoreHandler::getParameter(uint8_t domainId, uint8_t uniqueI
|
||||
ParameterWrapper* parameterWrapper,
|
||||
const ParameterWrapper* newValues,
|
||||
uint16_t startAtIndex) {
|
||||
return returnvalue::OK;
|
||||
if ((domainId == 0) and (uniqueIdentifier == ParamId::BAT_PRIORITY)) {
|
||||
uint8_t newVal = 0;
|
||||
ReturnValue_t result = newValues->getElement(&newVal);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if (newVal > 1) {
|
||||
return HasParametersIF::INVALID_VALUE;
|
||||
}
|
||||
parameterWrapper->set(batPriorityParam);
|
||||
if (mode == MODE_ON) {
|
||||
updateBatPriorityOnTxOff = true;
|
||||
} else if (mode == MODE_OFF) {
|
||||
updateBatPriorityFromParam();
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
return HasParametersIF::INVALID_IDENTIFIER_ID;
|
||||
}
|
||||
|
||||
uint32_t CcsdsIpCoreHandler::getIdentifier() const { return 0; }
|
||||
@ -184,8 +206,8 @@ void CcsdsIpCoreHandler::updateLinkState() { linkState = LINK_UP; }
|
||||
|
||||
void CcsdsIpCoreHandler::enableTransmit() {
|
||||
#ifndef TE0720_1CFA
|
||||
gpioIF->pullHigh(enTxClock);
|
||||
gpioIF->pullHigh(enTxData);
|
||||
gpioIF->pullHigh(ptmeGpios.enableTxClock);
|
||||
gpioIF->pullHigh(ptmeGpios.enableTxData);
|
||||
#endif
|
||||
linkState = LINK_UP;
|
||||
}
|
||||
@ -211,14 +233,8 @@ ReturnValue_t CcsdsIpCoreHandler::checkModeCommand(Mode_t mode, Submode_t submod
|
||||
}
|
||||
|
||||
void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
auto rateHigh = [&]() {
|
||||
ReturnValue_t result = ptmeConfig.setRate(RATE_500KBPS);
|
||||
if (result == returnvalue::OK) {
|
||||
this->mode = HasModesIF::MODE_ON;
|
||||
}
|
||||
};
|
||||
auto rateLow = [&]() {
|
||||
ReturnValue_t result = ptmeConfig.setRate(RATE_100KBPS);
|
||||
auto rateSet = [&](uint32_t rate) {
|
||||
ReturnValue_t result = ptmeConfig.setRate(rate);
|
||||
if (result == returnvalue::OK) {
|
||||
this->mode = HasModesIF::MODE_ON;
|
||||
}
|
||||
@ -228,14 +244,14 @@ void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
if (submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_DEFAULT)) {
|
||||
com::Datarate currentDatarate = com::getCurrentDatarate();
|
||||
if (currentDatarate == com::Datarate::LOW_RATE_MODULATION_BPSK) {
|
||||
rateLow();
|
||||
rateSet(RATE_100KBPS);
|
||||
} else if (currentDatarate == com::Datarate::HIGH_RATE_MODULATION_0QPSK) {
|
||||
rateHigh();
|
||||
rateSet(RATE_500KBPS);
|
||||
}
|
||||
} else if (submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_HIGH)) {
|
||||
rateHigh();
|
||||
rateSet(RATE_500KBPS);
|
||||
} else if (submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_LOW)) {
|
||||
rateLow();
|
||||
rateSet(RATE_100KBPS);
|
||||
}
|
||||
|
||||
} else if (mode == HasModesIF::MODE_OFF) {
|
||||
@ -250,11 +266,16 @@ void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
void CcsdsIpCoreHandler::announceMode(bool recursive) { triggerEvent(MODE_INFO, mode, submode); }
|
||||
|
||||
void CcsdsIpCoreHandler::disableTransmit() {
|
||||
ptmeConfig.enableBatPriorityBit(false);
|
||||
#ifndef TE0720_1CFA
|
||||
gpioIF->pullLow(enTxClock);
|
||||
gpioIF->pullLow(enTxData);
|
||||
gpioIF->pullLow(ptmeGpios.enableTxClock);
|
||||
gpioIF->pullLow(ptmeGpios.enableTxData);
|
||||
#endif
|
||||
linkState = LINK_DOWN;
|
||||
if (updateBatPriorityOnTxOff) {
|
||||
updateBatPriorityFromParam();
|
||||
updateBatPriorityOnTxOff = false;
|
||||
}
|
||||
}
|
||||
|
||||
const char* CcsdsIpCoreHandler::getName() const { return "CCSDS Handler"; }
|
||||
@ -270,3 +291,25 @@ ReturnValue_t CcsdsIpCoreHandler::connectModeTreeParent(HasModeTreeChildrenIF& p
|
||||
ModeTreeChildIF& CcsdsIpCoreHandler::getModeTreeChildIF() { return *this; }
|
||||
|
||||
object_id_t CcsdsIpCoreHandler::getObjectId() const { return SystemObject::getObjectId(); }
|
||||
|
||||
void CcsdsIpCoreHandler::enablePrioritySelectMode() {
|
||||
ptmeConfig.enableBatPriorityBit(true);
|
||||
// Reset the PTME
|
||||
gpioIF->pullLow(ptmeGpios.ptmeResetn);
|
||||
gpioIF->pullHigh(ptmeGpios.ptmeResetn);
|
||||
}
|
||||
|
||||
void CcsdsIpCoreHandler::disablePrioritySelectMode() {
|
||||
ptmeConfig.enableBatPriorityBit(false);
|
||||
// Reset the PTME
|
||||
gpioIF->pullLow(ptmeGpios.ptmeResetn);
|
||||
gpioIF->pullHigh(ptmeGpios.ptmeResetn);
|
||||
}
|
||||
|
||||
void CcsdsIpCoreHandler::updateBatPriorityFromParam() {
|
||||
if (batPriorityParam == 0) {
|
||||
disablePrioritySelectMode();
|
||||
} else {
|
||||
enablePrioritySelectMode();
|
||||
}
|
||||
}
|
||||
|
@ -25,12 +25,25 @@
|
||||
#include "linux/ipcore/PtmeConfig.h"
|
||||
#include "mission/comDefs.h"
|
||||
|
||||
struct PtmeGpios {
|
||||
gpioId_t enableTxClock = gpio::NO_GPIO;
|
||||
gpioId_t enableTxData = gpio::NO_GPIO;
|
||||
gpioId_t ptmeResetn = gpio::NO_GPIO;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief This class handles the data exchange with the CCSDS IP cores implemented in the
|
||||
* programmable logic of the Q7S.
|
||||
*
|
||||
* @details After reboot default CADU bitrate is always set to 100 kbps (results in downlink rate
|
||||
* of 200 kbps due to convolutional code added by syrlinks transceiver)
|
||||
* @details
|
||||
* After reboot default CADU bitrate is always set to 100 kbps (results in downlink rate
|
||||
* of 200 kbps due to convolutional code added by syrlinks transceiver). The IP core handler exposes
|
||||
* a parameter to enable the priority selection mode for the PTME core.
|
||||
*
|
||||
* If the transmitter is on, the selection mode will be enabled when the transmitter goes off.
|
||||
* If the transmitter is off, the update of the PTME will be done immediately on a parameter update.
|
||||
* This is done because changing this parameter requires a reset of the PTME core to avoid bugs
|
||||
* while the transmitter is enabled.
|
||||
*
|
||||
* @author J. Meier
|
||||
*/
|
||||
@ -39,11 +52,12 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
public ModeTreeChildIF,
|
||||
public ModeTreeConnectionIF,
|
||||
public HasModesIF,
|
||||
// public AcceptsTelemetryIF,
|
||||
public AcceptsTelecommandsIF,
|
||||
public ReceivesParameterMessagesIF,
|
||||
public HasActionsIF {
|
||||
public:
|
||||
enum ParamId : uint8_t { BAT_PRIORITY = 0 };
|
||||
|
||||
static const bool LINK_UP = true;
|
||||
static const bool LINK_DOWN = false;
|
||||
using VcId_t = uint8_t;
|
||||
@ -61,8 +75,7 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
* @param enTxData GPIO ID of RS485 tx data enable
|
||||
*/
|
||||
CcsdsIpCoreHandler(object_id_t objectId, object_id_t tcDestination, PtmeConfig& ptmeConfig,
|
||||
std::atomic_bool& linkState, GpioIF* gpioIF, gpioId_t enTxClock,
|
||||
gpioId_t enTxData);
|
||||
std::atomic_bool& linkState, GpioIF* gpioIF, PtmeGpios gpioIds);
|
||||
|
||||
~CcsdsIpCoreHandler();
|
||||
|
||||
@ -138,15 +151,14 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
MessageQueueId_t tcDistributorQueueId = MessageQueueIF::NO_QUEUE;
|
||||
|
||||
PtmeConfig& ptmeConfig;
|
||||
PtmeGpios ptmeGpios;
|
||||
// BAT priority bit on by default to enable priority selection mode for the PTME.
|
||||
uint8_t batPriorityParam = 1;
|
||||
bool updateBatPriorityOnTxOff = false;
|
||||
|
||||
GpioIF* gpioIF = nullptr;
|
||||
// GPIO to enable RS485 transceiver for TX clock
|
||||
gpioId_t enTxClock = gpio::NO_GPIO;
|
||||
// GPIO to enable RS485 transceiver for TX data signal
|
||||
gpioId_t enTxData = gpio::NO_GPIO;
|
||||
|
||||
void readCommandQueue(void);
|
||||
void handleTelemetry();
|
||||
|
||||
/**
|
||||
* @brief Forward link state to virtual channels.
|
||||
@ -163,6 +175,16 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
* RS485 transceiver chips to high.
|
||||
*/
|
||||
void disableTransmit();
|
||||
|
||||
/**
|
||||
* The following set of functions configure the mode of the PTME bandwith allocation table (BAT)
|
||||
* module. This consists of the following 2 steps:
|
||||
* 1. Update the BAT priority bit in the PTME wrapper
|
||||
* 2. Reset the PTME as specified in the datasheet.
|
||||
*/
|
||||
void enablePrioritySelectMode();
|
||||
void disablePrioritySelectMode();
|
||||
void updateBatPriorityFromParam();
|
||||
};
|
||||
|
||||
#endif /* CCSDSHANDLER_H_ */
|
||||
|
2
tmtc
2
tmtc
Submodule tmtc updated: e5a09e148b...c5b8831b43
Reference in New Issue
Block a user