refactored FIFO handling
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
#include "q7sConfig.h"
|
||||
#include "watchdog/definitions.h"
|
||||
|
||||
static int OBSW_ALREADY_RUNNING = -2;
|
||||
static constexpr int OBSW_ALREADY_RUNNING = -2;
|
||||
#if OBSW_Q7S_EM == 0
|
||||
static const char* DEV_STRING = "Xiphos Q7S FM";
|
||||
#else
|
||||
@ -28,7 +28,7 @@ static const char* DEV_STRING = "Xiphos Q7S EM";
|
||||
|
||||
WatchdogHandler WATCHDOG_HANDLER;
|
||||
|
||||
int obsw::obsw() {
|
||||
int obsw::obsw(int argc, char* argv[]) {
|
||||
using namespace fsfw;
|
||||
std::cout << "-- EIVE OBSW --" << std::endl;
|
||||
std::cout << "-- Compiled for Linux (" << DEV_STRING << ") --" << std::endl;
|
||||
@ -52,7 +52,8 @@ int obsw::obsw() {
|
||||
bootDelayHandling();
|
||||
|
||||
bool initWatchFunction = false;
|
||||
if (std::filesystem::current_path().string().find("/usr/bin") != std::string::npos) {
|
||||
std::string fullExecPath = argv[0];
|
||||
if (fullExecPath.find("/usr/bin") != std::string::npos) {
|
||||
initWatchFunction = true;
|
||||
}
|
||||
ReturnValue_t result = WATCHDOG_HANDLER.initialize(initWatchFunction);
|
||||
@ -71,7 +72,7 @@ int obsw::obsw() {
|
||||
|
||||
for (;;) {
|
||||
WATCHDOG_HANDLER.periodicOperation();
|
||||
TaskFactory::delayTask(1000);
|
||||
TaskFactory::delayTask(2000);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user