one small additional precaution

This commit is contained in:
Ulrich Mohr 2022-09-01 11:56:07 +02:00
parent 64a7fde301
commit 2b01e86f9c
4 changed files with 21 additions and 1 deletions

View File

@ -575,11 +575,13 @@ inline ReturnValue_t Service11TelecommandScheduling<MAX_NUM_TCS>::getMapFilterFr
return INVALID_TIME_WINDOW;
}
itBegin = telecommandMap.begin();
itEnd = telecommandMap.begin();
while (itBegin->first < fromTimestamp && itBegin != telecommandMap.end()) {
itBegin++;
}
//start looking for end beginning at begin
itEnd = itBegin;
while (itEnd->first <= toTimestamp && itEnd != telecommandMap.end()) {
itEnd++;
}

View File

@ -18,6 +18,7 @@ add_subdirectory(power)
add_subdirectory(util)
add_subdirectory(container)
add_subdirectory(osal)
add_subdirectory(pus)
add_subdirectory(serialize)
add_subdirectory(datapoollocal)
add_subdirectory(storagemanager)

View File

@ -0,0 +1,3 @@
target_sources(${FSFW_TEST_TGT} PRIVATE
testService11.cpp
)

View File

@ -0,0 +1,14 @@
#include <fsfw/pus/Service11TelecommandScheduling.h>
#include <catch2/catch_test_macros.hpp>
#include "objects/systemObjectList.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
TEST_CASE("PUS Service 11", "[pus-srvc11]") {
Service11TelecommandScheduling<13> pusService11(objects::PUS_SERVICE_11_TC_SCHEDULER,
apid::DEFAULT_APID, pus::PUS_SERVICE_11, nullptr);
// TODO test something...
}