Merge pull request 'v3.2.0-dev for release' (#695) from v3.2.0-dev into main
All checks were successful
EIVE/eive-obsw/pipeline/pr-v2.0.5-branch This commit looks good

Reviewed-on: #695
This commit is contained in:
Robin Müller 2023-06-21 13:45:54 +02:00
commit 6fa53e1869
7 changed files with 47 additions and 22 deletions

View File

@ -18,7 +18,7 @@ will consitute of a breaking change warranting a new major release:
# [v4.0.0] to be released
# [v3.1.2] 2023-06-20
# [v3.2.0] 2023-06-21
## Fixed
@ -26,6 +26,10 @@ will consitute of a breaking change warranting a new major release:
- SUS total vector was not reset to being a zero vector during eclipse due to a wrong memcpy
length.
## Changed
- Reverted all changes related to VC0 handling to avoid FM bug possibly related to FPGA bug.
# [v3.1.1] 2023-06-14
## Fixed

View File

@ -10,8 +10,8 @@
cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 3)
set(OBSW_VERSION_MINOR 1)
set(OBSW_VERSION_REVISION 1)
set(OBSW_VERSION_MINOR 2)
set(OBSW_VERSION_REVISION 0)
# set(CMAKE_VERBOSE TRUE)
@ -81,10 +81,14 @@ else()
endif()
set(OBSW_ADD_TMTC_TCP_SERVER
${OBSW_Q7S_EM}
# TODO: Only activate on EM when VC0 issue has been resolved.
# ${OBSW_Q7S_EM}
1
CACHE STRING "Add TCP TMTC Server")
set(OBSW_ADD_TMTC_UDP_SERVER
0
# TODO: Disable completely when VC0 issue has been resolved
# 0
${INIT_VAL}
CACHE STRING "Add UDP TMTC Server")
set(OBSW_ADD_MGT
${INIT_VAL}

View File

@ -70,9 +70,6 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_ACS_BOARD == 1
dummyCfg.addAcsBoardDummies = false;
#endif
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
dummyCfg.addBpxBattDummy = false;
#endif
PowerSwitchIF* pwrSwitcher = nullptr;
#if OBSW_ADD_GOMSPACE_PCDU == 0

View File

@ -97,7 +97,8 @@ void ObjectFactory::produce(void* args) {
#if OBSW_TM_TO_PTME == 1
if (ccsdsArgs.liveDestination != nullptr) {
pusFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
cfdpFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
// Deactivated for tests to avoid changes to VC0 usage.
// cfdpFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
}
#endif
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */

2
fsfw

@ -1 +1 @@
Subproject commit 268c2e87c9948af1382e56763c84f19acef76bd7
Subproject commit 0f76cdb3ba54f5e90a8eee4316c49cf0f581f996

View File

@ -94,6 +94,13 @@ void TmStoreTaskBase::cancelDump(DumpContext& ctx, PersistentTmStore& store, boo
ReturnValue_t TmStoreTaskBase::handleOneDump(PersistentTmStoreWithTmQueue& store,
DumpContext& dumpContext, bool& dumpPerformed) {
ReturnValue_t result = returnvalue::OK;
// The PTME might have been reset an transmitter state change, so there is no point in continuing
// the dump.
// TODO: Will be solved in a cleaner way, this is kind of a hack.
if (not channel.isTxOn()) {
cancelDump(dumpContext, store, false);
return returnvalue::FAILED;
}
// It is assumed that the PTME will only be locked for a short period (e.g. to change datarate).
if (not channel.isBusy() and not ptmeLocked) {
performDump(store, dumpContext, dumpPerformed);
@ -131,22 +138,25 @@ ReturnValue_t TmStoreTaskBase::performDump(PersistentTmStoreWithTmQueue& store,
dumpContext.ptmeBusyCounter = 0;
tmSinkBusyCd.resetTimer();
ReturnValue_t result = store.getNextDumpPacket(tmReader, fileHasSwapped);
if (fileHasSwapped and result == PersistentTmStore::DUMP_DONE) {
if (result != returnvalue::OK) {
sif::error << "PersistentTmStore: Getting next dump packet failed" << std::endl;
} else if (fileHasSwapped or result == PersistentTmStore::DUMP_DONE) {
// This can happen if a file is corrupted and the next file swap completes the dump.
dumpDoneHandler();
return returnvalue::OK;
} else if (result != returnvalue::OK) {
sif::error << "PersistentTmStore: Getting next dump packet failed" << std::endl;
return result;
}
dumpedLen = tmReader.getFullPacketLen();
result = channel.write(tmReader.getFullData(), dumpedLen);
if (result == DirectTmSinkIF::IS_BUSY) {
sif::warning << "PersistentTmStore: Unexpected VC channel busy" << std::endl;
} else if (result != returnvalue::OK) {
sif::warning << "PersistentTmStore: Unexpected VC channel write failure" << std::endl;
// Only write to VC if mode is on, but always confirm the dump.
// If the mode is OFF, it is assumed the PTME is not usable and is not allowed to be written
// (e.g. to confirm a reset or the transmitter is off anyway).
if (mode == MODE_ON) {
result = channel.write(tmReader.getFullData(), dumpedLen);
if (result == DirectTmSinkIF::IS_BUSY) {
sif::warning << "PersistentTmStore: Unexpected VC channel busy" << std::endl;
} else if (result != returnvalue::OK) {
sif::warning << "PersistentTmStore: Unexpected VC channel write failure" << std::endl;
}
}
result = store.confirmDump(tmReader, fileHasSwapped);
if ((result == PersistentTmStore::DUMP_DONE or result == returnvalue::OK)) {
dumpPerformed = true;

View File

@ -11,14 +11,23 @@ ReturnValue_t VirtualChannel::sendNextTm(const uint8_t* data, size_t size) {
}
ReturnValue_t VirtualChannel::write(const uint8_t* data, size_t size) {
return ptme.writeToVc(vcId, data, size);
if (txOn) {
return ptme.writeToVc(vcId, data, size);
}
return returnvalue::OK;
}
uint8_t VirtualChannel::getVcid() const { return vcId; }
const char* VirtualChannel::getName() const { return vcName.c_str(); }
bool VirtualChannel::isBusy() const { return ptme.isBusy(vcId); }
bool VirtualChannel::isBusy() const {
// Data is discarded, so channel is not busy.
if (not txOn) {
return false;
}
return ptme.isBusy(vcId);
}
void VirtualChannel::cancelTransfer() { ptme.cancelTransfer(vcId); }