increased the stack size for the GPS controller
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
9998b54f89
commit
bf73a2e442
@ -117,7 +117,7 @@ void initmission::initTasks() {
|
|||||||
|
|
||||||
#if OBSW_ADD_ACS_HANDLERS == 1
|
#if OBSW_ADD_ACS_HANDLERS == 1
|
||||||
PeriodicTaskIF* acsCtrl = factory->createPeriodicTask(
|
PeriodicTaskIF* acsCtrl = factory->createPeriodicTask(
|
||||||
"ACS_CTRL", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
"ACS_CTRL", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
result = acsCtrl->addComponent(objects::GPS_CONTROLLER);
|
result = acsCtrl->addComponent(objects::GPS_CONTROLLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
initmission::printAddObjectError("ACS_CTRL", objects::GPS_CONTROLLER);
|
initmission::printAddObjectError("ACS_CTRL", objects::GPS_CONTROLLER);
|
||||||
@ -136,10 +136,10 @@ void initmission::initTasks() {
|
|||||||
|
|
||||||
#if OBSW_ADD_STAR_TRACKER == 1
|
#if OBSW_ADD_STAR_TRACKER == 1
|
||||||
PeriodicTaskIF* strImgLoaderTask = factory->createPeriodicTask(
|
PeriodicTaskIF* strImgLoaderTask = factory->createPeriodicTask(
|
||||||
"FILE_SYSTEM_TASK", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = strImgLoaderTask->addComponent(objects::STR_HELPER);
|
result = strImgLoaderTask->addComponent(objects::STR_HELPER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
initmission::printAddObjectError("FILE_SYSTEM_TASK", objects::STR_HELPER);
|
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
|
||||||
|
@ -4,11 +4,6 @@
|
|||||||
#include "fsfw/datapool/PoolReadGuard.h"
|
#include "fsfw/datapool/PoolReadGuard.h"
|
||||||
#include "fsfw/timemanager/Clock.h"
|
#include "fsfw/timemanager/Clock.h"
|
||||||
|
|
||||||
#ifdef FSFW_OSAL_LINUX
|
|
||||||
#include <gps.h>
|
|
||||||
#include <libgpsmm.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#if FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV == 1
|
#if FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV == 1
|
||||||
@ -20,6 +15,7 @@ GPSHyperionHandler::GPSHyperionHandler(object_id_t objectId, object_id_t parentI
|
|||||||
bool debugHyperionGps)
|
bool debugHyperionGps)
|
||||||
: ExtendedControllerBase(objectId, objects::NO_OBJECT),
|
: ExtendedControllerBase(objectId, objects::NO_OBJECT),
|
||||||
gpsSet(this),
|
gpsSet(this),
|
||||||
|
myGpsmm(GPSD_SHARED_MEMORY, nullptr),
|
||||||
debugHyperionGps(debugHyperionGps) {}
|
debugHyperionGps(debugHyperionGps) {}
|
||||||
|
|
||||||
GPSHyperionHandler::~GPSHyperionHandler() {}
|
GPSHyperionHandler::~GPSHyperionHandler() {}
|
||||||
@ -97,15 +93,14 @@ ReturnValue_t GPSHyperionHandler::handleCommandMessage(CommandMessage *message)
|
|||||||
void GPSHyperionHandler::readGpsDataFromGpsd() {
|
void GPSHyperionHandler::readGpsDataFromGpsd() {
|
||||||
// The data from the device will generally be read all at once. Therefore, we
|
// The data from the device will generally be read all at once. Therefore, we
|
||||||
// can set all field here
|
// can set all field here
|
||||||
gpsmm gpsmm(GPSD_SHARED_MEMORY, 0);
|
if(not myGpsmm.is_open()) {
|
||||||
if(not gpsmm.is_open()) {
|
|
||||||
// Opening failed
|
// Opening failed
|
||||||
#if FSFW_VERBOSE_LEVEL >= 1
|
#if FSFW_VERBOSE_LEVEL >= 1
|
||||||
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Opening GPSMM failed" << std::endl;
|
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Opening GPSMM failed" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
gps_data_t *gps;
|
gps_data_t *gps = nullptr;
|
||||||
gps = gpsmm.read();
|
gps = myGpsmm.read();
|
||||||
if (gps == nullptr) {
|
if (gps == nullptr) {
|
||||||
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading GPS data failed" << std::endl;
|
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading GPS data failed" << std::endl;
|
||||||
}
|
}
|
||||||
@ -165,6 +160,7 @@ void GPSHyperionHandler::readGpsDataFromGpsd() {
|
|||||||
gpsSet.hours = timeOfDay.hour;
|
gpsSet.hours = timeOfDay.hour;
|
||||||
gpsSet.minutes = timeOfDay.minute;
|
gpsSet.minutes = timeOfDay.minute;
|
||||||
gpsSet.seconds = timeOfDay.second;
|
gpsSet.seconds = timeOfDay.second;
|
||||||
|
debugHyperionGps = true;
|
||||||
if (debugHyperionGps) {
|
if (debugHyperionGps) {
|
||||||
sif::info << "-- Hyperion GPS Data --" << std::endl;
|
sif::info << "-- Hyperion GPS Data --" << std::endl;
|
||||||
time_t timeRaw = gps->fix.time.tv_sec;
|
time_t timeRaw = gps->fix.time.tv_sec;
|
||||||
|
@ -6,6 +6,11 @@
|
|||||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
|
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
|
#include <gps.h>
|
||||||
|
#include <libgpsmm.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Device handler for the Hyperion HT-GPS200 device
|
* @brief Device handler for the Hyperion HT-GPS200 device
|
||||||
* @details
|
* @details
|
||||||
@ -38,6 +43,7 @@ class GPSHyperionHandler : public ExtendedControllerBase {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
GpsPrimaryDataset gpsSet;
|
GpsPrimaryDataset gpsSet;
|
||||||
|
gpsmm myGpsmm;
|
||||||
bool debugHyperionGps = false;
|
bool debugHyperionGps = false;
|
||||||
|
|
||||||
void readGpsDataFromGpsd();
|
void readGpsDataFromGpsd();
|
||||||
|
Loading…
Reference in New Issue
Block a user