REAMDE update
This commit is contained in:
@ -16,17 +16,20 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
|
||||
void Q7STestTask::sdCardTests() {
|
||||
using namespace std;
|
||||
Stopwatch stopwatch;
|
||||
FILE* testFile = popen("q7hw sd info all > /tmp/sd_status.txt", "r");
|
||||
TaskFactory::delayTask(3000);
|
||||
ofstream testFile("/tmp/test.txt");
|
||||
testFile << "Hallo Welt" << endl;
|
||||
testFile.close();
|
||||
//FILE* testFile = popen("q7hw sd info all", "r");
|
||||
//TaskFactory::delayTask(3000);
|
||||
//int result = system();
|
||||
//std::fstream fs(testFile);
|
||||
// Read contents from file
|
||||
char* line = nullptr;
|
||||
size_t len = 0;
|
||||
ssize_t read = getline(&line, &len, testFile);
|
||||
if(read != -1 and line != nullptr) {
|
||||
cout << line << endl;
|
||||
}
|
||||
// char* line = nullptr;
|
||||
// size_t len = 0;
|
||||
// ssize_t read = getline(&line, &len, testFile);
|
||||
// if(read != -1 and line != nullptr) {
|
||||
// cout << line << endl;
|
||||
// }
|
||||
// c = fgetc(testFile);
|
||||
// while (c != EOF)
|
||||
// {
|
||||
|
Reference in New Issue
Block a user