Compare commits
97 Commits
Author | SHA1 | Date | |
---|---|---|---|
20bc31449a | |||
2901ebc15c
|
|||
e992f933ec | |||
a95ab49690 | |||
b261779ebf | |||
db5e7a535e | |||
4a8e111a18 | |||
f79acca1d6 | |||
4a9b6bc0c4 | |||
4dad1df13b | |||
f67d72a8dd | |||
da79f24b33 | |||
b2b7900720 | |||
de4562dd2f | |||
fb9303a8de | |||
9b2b087d08 | |||
1c27ba7261 | |||
3a59cd301b | |||
4c66d8fb5f | |||
b634543c5a | |||
ced812052d | |||
a0d559a5fd | |||
c7e554aebc | |||
e8bd3f447d | |||
d1086bc9aa | |||
98a2338dcb | |||
880b8620ba | |||
788fbb72f0 | |||
afcc0cc21d | |||
db3a4955c2 | |||
d0a9460676 | |||
add083135e | |||
3ae7dab8c7 | |||
0c394ad34d | |||
4de1932c8a | |||
1c74d39faf | |||
f40348904c | |||
2d4a3c0ee2 | |||
295da50bc7 | |||
3f9bf8e173 | |||
4893af07ae | |||
af8b4d5bc8 | |||
2ae89769af | |||
9c0744ae02 | |||
9544516cc4 | |||
3dd7530c3d | |||
931bb5ee28 | |||
d85a5975c0 | |||
456ee156c3 | |||
40eae48a1a | |||
8da5f4dd44 | |||
4bd3cf4d52 | |||
c5b2b5c56c | |||
55d6edcd66
|
|||
cf48a18733
|
|||
9e787a7e44
|
|||
b8064c4a39 | |||
5058b8905d | |||
aec383b974 | |||
caa2800a7a | |||
004a283163 | |||
a85b0a4a76 | |||
998110dea4 | |||
5c79d5e1f7 | |||
442b1c94a6 | |||
8113a71c79 | |||
cc60847bd0 | |||
0b06bc4c8b | |||
9711bb6300 | |||
68e4d9be07 | |||
ddcdc38310 | |||
9921522ce0 | |||
f3cc406495 | |||
9c78362ac5 | |||
016e9dd2df | |||
351ca1154b | |||
6cf488d0a6 | |||
15139d6944 | |||
50327fb614 | |||
7bd2fce86f | |||
7222475985 | |||
f5a7fd2ffe | |||
8efbdf8279 | |||
4763ec84fa | |||
e4fc6e3d2a | |||
2543cdf5b7 | |||
ea9f72b9c4 | |||
148a876fc9 | |||
9804898d05 | |||
e04f349e77 | |||
8cc4431e22 | |||
22dcf10207 | |||
8b467ec69e | |||
97a7087827 | |||
a615ed2d21 | |||
3d7d01d6ab | |||
7e6c25901b
|
13
CHANGELOG.md
13
CHANGELOG.md
@ -16,7 +16,7 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
# [v4.0.1] 2023-06-23
|
# [v4.0.1] 2023-06-24
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
@ -52,17 +52,6 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
restore the PL I2C.
|
restore the PL I2C.
|
||||||
- Core controller now announces firmware version as well when requesting a version info event
|
- Core controller now announces firmware version as well when requesting a version info event
|
||||||
|
|
||||||
# [v3.3.1] 2023-06-22
|
|
||||||
|
|
||||||
## Fixed
|
|
||||||
|
|
||||||
- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was
|
|
||||||
only one destination available.
|
|
||||||
|
|
||||||
## Fixed
|
|
||||||
|
|
||||||
- Fixed H parameter in SUS converter from 1 mm to 2.5 mm.
|
|
||||||
|
|
||||||
# [v3.3.0] 2023-06-21
|
# [v3.3.0] 2023-06-21
|
||||||
|
|
||||||
Like v3.2.0 but without the custom FM changes related to VC0.
|
Like v3.2.0 but without the custom FM changes related to VC0.
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR 3)
|
set(OBSW_VERSION_MAJOR 4)
|
||||||
set(OBSW_VERSION_MINOR 3)
|
set(OBSW_VERSION_MINOR 0)
|
||||||
set(OBSW_VERSION_REVISION 1)
|
set(OBSW_VERSION_REVISION 1)
|
||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
|||||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||||
|
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
|||||||
return I2C_REBOOT_STRING;
|
return I2C_REBOOT_STRING;
|
||||||
case (14012):
|
case (14012):
|
||||||
return PDEC_REBOOT_STRING;
|
return PDEC_REBOOT_STRING;
|
||||||
|
case (14013):
|
||||||
|
return FIRMWARE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14101):
|
case (14101):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 171 translations.
|
* Contains 171 translations.
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ static constexpr char UART_SCEX_DEV[] = "/dev/scex";
|
|||||||
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio_pdec_regs";
|
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio_pdec_regs";
|
||||||
static constexpr char UIO_PTME[] = "/dev/uio_ptme";
|
static constexpr char UIO_PTME[] = "/dev/uio_ptme";
|
||||||
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio_pdec_cfg_mem";
|
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio_pdec_cfg_mem";
|
||||||
|
static constexpr char UIO_SYS_ROM[] = "/dev/uio_sys_rom";
|
||||||
static constexpr char UIO_PDEC_RAM[] = "/dev/uio_pdec_ram";
|
static constexpr char UIO_PDEC_RAM[] = "/dev/uio_pdec_ram";
|
||||||
static constexpr char UIO_PDEC_IRQ[] = "/dev/uio_pdec_irq";
|
static constexpr char UIO_PDEC_IRQ[] = "/dev/uio_pdec_irq";
|
||||||
static constexpr int MAP_ID_PTME_CONFIG = 3;
|
static constexpr int MAP_ID_PTME_CONFIG = 3;
|
||||||
@ -57,6 +58,7 @@ static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0";
|
|||||||
static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2";
|
static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2";
|
||||||
static constexpr char GNSS_SELECT[] = "gnss_mux_select";
|
static constexpr char GNSS_SELECT[] = "gnss_mux_select";
|
||||||
static constexpr char GNSS_MUX_SELECT[] = "gnss_mux_select";
|
static constexpr char GNSS_MUX_SELECT[] = "gnss_mux_select";
|
||||||
|
static constexpr char PL_I2C_ARESETN[] = "pl_i2c_aresetn";
|
||||||
|
|
||||||
static constexpr char HEATER_0[] = "heater0";
|
static constexpr char HEATER_0[] = "heater0";
|
||||||
static constexpr char HEATER_1[] = "heater1";
|
static constexpr char HEATER_1[] = "heater1";
|
||||||
@ -82,14 +84,12 @@ static constexpr char EN_RW_4[] = "enable_rw_4";
|
|||||||
|
|
||||||
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
||||||
static constexpr char ENABLE_RADFET[] = "enable_radfet";
|
static constexpr char ENABLE_RADFET[] = "enable_radfet";
|
||||||
static constexpr char PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0";
|
|
||||||
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
|
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
|
||||||
static constexpr char PAPB_BUSY_SIGNAL_VC1[] = "papb_busy_signal_vc1";
|
|
||||||
static constexpr char PAPB_EMPTY_SIGNAL_VC1[] = "papb_empty_signal_vc1";
|
static constexpr char PAPB_EMPTY_SIGNAL_VC1[] = "papb_empty_signal_vc1";
|
||||||
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_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 PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
|
||||||
|
|
||||||
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
||||||
|
|
||||||
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
|
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <fsfw/filesystem/HasFileSystemIF.h>
|
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
#include <fsfw/tasks/TaskFactory.h>
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
|
#include <fsfw_hal/linux/uio/UioMapper.h>
|
||||||
|
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
@ -22,6 +23,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
|
#include "bsp_q7s/boardconfig/busConf.h"
|
||||||
#include "bsp_q7s/fs/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#include "bsp_q7s/memory/scratchApi.h"
|
#include "bsp_q7s/memory/scratchApi.h"
|
||||||
#include "bsp_q7s/xadc/Xadc.h"
|
#include "bsp_q7s/xadc/Xadc.h"
|
||||||
@ -169,6 +171,8 @@ ReturnValue_t CoreController::initialize() {
|
|||||||
sdStateMachine();
|
sdStateMachine();
|
||||||
|
|
||||||
triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY);
|
triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY);
|
||||||
|
announceCurrentImageInfo();
|
||||||
|
announceVersionInfo();
|
||||||
EventManagerIF *eventManager =
|
EventManagerIF *eventManager =
|
||||||
ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
|
ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
|
||||||
if (eventManager == nullptr or eventQueue == nullptr) {
|
if (eventManager == nullptr or eventQueue == nullptr) {
|
||||||
@ -185,6 +189,14 @@ ReturnValue_t CoreController::initialize() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UioMapper sysRomMapper(q7s::UIO_SYS_ROM);
|
||||||
|
result = sysRomMapper.getMappedAdress(&mappedSysRomAddr, UioMapper::Permissions::READ_ONLY);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
// TODO: This might be a reason to switch to another image..
|
||||||
|
sif::error << "Getting mapped SYS ROM UIO address failed" << std::endl;
|
||||||
|
return ObjectManager::CHILD_INIT_FAILED;
|
||||||
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,19 +222,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
using namespace core;
|
using namespace core;
|
||||||
switch (actionId) {
|
switch (actionId) {
|
||||||
case (ANNOUNCE_VERSION): {
|
case (ANNOUNCE_VERSION): {
|
||||||
uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) |
|
announceVersionInfo();
|
||||||
(common::OBSW_VERSION_REVISION << 8);
|
|
||||||
uint32_t p2 = 0;
|
|
||||||
if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) {
|
|
||||||
p1 |= 1;
|
|
||||||
auto shaAsStr = std::string(common::OBSW_VERSION_CST_GIT_SHA1);
|
|
||||||
size_t posDash = shaAsStr.find("-");
|
|
||||||
auto gitHash = shaAsStr.substr(posDash + 2, 4);
|
|
||||||
// Only copy first 4 letters of git hash
|
|
||||||
memcpy(&p2, gitHash.c_str(), 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
triggerEvent(VERSION_INFO, p1, p2);
|
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
case (ANNOUNCE_BOOT_COUNTS): {
|
case (ANNOUNCE_BOOT_COUNTS): {
|
||||||
@ -230,7 +230,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
case (ANNOUNCE_CURRENT_IMAGE): {
|
case (ANNOUNCE_CURRENT_IMAGE): {
|
||||||
triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
|
announceCurrentImageInfo();
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
case (LIST_DIRECTORY_INTO_FILE): {
|
case (LIST_DIRECTORY_INTO_FILE): {
|
||||||
@ -246,6 +246,9 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::ostringstream oss("cp ", std::ostringstream::ate);
|
std::ostringstream oss("cp ", std::ostringstream::ate);
|
||||||
|
if (parser.isForceOptSet()) {
|
||||||
|
oss << "-f ";
|
||||||
|
}
|
||||||
if (parser.isRecursiveOptSet()) {
|
if (parser.isRecursiveOptSet()) {
|
||||||
oss << "-r ";
|
oss << "-r ";
|
||||||
}
|
}
|
||||||
@ -319,7 +322,6 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
||||||
// Disable the reboot file mechanism
|
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootFile(path, rebootFile);
|
||||||
if (data[0] == 0) {
|
if (data[0] == 0) {
|
||||||
rebootFile.enabled = false;
|
rebootFile.enabled = false;
|
||||||
@ -332,6 +334,16 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
}
|
}
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
|
case (READ_REBOOT_MECHANISM_INFO): {
|
||||||
|
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
||||||
|
parseRebootFile(path, rebootFile);
|
||||||
|
RebootMechanismPacket packet(rebootFile);
|
||||||
|
ReturnValue_t result = actionHelper.reportData(commandedBy, actionId, &packet);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
|
}
|
||||||
case (RESET_REBOOT_COUNTERS): {
|
case (RESET_REBOOT_COUNTERS): {
|
||||||
if (size == 0) {
|
if (size == 0) {
|
||||||
resetRebootCount(xsc::ALL_CHIP, xsc::ALL_COPY);
|
resetRebootCount(xsc::ALL_CHIP, xsc::ALL_COPY);
|
||||||
@ -1998,7 +2010,6 @@ bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
|||||||
|
|
||||||
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||||
std::string path = currMntPrefix + REBOOT_FILE;
|
std::string path = currMntPrefix + REBOOT_FILE;
|
||||||
// Disable the reboot file mechanism
|
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootFile(path, rebootFile);
|
||||||
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
||||||
rebootFile.img00Cnt = 0;
|
rebootFile.img00Cnt = 0;
|
||||||
@ -2405,6 +2416,33 @@ void CoreController::dirListingDumpHandler() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CoreController::announceVersionInfo() {
|
||||||
|
using namespace core;
|
||||||
|
uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) |
|
||||||
|
(common::OBSW_VERSION_REVISION << 8);
|
||||||
|
uint32_t p2 = 0;
|
||||||
|
if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) {
|
||||||
|
p1 |= 1;
|
||||||
|
auto shaAsStr = std::string(common::OBSW_VERSION_CST_GIT_SHA1);
|
||||||
|
size_t posDash = shaAsStr.find("-");
|
||||||
|
auto gitHash = shaAsStr.substr(posDash + 2, 4);
|
||||||
|
// Only copy first 4 letters of git hash
|
||||||
|
memcpy(&p2, gitHash.c_str(), 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
triggerEvent(VERSION_INFO, p1, p2);
|
||||||
|
if (mappedSysRomAddr != nullptr) {
|
||||||
|
uint32_t p1Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr));
|
||||||
|
uint32_t p2Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr) + 1);
|
||||||
|
triggerEvent(FIRMWARE_INFO, p1Firmware, p2Firmware);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CoreController::announceCurrentImageInfo() {
|
||||||
|
using namespace core;
|
||||||
|
triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
|
||||||
|
}
|
||||||
|
|
||||||
bool CoreController::isNumber(const std::string &s) {
|
bool CoreController::isNumber(const std::string &s) {
|
||||||
return !s.empty() && std::find_if(s.begin(), s.end(),
|
return !s.empty() && std::find_if(s.begin(), s.end(),
|
||||||
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||||
#include <fsfw/parameters/ParameterHelper.h>
|
#include <fsfw/parameters/ParameterHelper.h>
|
||||||
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
||||||
|
#include <fsfw_hal/linux/uio/UioMapper.h>
|
||||||
#include <libxiphos.h>
|
#include <libxiphos.h>
|
||||||
#include <mission/acs/archive/GPSDefinitions.h>
|
#include <mission/acs/archive/GPSDefinitions.h>
|
||||||
#include <mission/utility/trace.h>
|
#include <mission/utility/trace.h>
|
||||||
@ -44,6 +45,61 @@ struct RebootFile {
|
|||||||
xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY;
|
xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class RebootMechanismPacket : public SerialLinkedListAdapter<SerializeIF> {
|
||||||
|
public:
|
||||||
|
RebootMechanismPacket(RebootFile& rf) {
|
||||||
|
enabled = rf.enabled;
|
||||||
|
maxCount = rf.maxCount;
|
||||||
|
img00Count = rf.img00Cnt;
|
||||||
|
img01Count = rf.img01Cnt;
|
||||||
|
img10Count = rf.img10Cnt;
|
||||||
|
img11Count = rf.img11Cnt;
|
||||||
|
img00Lock = rf.img00Lock;
|
||||||
|
img01Lock = rf.img01Lock;
|
||||||
|
img10Lock = rf.img10Lock;
|
||||||
|
img11Lock = rf.img11Lock;
|
||||||
|
lastChip = static_cast<uint8_t>(rf.lastChip);
|
||||||
|
lastCopy = static_cast<uint8_t>(rf.lastCopy);
|
||||||
|
nextChip = static_cast<uint8_t>(rf.mechanismNextChip);
|
||||||
|
nextCopy = static_cast<uint8_t>(rf.mechanismNextCopy);
|
||||||
|
setLinks();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setLinks() {
|
||||||
|
setStart(&enabled);
|
||||||
|
enabled.setNext(&maxCount);
|
||||||
|
maxCount.setNext(&img00Count);
|
||||||
|
img00Count.setNext(&img01Count);
|
||||||
|
img01Count.setNext(&img10Count);
|
||||||
|
img10Count.setNext(&img11Count);
|
||||||
|
img11Count.setNext(&img00Lock);
|
||||||
|
img00Lock.setNext(&img01Lock);
|
||||||
|
img01Lock.setNext(&img10Lock);
|
||||||
|
img10Lock.setNext(&img11Lock);
|
||||||
|
img11Lock.setNext(&lastChip);
|
||||||
|
lastChip.setNext(&lastCopy);
|
||||||
|
lastCopy.setNext(&nextChip);
|
||||||
|
nextChip.setNext(&nextCopy);
|
||||||
|
setLast(&nextCopy);
|
||||||
|
}
|
||||||
|
|
||||||
|
SerializeElement<uint8_t> enabled = false;
|
||||||
|
SerializeElement<uint32_t> maxCount = 0;
|
||||||
|
SerializeElement<uint32_t> img00Count = 0;
|
||||||
|
SerializeElement<uint32_t> img01Count = 0;
|
||||||
|
SerializeElement<uint32_t> img10Count = 0;
|
||||||
|
SerializeElement<uint32_t> img11Count = 0;
|
||||||
|
SerializeElement<uint8_t> img00Lock = false;
|
||||||
|
SerializeElement<uint8_t> img01Lock = false;
|
||||||
|
SerializeElement<uint8_t> img10Lock = false;
|
||||||
|
SerializeElement<uint8_t> img11Lock = false;
|
||||||
|
SerializeElement<uint8_t> lastChip = 0;
|
||||||
|
SerializeElement<uint8_t> lastCopy = 0;
|
||||||
|
SerializeElement<uint8_t> nextChip = 0;
|
||||||
|
SerializeElement<uint8_t> nextCopy = 0;
|
||||||
|
};
|
||||||
|
|
||||||
class CoreController : public ExtendedControllerBase, public ReceivesParameterMessagesIF {
|
class CoreController : public ExtendedControllerBase, public ReceivesParameterMessagesIF {
|
||||||
public:
|
public:
|
||||||
enum ParamId : uint8_t { PREF_SD = 0, NUM_IDS };
|
enum ParamId : uint8_t { PREF_SD = 0, NUM_IDS };
|
||||||
@ -142,6 +198,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
|
|
||||||
static constexpr bool BLOCKING_SD_INIT = false;
|
static constexpr bool BLOCKING_SD_INIT = false;
|
||||||
|
|
||||||
|
uint32_t* mappedSysRomAddr = nullptr;
|
||||||
SdCardManager* sdcMan = nullptr;
|
SdCardManager* sdcMan = nullptr;
|
||||||
MessageQueueIF* eventQueue = nullptr;
|
MessageQueueIF* eventQueue = nullptr;
|
||||||
|
|
||||||
@ -287,6 +344,8 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
bool parseRebootFile(std::string path, RebootFile& file);
|
bool parseRebootFile(std::string path, RebootFile& file);
|
||||||
void rewriteRebootFile(RebootFile file);
|
void rewriteRebootFile(RebootFile file);
|
||||||
void announceBootCounts();
|
void announceBootCounts();
|
||||||
|
void announceVersionInfo();
|
||||||
|
void announceCurrentImageInfo();
|
||||||
void readHkData();
|
void readHkData();
|
||||||
void dirListingDumpHandler();
|
void dirListingDumpHandler();
|
||||||
bool isNumber(const std::string& s);
|
bool isNumber(const std::string& s);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <fsfw/devicehandlers/HealthDevice.h>
|
#include <fsfw/devicehandlers/HealthDevice.h>
|
||||||
#include <fsfw/subsystem/Subsystem.h>
|
#include <fsfw/subsystem/Subsystem.h>
|
||||||
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
#include <linux/acs/AcsBoardPolling.h>
|
#include <linux/acs/AcsBoardPolling.h>
|
||||||
#include <linux/acs/GpsHyperionLinuxController.h>
|
#include <linux/acs/GpsHyperionLinuxController.h>
|
||||||
#include <linux/acs/ImtqPollingTask.h>
|
#include <linux/acs/ImtqPollingTask.h>
|
||||||
@ -505,7 +506,7 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
|||||||
debugGps = true;
|
debugGps = true;
|
||||||
#endif
|
#endif
|
||||||
RESET_ARGS_GNSS.gpioComIF = gpioComIF;
|
RESET_ARGS_GNSS.gpioComIF = gpioComIF;
|
||||||
RESET_ARGS_GNSS.waitPeriodMs = 100;
|
RESET_ARGS_GNSS.waitPeriodMs = 5;
|
||||||
auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT,
|
auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT,
|
||||||
enableHkSets, debugGps);
|
enableHkSets, debugGps);
|
||||||
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
||||||
@ -730,20 +731,12 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
|||||||
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
||||||
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
||||||
GpiodRegularByLineName* gpio = nullptr;
|
GpiodRegularByLineName* gpio = nullptr;
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC0, "PAPB VC0");
|
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_BUSY, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC0, "PAPB VC0");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC0, "PAPB VC0");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC1, "PAPB VC1");
|
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_BUSY, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC1, "PAPB VC1");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC1, "PAPB VC1");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC2, "PAPB VC2");
|
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_BUSY, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC2, "PAPB VC2");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC2, "PAPB VC2");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC3, "PAPB VC3");
|
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_BUSY, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
||||||
@ -752,17 +745,13 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
|||||||
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
||||||
|
|
||||||
// Creating virtual channel interfaces
|
// Creating virtual channel interfaces
|
||||||
VirtualChannelIF* vc0 =
|
VirtualChannelIF* vc0 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_BUSY, gpioIds::VC0_PAPB_EMPTY,
|
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC0);
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC0);
|
||||||
VirtualChannelIF* vc1 =
|
VirtualChannelIF* vc1 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_BUSY, gpioIds::VC1_PAPB_EMPTY,
|
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
|
||||||
VirtualChannelIF* vc2 =
|
VirtualChannelIF* vc2 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_BUSY, gpioIds::VC2_PAPB_EMPTY,
|
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
|
||||||
VirtualChannelIF* vc3 =
|
VirtualChannelIF* vc3 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_BUSY, gpioIds::VC3_PAPB_EMPTY,
|
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
|
||||||
// Creating ptme object and adding virtual channel interfaces
|
// Creating ptme object and adding virtual channel interfaces
|
||||||
Ptme* ptme = new Ptme(objects::PTME);
|
Ptme* ptme = new Ptme(objects::PTME);
|
||||||
@ -1025,3 +1014,19 @@ void ObjectFactory::createRadSensorChipSelect(LinuxLibgpioIF* gpioIF) {
|
|||||||
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
||||||
gpioChecker(gpioIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
gpioChecker(gpioIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
|
||||||
|
using namespace gpio;
|
||||||
|
if (gpioIF == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
GpioCookie* gpioI2cResetnCookie = new GpioCookie;
|
||||||
|
GpiodRegularByLineName* gpioI2cResetn = new GpiodRegularByLineName(
|
||||||
|
q7s::gpioNames::PL_I2C_ARESETN, "PL_I2C_ARESETN", Direction::OUT, Levels::HIGH);
|
||||||
|
gpioI2cResetnCookie->addGpio(gpioIds::PL_I2C_ARESETN, gpioI2cResetn);
|
||||||
|
gpioChecker(gpioIF->addGpios(gpioI2cResetnCookie), "PL I2C ARESETN");
|
||||||
|
// Reset I2C explicitely again.
|
||||||
|
gpioIF->pullLow(gpioIds::PL_I2C_ARESETN);
|
||||||
|
TaskFactory::delayTask(1);
|
||||||
|
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
|
||||||
|
}
|
||||||
|
@ -78,6 +78,7 @@ ReturnValue_t createCcsdsComponents(CcsdsComponentArgs& args);
|
|||||||
void createMiscComponents();
|
void createMiscComponents();
|
||||||
|
|
||||||
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
||||||
|
void createPlI2cResetGpio(LinuxLibgpioIF* gpioComIF);
|
||||||
|
|
||||||
void testAcsBrdAss(AcsBoardAssembly* assAss);
|
void testAcsBrdAss(AcsBoardAssembly* assAss);
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||||
|
createPlI2cResetGpio(gpioComIF);
|
||||||
|
|
||||||
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
||||||
// level components.
|
// level components.
|
||||||
@ -83,21 +84,6 @@ void ObjectFactory::produce(void* args) {
|
|||||||
|
|
||||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||||
|
|
||||||
// Regular FM code, does not work for EM if the hardware is not connected
|
|
||||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
|
||||||
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
|
||||||
// createSyrlinksComponents(pwrSwitcher);
|
|
||||||
// createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
|
||||||
// createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
|
||||||
// createTmpComponents();
|
|
||||||
// createSolarArrayDeploymentComponents();
|
|
||||||
// createPayloadComponents(gpioComIF);
|
|
||||||
// createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
|
||||||
|
|
||||||
// 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
|
|
||||||
// createRadSensorComponent(gpioComIF);
|
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
// Still initialize chip select to avoid SPI bus issues.
|
// Still initialize chip select to avoid SPI bus issues.
|
||||||
createRadSensorChipSelect(gpioComIF);
|
createRadSensorChipSelect(gpioComIF);
|
||||||
|
@ -45,6 +45,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||||
|
createPlI2cResetGpio(gpioComIF);
|
||||||
|
|
||||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||||
createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets);
|
createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets);
|
||||||
|
@ -77,6 +77,8 @@ enum gpioId_t {
|
|||||||
CS_RAD_SENSOR,
|
CS_RAD_SENSOR,
|
||||||
ENABLE_RADFET,
|
ENABLE_RADFET,
|
||||||
|
|
||||||
|
PL_I2C_ARESETN,
|
||||||
|
|
||||||
PAPB_BUSY_N,
|
PAPB_BUSY_N,
|
||||||
PAPB_EMPTY,
|
PAPB_EMPTY,
|
||||||
|
|
||||||
@ -93,15 +95,10 @@ enum gpioId_t {
|
|||||||
EN_RW_CS,
|
EN_RW_CS,
|
||||||
|
|
||||||
SPI_MUX,
|
SPI_MUX,
|
||||||
|
|
||||||
VC0_PAPB_EMPTY,
|
VC0_PAPB_EMPTY,
|
||||||
VC0_PAPB_BUSY,
|
|
||||||
VC1_PAPB_EMPTY,
|
VC1_PAPB_EMPTY,
|
||||||
VC1_PAPB_BUSY,
|
|
||||||
VC2_PAPB_EMPTY,
|
VC2_PAPB_EMPTY,
|
||||||
VC2_PAPB_BUSY,
|
|
||||||
VC3_PAPB_EMPTY,
|
VC3_PAPB_EMPTY,
|
||||||
VC3_PAPB_BUSY,
|
|
||||||
PTME_RESETN,
|
PTME_RESETN,
|
||||||
|
|
||||||
PDEC_RESET,
|
PDEC_RESET,
|
||||||
|
@ -5,14 +5,19 @@
|
|||||||
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
||||||
power::Switch_t pwrSwitcher, bool enableHkSets)
|
power::Switch_t pwrSwitcher, bool enableHkSets)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie),
|
: DeviceHandlerBase(objectId, comif, comCookie),
|
||||||
setNoTorque(this),
|
|
||||||
setWithTorque(this),
|
|
||||||
enableHkSets(enableHkSets),
|
enableHkSets(enableHkSets),
|
||||||
|
statusSet(this),
|
||||||
|
dipoleSet(*this),
|
||||||
|
rawMtmNoTorque(this),
|
||||||
|
hkDatasetNoTorque(this),
|
||||||
|
rawMtmWithTorque(this),
|
||||||
|
hkDatasetWithTorque(this),
|
||||||
|
calMtmMeasurementSet(this),
|
||||||
switcher(pwrSwitcher) {}
|
switcher(pwrSwitcher) {}
|
||||||
|
|
||||||
ImtqDummy::~ImtqDummy() = default;
|
ImtqDummy::~ImtqDummy() = default;
|
||||||
|
|
||||||
void ImtqDummy::doStartUp() { setMode(MODE_NORMAL); }
|
void ImtqDummy::doStartUp() { setMode(MODE_ON); }
|
||||||
|
|
||||||
void ImtqDummy::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
void ImtqDummy::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
||||||
|
|
||||||
@ -79,17 +84,37 @@ ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataP
|
|||||||
localDataPoolMap.emplace(imtq::MCU_TEMPERATURE_WT, new PoolEntry<int16_t>({0}));
|
localDataPoolMap.emplace(imtq::MCU_TEMPERATURE_WT, new PoolEntry<int16_t>({0}));
|
||||||
|
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(setNoTorque.getSid(), enableHkSets, 30.0));
|
subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 30.0));
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(setWithTorque.getSid(), enableHkSets, 30.0));
|
subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 30.0));
|
||||||
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
|
subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0));
|
||||||
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
|
subdp::DiagnosticsHkPeriodicParams(rawMtmWithTorque.getSid(), false, 10.0));
|
||||||
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
|
subdp::DiagnosticsHkPeriodicParams(calMtmMeasurementSet.getSid(), false, 10.0));
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
|
subdp::RegularHkPeriodicParams(statusSet.getSid(), false, 10.0));
|
||||||
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
|
subdp::DiagnosticsHkPeriodicParams(dipoleSet.getSid(), false, 10.0));
|
||||||
return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager);
|
return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase *ImtqDummy::getDataSetHandle(sid_t sid) {
|
LocalPoolDataSetBase *ImtqDummy::getDataSetHandle(sid_t sid) {
|
||||||
if (sid == setNoTorque.getSid()) {
|
if (sid == hkDatasetNoTorque.getSid()) {
|
||||||
return &setNoTorque;
|
return &hkDatasetNoTorque;
|
||||||
} else if (sid == setWithTorque.getSid()) {
|
} else if (sid == dipoleSet.getSid()) {
|
||||||
return &setWithTorque;
|
return &dipoleSet;
|
||||||
|
} else if (sid == statusSet.getSid()) {
|
||||||
|
return &statusSet;
|
||||||
|
} else if (sid == hkDatasetWithTorque.getSid()) {
|
||||||
|
return &hkDatasetWithTorque;
|
||||||
|
} else if (sid == rawMtmWithTorque.getSid()) {
|
||||||
|
return &rawMtmWithTorque;
|
||||||
|
} else if (sid == calMtmMeasurementSet.getSid()) {
|
||||||
|
return &calMtmMeasurementSet;
|
||||||
|
} else if (sid == rawMtmNoTorque.getSid()) {
|
||||||
|
return &rawMtmNoTorque;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,18 @@ class ImtqDummy : public DeviceHandlerBase {
|
|||||||
~ImtqDummy() override;
|
~ImtqDummy() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
|
|
||||||
imtq::HkDatasetNoTorque setNoTorque;
|
|
||||||
imtq::HkDatasetWithTorque setWithTorque;
|
|
||||||
bool enableHkSets;
|
bool enableHkSets;
|
||||||
|
|
||||||
|
imtq::StatusDataset statusSet;
|
||||||
|
imtq::DipoleActuationSet dipoleSet;
|
||||||
|
imtq::RawMtmMeasurementNoTorque rawMtmNoTorque;
|
||||||
|
imtq::HkDatasetNoTorque hkDatasetNoTorque;
|
||||||
|
|
||||||
|
imtq::RawMtmMeasurementWithTorque rawMtmWithTorque;
|
||||||
|
imtq::HkDatasetWithTorque hkDatasetWithTorque;
|
||||||
|
|
||||||
|
imtq::CalibratedMtmMeasurementSet calMtmMeasurementSet;
|
||||||
|
|
||||||
PoolEntry<uint8_t> statusMode = PoolEntry<uint8_t>({0});
|
PoolEntry<uint8_t> statusMode = PoolEntry<uint8_t>({0});
|
||||||
PoolEntry<uint8_t> statusError = PoolEntry<uint8_t>({0});
|
PoolEntry<uint8_t> statusError = PoolEntry<uint8_t>({0});
|
||||||
PoolEntry<uint8_t> statusConfig = PoolEntry<uint8_t>({0});
|
PoolEntry<uint8_t> statusConfig = PoolEntry<uint8_t>({0});
|
||||||
@ -42,6 +49,8 @@ class ImtqDummy : public DeviceHandlerBase {
|
|||||||
|
|
||||||
power::Switch_t switcher = power::NO_SWITCH;
|
power::Switch_t switcher = power::NO_SWITCH;
|
||||||
|
|
||||||
|
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
|
||||||
|
|
||||||
void doStartUp() override;
|
void doStartUp() override;
|
||||||
void doShutDown() override;
|
void doShutDown() override;
|
||||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
@ -3,13 +3,24 @@
|
|||||||
#include <mission/acs/rwHelpers.h>
|
#include <mission/acs/rwHelpers.h>
|
||||||
|
|
||||||
RwDummy::RwDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
RwDummy::RwDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
: DeviceHandlerBase(objectId, comif, comCookie),
|
||||||
|
|
||||||
|
statusSet(this),
|
||||||
|
lastResetStatusSet(this),
|
||||||
|
tmDataset(this),
|
||||||
|
rwSpeedActuationSet(*this) {}
|
||||||
|
|
||||||
RwDummy::~RwDummy() {}
|
RwDummy::~RwDummy() {}
|
||||||
|
|
||||||
void RwDummy::doStartUp() { setMode(MODE_ON); }
|
void RwDummy::doStartUp() {
|
||||||
|
statusSet.setReportingEnabled(true);
|
||||||
|
setMode(MODE_ON);
|
||||||
|
}
|
||||||
|
|
||||||
void RwDummy::doShutDown() { setMode(MODE_OFF); }
|
void RwDummy::doShutDown() {
|
||||||
|
statusSet.setReportingEnabled(false);
|
||||||
|
setMode(MODE_OFF);
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
||||||
|
|
||||||
@ -74,5 +85,11 @@ ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoo
|
|||||||
localDataPoolMap.emplace(rws::SPI_BYTES_READ, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(rws::SPI_BYTES_READ, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||||
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
|
subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 12.0));
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
|
subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0));
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
|
subdp::RegularHkPeriodicParams(lastResetStatusSet.getSid(), false, 30.0));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define DUMMIES_RWDUMMY_H_
|
#define DUMMIES_RWDUMMY_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
#include <mission/acs/rwHelpers.h>
|
||||||
|
|
||||||
class RwDummy : public DeviceHandlerBase {
|
class RwDummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
@ -15,6 +16,11 @@ class RwDummy : public DeviceHandlerBase {
|
|||||||
virtual ~RwDummy();
|
virtual ~RwDummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
rws::StatusSet statusSet;
|
||||||
|
rws::LastResetSatus lastResetStatusSet;
|
||||||
|
rws::TmDataset tmDataset;
|
||||||
|
rws::RwSpeedActuationSet rwSpeedActuationSet;
|
||||||
|
|
||||||
PoolEntry<int32_t> rwSpeed = PoolEntry<int32_t>({0});
|
PoolEntry<int32_t> rwSpeed = PoolEntry<int32_t>({0});
|
||||||
PoolEntry<uint16_t> rampTime = PoolEntry<uint16_t>({10});
|
PoolEntry<uint16_t> rampTime = PoolEntry<uint16_t>({10});
|
||||||
|
|
||||||
|
@ -271,6 +271,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
||||||
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
||||||
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
||||||
|
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||||
|
|
@ -271,6 +271,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
||||||
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
||||||
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
||||||
|
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
|||||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||||
|
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
|||||||
return I2C_REBOOT_STRING;
|
return I2C_REBOOT_STRING;
|
||||||
case (14012):
|
case (14012):
|
||||||
return PDEC_REBOOT_STRING;
|
return PDEC_REBOOT_STRING;
|
||||||
|
case (14013):
|
||||||
|
return FIRMWARE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14101):
|
case (14101):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 175 translations.
|
* Contains 175 translations.
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
|||||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||||
|
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
|||||||
return I2C_REBOOT_STRING;
|
return I2C_REBOOT_STRING;
|
||||||
case (14012):
|
case (14012):
|
||||||
return PDEC_REBOOT_STRING;
|
return PDEC_REBOOT_STRING;
|
||||||
|
case (14013):
|
||||||
|
return FIRMWARE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14101):
|
case (14101):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 175 translations.
|
* Contains 175 translations.
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -7,20 +7,16 @@
|
|||||||
|
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbBusyId,
|
PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId,
|
||||||
gpioId_t papbEmptyId, std::string uioFile, int mapNum)
|
std::string uioFile, int mapNum)
|
||||||
: gpioComIF(gpioComIF),
|
: gpioComIF(gpioComIF), papbEmptyId(papbEmptyId), uioFile(std::move(uioFile)), mapNum(mapNum) {}
|
||||||
papbBusyId(papbBusyId),
|
|
||||||
papbEmptyId(papbEmptyId),
|
|
||||||
uioFile(std::move(uioFile)),
|
|
||||||
mapNum(mapNum) {}
|
|
||||||
|
|
||||||
PapbVcInterface::~PapbVcInterface() {}
|
PapbVcInterface::~PapbVcInterface() {}
|
||||||
|
|
||||||
ReturnValue_t PapbVcInterface::initialize() {
|
ReturnValue_t PapbVcInterface::initialize() {
|
||||||
UioMapper uioMapper(uioFile, mapNum);
|
UioMapper uioMapper(uioFile, mapNum);
|
||||||
ReturnValue_t result = uioMapper.getMappedAdress(const_cast<uint32_t**>(&vcBaseReg),
|
ReturnValue_t result = uioMapper.getMappedAdress(const_cast<uint32_t**>(&vcBaseReg),
|
||||||
UioMapper::Permissions::WRITE_ONLY);
|
UioMapper::Permissions::READ_WRITE);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -32,63 +28,16 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
|
|||||||
if (size < 4) {
|
if (size < 4) {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (pollInterfaceReadiness(0, true) == returnvalue::OK) {
|
if (pollReadyForPacket()) {
|
||||||
startPacketTransfer(ByteWidthCfg::ONE);
|
startPacketTransfer(ByteWidthCfg::ONE);
|
||||||
} else {
|
} else {
|
||||||
return DirectTmSinkIF::IS_BUSY;
|
return DirectTmSinkIF::IS_BUSY;
|
||||||
}
|
}
|
||||||
// TODO: This should work but does not.. :(
|
|
||||||
// size_t idx = 0;
|
|
||||||
// while (idx < size) {
|
|
||||||
//
|
|
||||||
// nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
|
||||||
// if ((size - idx) < 4) {
|
|
||||||
// *vcBaseReg = CONFIG_DATA_INPUT | (size - idx - 1);
|
|
||||||
// usleep(1);
|
|
||||||
// }
|
|
||||||
// if (pollPapbBusySignal(2) == returnvalue::OK) {
|
|
||||||
// // vcBaseReg + DATA_REG_OFFSET + 3 = static_cast<uint8_t>(data + idx);
|
|
||||||
// // vcBaseReg + DATA_REG_OFFSET + 2 = static_cast<uint8_t>(data + idx + 1);
|
|
||||||
// // vcBaseReg + DATA_REG_OFFSET + 1 = static_cast<uint8_t>(data + idx + 2);
|
|
||||||
// // vcBaseReg + DATA_REG_OFFSET = static_cast<uint8_t>(data + idx + 3);
|
|
||||||
//
|
|
||||||
// // std::memcpy((vcBaseReg + DATA_REG_OFFSET), data + idx , nextWriteSize);
|
|
||||||
// *(vcBaseReg + DATA_REG_OFFSET) = *reinterpret_cast<const uint32_t*>(data + idx);
|
|
||||||
// //uint8_t* byteReg = reinterpret_cast<uint8_t*>(vcBaseReg + DATA_REG_OFFSET);
|
|
||||||
//
|
|
||||||
// //byteReg[0] = data[idx];
|
|
||||||
// //byteReg[1] = data[idx];
|
|
||||||
// } else {
|
|
||||||
// abortPacketTransfer();
|
|
||||||
// return returnvalue::FAILED;
|
|
||||||
// }
|
|
||||||
// // TODO: Change this after the bugfix. Right now, the PAPB ignores the content of the byte
|
|
||||||
// // width configuration.5
|
|
||||||
// // It's okay to increment by a larger amount for the last segment here, loop will be over
|
|
||||||
// // in any case.
|
|
||||||
// idx += 4;
|
|
||||||
// }
|
|
||||||
for (size_t idx = 0; idx < size; idx++) {
|
for (size_t idx = 0; idx < size; idx++) {
|
||||||
// This delay is super-important, DO NOT REMOVE!
|
// if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
||||||
// Polling the GPIO or the config register too often messes up the scheduler.
|
|
||||||
// TODO: Maybe this should not be done like this. It would be better if there was a custom
|
|
||||||
// FPGA module which can accept packets and then takes care of dumping that packet into
|
|
||||||
// the PTME. DMA would be an ideal solution for this.
|
|
||||||
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
|
||||||
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
|
||||||
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
||||||
} else {
|
|
||||||
abortPacketTransfer();
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
|
||||||
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
|
||||||
completePacketTransfer();
|
completePacketTransfer();
|
||||||
} else {
|
|
||||||
abortPacketTransfer();
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,60 +47,33 @@ void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) {
|
|||||||
|
|
||||||
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
||||||
|
|
||||||
ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
|
bool PapbVcInterface::pollReadyForPacket() const {
|
||||||
bool checkReadyState) const {
|
|
||||||
uint32_t busyIdx = 0;
|
|
||||||
nextDelay.tv_nsec = FIRST_DELAY_PAPB_POLLING_NS;
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
|
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
|
||||||
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
||||||
uint32_t reg = *vcBaseReg;
|
uint32_t reg = *vcBaseReg;
|
||||||
bool busy = (reg >> 5) & 0b1;
|
// bool busy = (reg >> 5) & 0b1;
|
||||||
bool ready = (reg >> 6) & 0b1;
|
return (reg >> 6) & 0b1;
|
||||||
if (not busy) {
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
if (checkReadyState and not ready) {
|
|
||||||
return PAPB_BUSY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
busyIdx++;
|
bool PapbVcInterface::isVcInterfaceBufferEmpty() {
|
||||||
if (busyIdx >= maxPollRetries) {
|
|
||||||
return PAPB_BUSY;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ignore signal handling here for now.
|
|
||||||
nanosleep(&nextDelay, &remDelay);
|
|
||||||
// Adaptive delay.
|
|
||||||
if (nextDelay.tv_nsec * 2 <= MAX_DELAY_PAPB_POLLING_NS) {
|
|
||||||
nextDelay.tv_nsec *= 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PapbVcInterface::isVcInterfaceBufferEmpty() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
gpio::Levels papbEmptyState = gpio::Levels::HIGH;
|
gpio::Levels papbEmptyState = gpio::Levels::HIGH;
|
||||||
|
|
||||||
result = gpioComIF->readGpio(papbEmptyId, papbEmptyState);
|
result = gpioComIF->readGpio(papbEmptyId, papbEmptyState);
|
||||||
|
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
|
sif::error << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (papbEmptyState == gpio::Levels::HIGH) {
|
if (papbEmptyState == gpio::Levels::HIGH) {
|
||||||
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is empty" << std::endl;
|
return true;
|
||||||
} else {
|
|
||||||
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is not empty" << std::endl;
|
|
||||||
}
|
}
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PapbVcInterface::isBusy() const { return pollInterfaceReadiness(0, true) == PAPB_BUSY; }
|
bool PapbVcInterface::isBusy() const { return not pollReadyForPacket(); }
|
||||||
|
|
||||||
void PapbVcInterface::cancelTransfer() { abortPacketTransfer(); }
|
void PapbVcInterface::cancelTransfer() { abortPacketTransfer(); }
|
||||||
|
|
||||||
|
@ -30,8 +30,7 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
* @param uioFile UIO file providing access to the PAPB bus
|
* @param uioFile UIO file providing access to the PAPB bus
|
||||||
* @param mapNum Map number of UIO map associated with this virtual channel
|
* @param mapNum Map number of UIO map associated with this virtual channel
|
||||||
*/
|
*/
|
||||||
PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbBusyId, gpioId_t papbEmptyId,
|
PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId, std::string uioFile, int mapNum);
|
||||||
std::string uioFile, int mapNum);
|
|
||||||
virtual ~PapbVcInterface();
|
virtual ~PapbVcInterface();
|
||||||
|
|
||||||
bool isBusy() const override;
|
bool isBusy() const override;
|
||||||
@ -83,9 +82,6 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
static constexpr long int MAX_DELAY_PAPB_POLLING_NS = 40;
|
static constexpr long int MAX_DELAY_PAPB_POLLING_NS = 40;
|
||||||
|
|
||||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||||
|
|
||||||
/** Pulled to low when virtual channel not ready to receive data */
|
|
||||||
gpioId_t papbBusyId = gpio::NO_GPIO;
|
|
||||||
/** High when external buffer memory of virtual channel is empty */
|
/** High when external buffer memory of virtual channel is empty */
|
||||||
gpioId_t papbEmptyId = gpio::NO_GPIO;
|
gpioId_t papbEmptyId = gpio::NO_GPIO;
|
||||||
|
|
||||||
@ -120,13 +116,13 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
*
|
*
|
||||||
* @return returnvalue::OK when ready to receive data else PAPB_BUSY.
|
* @return returnvalue::OK when ready to receive data else PAPB_BUSY.
|
||||||
*/
|
*/
|
||||||
inline ReturnValue_t pollInterfaceReadiness(uint32_t maxPollRetries, bool checkReadyState) const;
|
inline bool pollReadyForPacket() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function can be used for debugging to check whether there are packets in
|
* @brief This function can be used for debugging to check whether there are packets in
|
||||||
* the packet buffer of the virtual channel or not.
|
* the packet buffer of the virtual channel or not.
|
||||||
*/
|
*/
|
||||||
void isVcInterfaceBufferEmpty();
|
bool isVcInterfaceBufferEmpty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)
|
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)
|
||||||
|
@ -30,6 +30,7 @@ void SusHandler::doStartUp() {
|
|||||||
void SusHandler::doShutDown() {
|
void SusHandler::doShutDown() {
|
||||||
if (internalState != InternalState::SHUTDOWN) {
|
if (internalState != InternalState::SHUTDOWN) {
|
||||||
PoolReadGuard pg(&dataset);
|
PoolReadGuard pg(&dataset);
|
||||||
|
dataset.tempC = thermal::INVALID_TEMPERATURE;
|
||||||
dataset.setValidity(false, true);
|
dataset.setValidity(false, true);
|
||||||
internalState = InternalState::SHUTDOWN;
|
internalState = InternalState::SHUTDOWN;
|
||||||
commandExecuted = false;
|
commandExecuted = false;
|
||||||
|
@ -18,6 +18,7 @@ extern "C" {
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "eive/definitions.h"
|
#include "eive/definitions.h"
|
||||||
|
#include "fsfw/thermal/tcsDefinitions.h"
|
||||||
|
|
||||||
std::atomic_bool JCFG_DONE(false);
|
std::atomic_bool JCFG_DONE(false);
|
||||||
|
|
||||||
@ -111,6 +112,9 @@ void StarTrackerHandler::doShutDown() {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&temperatureSet);
|
PoolReadGuard pg(&temperatureSet);
|
||||||
|
temperatureSet.fpgaTemperature = thermal::INVALID_TEMPERATURE;
|
||||||
|
temperatureSet.cmosTemperature = thermal::INVALID_TEMPERATURE;
|
||||||
|
temperatureSet.mcuTemperature = thermal::INVALID_TEMPERATURE;
|
||||||
temperatureSet.setValidity(false, true);
|
temperatureSet.setValidity(false, true);
|
||||||
}
|
}
|
||||||
reinitNextSetParam = false;
|
reinitNextSetParam = false;
|
||||||
|
@ -93,7 +93,8 @@ ReturnValue_t CfdpHandler::handleCfdpPacket(TmTcMessage& msg) {
|
|||||||
return INVALID_PDU_FORMAT;
|
return INVALID_PDU_FORMAT;
|
||||||
}
|
}
|
||||||
if (not FileDirectiveReader::checkFileDirective(pduDataField[0])) {
|
if (not FileDirectiveReader::checkFileDirective(pduDataField[0])) {
|
||||||
sif::error << "CfdpHandler: Invalid PDU directive field " << pduDataField[0] << std::endl;
|
sif::error << "CfdpHandler: Invalid PDU directive field " << static_cast<int>(pduDataField[0])
|
||||||
|
<< std::endl;
|
||||||
return INVALID_DIRECTIVE_FIELD;
|
return INVALID_DIRECTIVE_FIELD;
|
||||||
}
|
}
|
||||||
auto directive = static_cast<FileDirective>(pduDataField[0]);
|
auto directive = static_cast<FileDirective>(pduDataField[0]);
|
||||||
|
@ -42,13 +42,7 @@ ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) {
|
|||||||
if (not someonesBusy) {
|
if (not someonesBusy) {
|
||||||
TaskFactory::delayTask(100);
|
TaskFactory::delayTask(100);
|
||||||
} else if (vcBusyDuringDump) {
|
} else if (vcBusyDuringDump) {
|
||||||
// TODO: Might not be necessary
|
|
||||||
sif::debug << "VC busy, delaying" << std::endl;
|
|
||||||
TaskFactory::delayTask(10);
|
TaskFactory::delayTask(10);
|
||||||
} else {
|
|
||||||
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
|
|
||||||
// Polling the PAPB of the PTME core too often leads to scheuduling issues.
|
|
||||||
TaskFactory::delayTask(2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,7 @@ ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) {
|
|||||||
if (not busy) {
|
if (not busy) {
|
||||||
TaskFactory::delayTask(100);
|
TaskFactory::delayTask(100);
|
||||||
} else if (dumpContext.vcBusyDuringDump) {
|
} else if (dumpContext.vcBusyDuringDump) {
|
||||||
sif::debug << "VC busy, delaying" << std::endl;
|
|
||||||
// TODO: Might not be necessary
|
|
||||||
TaskFactory::delayTask(10);
|
TaskFactory::delayTask(10);
|
||||||
} else {
|
|
||||||
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
|
|
||||||
// Polling the PAPB of the PTME core too often leads to scheuduling issues.
|
|
||||||
TaskFactory::delayTask(2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
|
|||||||
}
|
}
|
||||||
coreHk.battMode = newBattMode;
|
coreHk.battMode = newBattMode;
|
||||||
|
|
||||||
auxHk.heaterOn = *(packet + 0x57);
|
auxHk.heaterForBp4PackOn = *(packet + 0x57);
|
||||||
auxHk.converter5VStatus = *(packet + 0x58);
|
auxHk.converter5VStatus = *(packet + 0x58);
|
||||||
|
|
||||||
for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) {
|
for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) {
|
||||||
@ -111,6 +111,8 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
|
|||||||
}
|
}
|
||||||
coreHk.setValidity(true, true);
|
coreHk.setValidity(true, true);
|
||||||
auxHk.setValidity(true, true);
|
auxHk.setValidity(true, true);
|
||||||
|
// No BP4 pack, no this is always invalid.
|
||||||
|
auxHk.heaterForBp4PackOn.setValid(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
@ -260,7 +260,8 @@ class HkTableDataset : public StaticLocalDataSet<32> {
|
|||||||
lp_var_t<uint16_t> resetcause = lp_var_t<uint16_t>(sid.objectId, pool::P60DOCK_RESETCAUSE, this);
|
lp_var_t<uint16_t> resetcause = lp_var_t<uint16_t>(sid.objectId, pool::P60DOCK_RESETCAUSE, this);
|
||||||
|
|
||||||
/** Battery heater control only possible on BP4 packs */
|
/** Battery heater control only possible on BP4 packs */
|
||||||
lp_var_t<uint8_t> heaterOn = lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_HEATER_ON, this);
|
lp_var_t<uint8_t> heaterForBp4PackOn =
|
||||||
|
lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_HEATER_ON, this);
|
||||||
lp_var_t<uint8_t> converter5VStatus =
|
lp_var_t<uint8_t> converter5VStatus =
|
||||||
lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_CONV_5V_ENABLE_STATUS, this);
|
lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_CONV_5V_ENABLE_STATUS, this);
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
|||||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
||||||
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
||||||
|
|
||||||
|
static constexpr uint32_t SYS_ROM_BASE_ADDR = 0x80000000;
|
||||||
|
|
||||||
static constexpr ActionId_t ANNOUNCE_VERSION = 1;
|
static constexpr ActionId_t ANNOUNCE_VERSION = 1;
|
||||||
static constexpr ActionId_t ANNOUNCE_CURRENT_IMAGE = 2;
|
static constexpr ActionId_t ANNOUNCE_CURRENT_IMAGE = 2;
|
||||||
static constexpr ActionId_t ANNOUNCE_BOOT_COUNTS = 3;
|
static constexpr ActionId_t ANNOUNCE_BOOT_COUNTS = 3;
|
||||||
@ -51,6 +53,7 @@ static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
|
|||||||
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
|
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
|
||||||
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
|
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
|
||||||
static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8;
|
static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8;
|
||||||
|
static constexpr ActionId_t READ_REBOOT_MECHANISM_INFO = 9;
|
||||||
|
|
||||||
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_0 = 10;
|
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_0 = 10;
|
||||||
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_1 = 11;
|
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_1 = 11;
|
||||||
@ -113,6 +116,10 @@ static constexpr Event TRYING_I2C_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 10,
|
|||||||
static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
|
static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
|
||||||
//! [EXPORT] : [COMMENT] PDEC recovery through reset was not possible, performing full reboot.
|
//! [EXPORT] : [COMMENT] PDEC recovery through reset was not possible, performing full reboot.
|
||||||
static constexpr Event PDEC_REBOOT = event::makeEvent(SUBSYSTEM_ID, 12, severity::HIGH);
|
static constexpr Event PDEC_REBOOT = event::makeEvent(SUBSYSTEM_ID, 12, severity::HIGH);
|
||||||
|
//! [EXPORT] : [COMMENT] Version information of the firmware (not OBSW).
|
||||||
|
//! P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash
|
||||||
|
//! P2: First four letters of Git SHA is the last byte of P1 is set.
|
||||||
|
static constexpr Event FIRMWARE_INFO = event::makeEvent(SUBSYSTEM_ID, 13, severity::INFO);
|
||||||
|
|
||||||
class ListDirectoryCmdBase {
|
class ListDirectoryCmdBase {
|
||||||
public: // TODO: Packet definition for clean deserialization
|
public: // TODO: Packet definition for clean deserialization
|
||||||
@ -242,19 +249,22 @@ class CpHelperParser {
|
|||||||
CpHelperParser(const uint8_t* data, size_t maxLen) : data(data), maxLen(maxLen) {}
|
CpHelperParser(const uint8_t* data, size_t maxLen) : data(data), maxLen(maxLen) {}
|
||||||
|
|
||||||
ReturnValue_t parse() {
|
ReturnValue_t parse() {
|
||||||
if (maxLen < 1) {
|
if (maxLen < 2) {
|
||||||
return SerializeIF::STREAM_TOO_SHORT;
|
return SerializeIF::STREAM_TOO_SHORT;
|
||||||
}
|
}
|
||||||
recursiveOpt = data[0];
|
recursiveOpt = data[0];
|
||||||
return parseDestTargetString(data + 1, maxLen - 1, destTgt);
|
forceOpt = data[1];
|
||||||
|
return parseDestTargetString(data + 2, maxLen - 2, destTgt);
|
||||||
}
|
}
|
||||||
const SourceTargetPair& destTgtPair() const { return destTgt; }
|
const SourceTargetPair& destTgtPair() const { return destTgt; }
|
||||||
bool isRecursiveOptSet() const { return recursiveOpt; }
|
bool isRecursiveOptSet() const { return recursiveOpt; }
|
||||||
|
bool isForceOptSet() const { return forceOpt; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const uint8_t* data;
|
const uint8_t* data;
|
||||||
size_t maxLen;
|
size_t maxLen;
|
||||||
bool recursiveOpt = false;
|
bool recursiveOpt = false;
|
||||||
|
bool forceOpt = false;
|
||||||
SourceTargetPair destTgt;
|
SourceTargetPair destTgt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@ void Max31865EiveHandler::doShutDown() {
|
|||||||
transitionOk = false;
|
transitionOk = false;
|
||||||
}
|
}
|
||||||
if (state == InternalState::INACTIVE and transitionOk) {
|
if (state == InternalState::INACTIVE and transitionOk) {
|
||||||
|
sensorDataset.temperatureCelcius = thermal::INVALID_TEMPERATURE;
|
||||||
|
sensorDataset.setValidity(false, true);
|
||||||
updatePeriodicReply(false, EiveMax31855::RtdCommands::EXCHANGE_SET_ID);
|
updatePeriodicReply(false, EiveMax31855::RtdCommands::EXCHANGE_SET_ID);
|
||||||
setMode(MODE_OFF);
|
setMode(MODE_OFF);
|
||||||
}
|
}
|
||||||
|
@ -11,9 +11,7 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
|
|||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||||
const auto& dest = destinations[idx];
|
const auto& dest = destinations[idx];
|
||||||
bool setOrigStoreId = false;
|
if ((destinations.size() > 1) and (idx < (destinations.size() - 1))) {
|
||||||
if (destinations.size() > 1) {
|
|
||||||
if (idx < destinations.size() - 1) {
|
|
||||||
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
||||||
// to bother with send order and where the data is deleted.
|
// to bother with send order and where the data is deleted.
|
||||||
store_address_t storeId;
|
store_address_t storeId;
|
||||||
@ -22,17 +20,10 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
|
|||||||
message.setStorageId(storeId);
|
message.setStorageId(storeId);
|
||||||
} else {
|
} else {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy"
|
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl;
|
||||||
<< std::endl;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setOrigStoreId = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
setOrigStoreId = true;
|
|
||||||
}
|
|
||||||
if (setOrigStoreId) {
|
|
||||||
message.setStorageId(origStoreId);
|
message.setStorageId(origStoreId);
|
||||||
}
|
}
|
||||||
result = ownerQueue.sendMessage(dest.queueId, &message);
|
result = ownerQueue.sendMessage(dest.queueId, &message);
|
||||||
|
2
tmtc
2
tmtc
Submodule tmtc updated: 5f44cb96be...c9f4a8070d
Reference in New Issue
Block a user