added JSON lib, bugfixes in FileSystemHandler
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
#include <bsp_q7s/memory/SdCardManager.h>
|
||||
#include "Q7STestTask.h"
|
||||
|
||||
#include "fsfw/timemanager/Stopwatch.h"
|
||||
#include "fsfw/tasks/TaskFactory.h"
|
||||
|
||||
#include "bsp_q7s/memory/scratchApi.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
@ -15,6 +17,15 @@ Q7STestTask::Q7STestTask(object_id_t objectId): TestTask(objectId) {
|
||||
ReturnValue_t Q7STestTask::performOneShotAction() {
|
||||
//sdCardTests();
|
||||
testScratchApi();
|
||||
Stopwatch stopwatch;
|
||||
// for convenience
|
||||
using json = nlohmann::json;
|
||||
json helloTest;
|
||||
// add a number that is stored as double (note the implicit conversion of j to an object)
|
||||
helloTest["pi"] = 3.141;
|
||||
std::string mntPrefix = SdCardManager::instance()->getCurrentMountPrefix();
|
||||
std::ofstream o("/mnt/sd0/pretty.json");
|
||||
o << std::setw(4) << helloTest << std::endl;
|
||||
return TestTask::performOneShotAction();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user