FSFW Update #28

Merged
jgerhards merged 782 commits from fsfw_update into develop 2023-05-28 23:43:22 +02:00
947 changed files with 17547 additions and 12246 deletions
Showing only changes of commit f2ebaed092 - Show all commits

View File

@@ -32,6 +32,8 @@ ReturnValue_t CommandExecutor::execute() {
} else if (state == States::PENDING) { } else if (state == States::PENDING) {
return COMMAND_PENDING; return COMMAND_PENDING;
} }
// Reset data in read vector
std::memset(readVec.data(), 0, readVec.size());
currentCmdFile = popen(currentCmd.c_str(), "r"); currentCmdFile = popen(currentCmd.c_str(), "r");
if (currentCmdFile == nullptr) { if (currentCmdFile == nullptr) {
lastError = errno; lastError = errno;
@@ -205,3 +207,5 @@ ReturnValue_t CommandExecutor::executeBlocking() {
} }
return returnvalue::OK; return returnvalue::OK;
} }
const std::vector<char>& CommandExecutor::getReadVector() const { return readVec; }

View File

@@ -107,6 +107,8 @@ class CommandExecutor {
*/ */
void reset(); void reset();
const std::vector<char>& getReadVector() const;
private: private:
std::string currentCmd; std::string currentCmd;
bool blocking = true; bool blocking = true;