Thread Tracing and Scheduling Update #379
@ -102,6 +102,9 @@ ReturnValue_t GpsHyperionLinuxController::performOperation(uint8_t opCode) {
|
|||||||
handleQueue();
|
handleQueue();
|
||||||
poolManager.performHkOperation();
|
poolManager.performHkOperation();
|
||||||
while (true) {
|
while (true) {
|
||||||
|
#if OBSW_THREAD_TRACING == 1
|
||||||
|
trace::threadTrace(opCounter, "GPS CTRL");
|
||||||
|
#endif
|
||||||
bool callAgainImmediately = readGpsDataFromGpsd();
|
bool callAgainImmediately = readGpsDataFromGpsd();
|
||||||
if (not callAgainImmediately) {
|
if (not callAgainImmediately) {
|
||||||
handleQueue();
|
handleQueue();
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
||||||
|
#include "mission/trace.h"
|
||||||
|
|
||||||
#ifdef FSFW_OSAL_LINUX
|
#ifdef FSFW_OSAL_LINUX
|
||||||
#include <gps.h>
|
#include <gps.h>
|
||||||
@ -60,6 +61,9 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
|
|||||||
Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000);
|
Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000);
|
||||||
bool modeCommanded = false;
|
bool modeCommanded = false;
|
||||||
bool timeInit = false;
|
bool timeInit = false;
|
||||||
|
#if OBSW_THREAD_TRACING == 1
|
||||||
|
uint32_t opCounter = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct OneShotSwitches {
|
struct OneShotSwitches {
|
||||||
void reset() {
|
void reset() {
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "mission/trace.h"
|
|
||||||
#include "fsfw/container/FIFO.h"
|
#include "fsfw/container/FIFO.h"
|
||||||
#include "fsfw/devicehandlers/CookieIF.h"
|
#include "fsfw/devicehandlers/CookieIF.h"
|
||||||
#include "fsfw/objectmanager/SystemObject.h"
|
#include "fsfw/objectmanager/SystemObject.h"
|
||||||
|
@ -72,6 +72,9 @@ ReturnValue_t ThermalController::handleCommandMessage(CommandMessage* message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ThermalController::performControlOperation() {
|
void ThermalController::performControlOperation() {
|
||||||
|
#if OBSW_THREAD_TRACING == 1
|
||||||
|
trace::threadTrace(opCounter, "TCS Task");
|
||||||
|
#endif
|
||||||
switch (internalState) {
|
switch (internalState) {
|
||||||
case InternalState::STARTUP: {
|
case InternalState::STARTUP: {
|
||||||
initialCountdown.resetTimer();
|
initialCountdown.resetTimer();
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "../devices/HeaterHandler.h"
|
#include "mission/devices/HeaterHandler.h"
|
||||||
|
#include "mission/trace.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOP Limit: Hard limit for device, usually from datasheet. Device damage is possible lif NOP limit
|
* NOP Limit: Hard limit for device, usually from datasheet. Device damage is possible lif NOP limit
|
||||||
@ -152,6 +153,10 @@ class ThermalController : public ExtendedControllerBase {
|
|||||||
// Initial delay to make sure all pool variables have been initialized their owners
|
// Initial delay to make sure all pool variables have been initialized their owners
|
||||||
Countdown initialCountdown = Countdown(DELAY);
|
Countdown initialCountdown = Countdown(DELAY);
|
||||||
|
|
||||||
|
#if OBSW_THREAD_TRACING == 1
|
||||||
|
uint32_t opCounter = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::array<std::pair<bool, double>, 5> sensors;
|
std::array<std::pair<bool, double>, 5> sensors;
|
||||||
uint8_t numSensors = 0;
|
uint8_t numSensors = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user