added some test, initial tick counter higher now
This commit is contained in:
parent
6501c16fd7
commit
b2e4438811
@ -16,6 +16,9 @@ void PeriodicHousekeepingHelper::initialize(float collectionInterval,
|
||||
nonDiagIntervalFactor;
|
||||
}
|
||||
collectionIntervalTicks = intervalSecondsToInterval(collectionInterval);
|
||||
/* This will cause a checkOpNecessary call to be true immediately. I think it's okay
|
||||
if a HK packet is generated immediately instead of waiting one generation cycle. */
|
||||
internalTickCounter = collectionIntervalTicks;
|
||||
}
|
||||
|
||||
float PeriodicHousekeepingHelper::getCollectionIntervalInSeconds() {
|
||||
|
@ -80,6 +80,13 @@ TEST_CASE("DataSetTest" , "[DataSetTest]") {
|
||||
localSet.localPoolVarUint8 = 0;
|
||||
localSet.localPoolVarFloat = 0;
|
||||
|
||||
localSet.setAllVariablesReadOnly();
|
||||
CHECK(localSet.localPoolUint16Vec.getReadWriteMode() == pool_rwm_t::VAR_READ);
|
||||
CHECK(localSet.localPoolVarUint8.getReadWriteMode() == pool_rwm_t::VAR_READ);
|
||||
CHECK(localSet.localPoolVarFloat.getReadWriteMode() == pool_rwm_t::VAR_READ);
|
||||
/* For code coverage */
|
||||
localSet.initializePeriodicHelper(0.0, 0.4, false);
|
||||
|
||||
{
|
||||
/* Now we read again and check whether our zeroed values were overwritten with
|
||||
the values in the pool */
|
||||
|
Loading…
Reference in New Issue
Block a user