testing scratch API
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
#include "fsfw/timemanager/Stopwatch.h"
|
||||
#include "fsfw/tasks/TaskFactory.h"
|
||||
|
||||
#include "bsp_q7s/memory/scratchApi.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <cstdio>
|
||||
@ -12,6 +14,7 @@ Q7STestTask::Q7STestTask(object_id_t objectId): TestTask(objectId) {
|
||||
|
||||
ReturnValue_t Q7STestTask::performOneShotAction() {
|
||||
//sdCardTests();
|
||||
testScratchApi();
|
||||
return TestTask::performOneShotAction();
|
||||
}
|
||||
|
||||
@ -50,3 +53,15 @@ void Q7STestTask::fileTests() {
|
||||
system("echo \"Hallo Welt\" > /tmp/test2.txt");
|
||||
system("echo \"Hallo Welt\"");
|
||||
}
|
||||
|
||||
void Q7STestTask::testScratchApi() {
|
||||
ReturnValue_t result = scratch::writeNumber("TEST", 1);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::debug << "Q7STestTask::scratchApiTest: Writing number failed" << std::endl;
|
||||
}
|
||||
int number = 0;
|
||||
result = scratch::readNumber("TEST", number);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user