mueller_stopwatch #30

Merged
muellerr merged 18 commits from KSat/fsfw:mueller_stopwatch into master 2020-07-07 12:05:04 +02:00
2 changed files with 7 additions and 14 deletions
Showing only changes of commit a9a23d7623 - Show all commits

View File

@ -1,17 +1,12 @@
/**
* @file Timekeeper.cpp
* @date
*/
#include <framework/osal/FreeRTOS/Timekeeper.h>
Review

Where does this header comm from?

Where does this header comm from?
Review

I don't know. TickType_t is defined in partmacro.h (includes by FreeRTOS.h, just portmacro.h did not work I think) and xGetTickCount is part of task.h .

I don't know. TickType_t is defined in partmacro.h (includes by FreeRTOS.h, just portmacro.h did not work I think) and xGetTickCount is part of task.h .
Review

I now know where it comes from: The configTICK_RATE_HZ is used and is located
inside the FreeRTOSConfig.h file. This file needs to be in the include path in any case, but compiler/indexer warnings are always annoying, so I included it explicitely.

I now know where it comes from: The configTICK_RATE_HZ is used and is located inside the FreeRTOSConfig.h file. This file needs to be in the include path in any case, but compiler/indexer warnings are always annoying, so I included it explicitely.
extern "C" {
#include <task.h>
}
#include "FreeRTOSConfig.h"
Timekeeper * Timekeeper::myinstance = nullptr;
Timekeeper::Timekeeper() : offset( { 0, 0 }) {}
Timekeeper::Timekeeper() : offset( { 0, 0 } ) {}
Timekeeper::~Timekeeper() {}
const timeval& Timekeeper::getOffset() const {
return offset;
@ -28,8 +23,6 @@ void Timekeeper::setOffset(const timeval& offset) {
this->offset = offset;
}
Timekeeper::~Timekeeper() {}
timeval Timekeeper::ticksToTimeval(TickType_t ticks) {
timeval uptime;
uptime.tv_sec = ticks / configTICK_RATE_HZ;

View File

@ -2,9 +2,9 @@
#define FRAMEWORK_OSAL_FREERTOS_TIMEKEEPER_H_
#include <framework/timemanager/Clock.h>
extern "C" {
#include <FreeRTOS.h>
}
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
/**