compile check succesfull
This commit is contained in:
parent
79701eabb1
commit
e13c99a188
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#define OBSW_ADD_TEST_CODE 0
|
#define OBSW_ADD_TEST_CODE 0
|
||||||
|
|
||||||
// These defines should be disabled for mission code but are useful for
|
/* These defines should be disabled for mission code but are useful for
|
||||||
// debugging.
|
debugging. */
|
||||||
#define OBSW_ENHANCED_PRINTOUT 1
|
#define OBSW_VEBOSE_LEVEL 1
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ target_sources(${TARGET_NAME} PUBLIC
|
|||||||
|
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
add_subdirectory(comIF)
|
add_subdirectory(comIF)
|
||||||
add_subdirectory(gpio)
|
|
||||||
add_subdirectory(boardtest)
|
add_subdirectory(boardtest)
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
#include <bsp_q7s/comIF/cookies/I2cCookie.h>
|
#include <bsp_q7s/comIF/cookies/I2cCookie.h>
|
||||||
#include <bsp_q7s/comIF/CspComIF.h>
|
#include <bsp_q7s/comIF/CspComIF.h>
|
||||||
#include <bsp_q7s/comIF/I2cComIF.h>
|
#include <bsp_q7s/comIF/I2cComIF.h>
|
||||||
#include <bsp_q7s/gpio/LinuxLibgpioIF.h>
|
#include <linux/gpio/LinuxLibgpioIF.h>
|
||||||
#include <bsp_q7s/gpio/cookies/GpioCookie.h>
|
#include <linux/gpio/GpioCookie.h>
|
||||||
|
|
||||||
# if TEST_LIBGPIOD == 1
|
#if TEST_LIBGPIOD == 1
|
||||||
#include "LibgpiodTest.h"
|
#include "LibgpiodTest.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6,18 +6,17 @@
|
|||||||
#ifndef FSFWCONFIG_OBSWCONFIG_H_
|
#ifndef FSFWCONFIG_OBSWCONFIG_H_
|
||||||
#define FSFWCONFIG_OBSWCONFIG_H_
|
#define FSFWCONFIG_OBSWCONFIG_H_
|
||||||
|
|
||||||
#define TEST_LIBGPIOD 0
|
#define TEST_LIBGPIOD 0
|
||||||
#define ADD_TEST_TAST 0
|
|
||||||
|
|
||||||
// These defines should be disabled for mission code but are useful for
|
/* These defines should be disabled for mission code but are useful for
|
||||||
// debugging.
|
debugging. */
|
||||||
#define OBSW_ENHANCED_PRINTOUT 1
|
#define OBSW_VERBOSE_LEVEL 1
|
||||||
|
|
||||||
#define TE0720 0
|
#define TE0720 0
|
||||||
|
|
||||||
#define P60DOCK_DEBUG 0
|
#define P60DOCK_DEBUG 0
|
||||||
#define PDU1_DEBUG 0
|
#define PDU1_DEBUG 0
|
||||||
#define PDU2_DEBUG 0
|
#define PDU2_DEBUG 0
|
||||||
|
|
||||||
#include "OBSWVersion.h"
|
#include "OBSWVersion.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_
|
#ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_
|
||||||
#define FSFWCONFIG_DEVICES_GPIOIDS_H_
|
#define FSFWCONFIG_DEVICES_GPIOIDS_H_
|
||||||
|
|
||||||
#include <bsp_q7s/gpio/GpioIF.h>
|
#include <linux/gpio/GpioIF.h>
|
||||||
|
|
||||||
namespace gpioIds {
|
namespace gpioIds {
|
||||||
enum gpioId_t {
|
enum gpioId_t {
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
#include <fsfw/devicehandlers/CookieIF.h>
|
#include <fsfw/devicehandlers/CookieIF.h>
|
||||||
#include <fsfw/timemanager/Countdown.h>
|
#include <fsfw/timemanager/Countdown.h>
|
||||||
|
#include <linux/gpio/GpioIF.h>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <bsp_q7s/gpio/GpioIF.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This class intends the control of heaters.
|
* @brief This class intends the control of heaters.
|
||||||
|
@ -5,7 +5,7 @@ MGMHandlerLIS3MDL::MGMHandlerLIS3MDL(object_id_t objectId,
|
|||||||
object_id_t deviceCommunication, CookieIF* comCookie):
|
object_id_t deviceCommunication, CookieIF* comCookie):
|
||||||
DeviceHandlerBase(objectId, deviceCommunication, comCookie),
|
DeviceHandlerBase(objectId, deviceCommunication, comCookie),
|
||||||
dataset(this) {
|
dataset(this) {
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
debugDivider = new PeriodicOperationDivider(10);
|
debugDivider = new PeriodicOperationDivider(10);
|
||||||
#endif
|
#endif
|
||||||
// Set to default values right away.
|
// Set to default values right away.
|
||||||
@ -247,7 +247,7 @@ ReturnValue_t MGMHandlerLIS3MDL::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
float mgmZ = static_cast<float>(mgmMeasurementRawZ) * sensitivityFactor
|
float mgmZ = static_cast<float>(mgmMeasurementRawZ) * sensitivityFactor
|
||||||
* MGMLIS3MDL::GAUSS_TO_MICROTESLA_FACTOR;
|
* MGMLIS3MDL::GAUSS_TO_MICROTESLA_FACTOR;
|
||||||
|
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
if(debugDivider->checkAndIncrement()) {
|
if(debugDivider->checkAndIncrement()) {
|
||||||
sif::info << "MGMHandlerLIS3: Magnetic field strength in"
|
sif::info << "MGMHandlerLIS3: Magnetic field strength in"
|
||||||
" microtesla:" << std::endl;
|
" microtesla:" << std::endl;
|
||||||
@ -271,7 +271,7 @@ ReturnValue_t MGMHandlerLIS3MDL::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
case MGMLIS3MDL::READ_TEMPERATURE: {
|
case MGMLIS3MDL::READ_TEMPERATURE: {
|
||||||
int16_t tempValueRaw = packet[2] << 8 | packet[1];
|
int16_t tempValueRaw = packet[2] << 8 | packet[1];
|
||||||
float tempValue = 25.0 + ((static_cast<float>(tempValueRaw)) / 8.0);
|
float tempValue = 25.0 + ((static_cast<float>(tempValueRaw)) / 8.0);
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
if(debugDivider->check()) {
|
if(debugDivider->check()) {
|
||||||
// Set terminal to utf-8 if there is an issue with micro printout.
|
// Set terminal to utf-8 if there is an issue with micro printout.
|
||||||
sif::info << "MGMHandlerLIS3: Temperature: " << tempValue<< " °C"
|
sif::info << "MGMHandlerLIS3: Temperature: " << tempValue<< " °C"
|
||||||
|
@ -157,7 +157,7 @@ private:
|
|||||||
CommunicationStep communicationStep = CommunicationStep::DATA;
|
CommunicationStep communicationStep = CommunicationStep::DATA;
|
||||||
bool commandExecuted = false;
|
bool commandExecuted = false;
|
||||||
|
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
PeriodicOperationDivider* debugDivider;
|
PeriodicOperationDivider* debugDivider;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ MGMHandlerRM3100::MGMHandlerRM3100(object_id_t objectId,
|
|||||||
object_id_t deviceCommunication, CookieIF* comCookie):
|
object_id_t deviceCommunication, CookieIF* comCookie):
|
||||||
DeviceHandlerBase(objectId, deviceCommunication, comCookie),
|
DeviceHandlerBase(objectId, deviceCommunication, comCookie),
|
||||||
primaryDataset(this) {
|
primaryDataset(this) {
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
debugDivider = new PeriodicOperationDivider(10);
|
debugDivider = new PeriodicOperationDivider(10);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -328,7 +328,7 @@ ReturnValue_t MGMHandlerRM3100::handleDataReadout(const uint8_t *packet) {
|
|||||||
int32_t fieldStrengthZ = (packet[7] << 16 | packet[8] << 8 | packet[9])
|
int32_t fieldStrengthZ = (packet[7] << 16 | packet[8] << 8 | packet[9])
|
||||||
* scaleFactorZ;
|
* scaleFactorZ;
|
||||||
|
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
if(debugDivider->checkAndIncrement()) {
|
if(debugDivider->checkAndIncrement()) {
|
||||||
sif::info << "MGMHandlerLIS3: Magnetic field strength in"
|
sif::info << "MGMHandlerLIS3: Magnetic field strength in"
|
||||||
" microtesla:" << std::endl;
|
" microtesla:" << std::endl;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include <OBSWConfig.h>
|
#include <OBSWConfig.h>
|
||||||
|
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ private:
|
|||||||
const uint8_t *commandData,size_t commandDataLen);
|
const uint8_t *commandData,size_t commandDataLen);
|
||||||
|
|
||||||
ReturnValue_t handleDataReadout(const uint8_t* packet);
|
ReturnValue_t handleDataReadout(const uint8_t* packet);
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
PeriodicOperationDivider* debugDivider;
|
PeriodicOperationDivider* debugDivider;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@ void P60DockHandler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *
|
|||||||
*/
|
*/
|
||||||
handleDeviceTM(&p60dockHkTableDataset, id, true);
|
handleDeviceTM(&p60dockHkTableDataset, id, true);
|
||||||
|
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1 && P60DOCK_DEBUG == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && P60DOCK_DEBUG == 1
|
||||||
p60dockHkTableDataset.read();
|
p60dockHkTableDataset.read();
|
||||||
|
|
||||||
float temperatureC = p60dockHkTableDataset.temperature1.value * 0.1;
|
float temperatureC = p60dockHkTableDataset.temperature1.value * 0.1;
|
||||||
|
@ -23,7 +23,7 @@ void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
|
|||||||
parseHkTableReply(packet);
|
parseHkTableReply(packet);
|
||||||
// handleDeviceTM(&pdu1HkTableDataset, id, true);
|
// handleDeviceTM(&pdu1HkTableDataset, id, true);
|
||||||
|
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1 && PDU1_DEBUG == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && PDU1_DEBUG == 1
|
||||||
pdu1HkTableDataset.read();
|
pdu1HkTableDataset.read();
|
||||||
sif::info << "PDU1 VCC: " << pdu1HkTableDataset.vcc << " mV" << std::endl;
|
sif::info << "PDU1 VCC: " << pdu1HkTableDataset.vcc << " mV" << std::endl;
|
||||||
float vbat = pdu1HkTableDataset.vbat.value * 0.1;
|
float vbat = pdu1HkTableDataset.vbat.value * 0.1;
|
||||||
|
@ -26,7 +26,7 @@ void PDU2Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
|
|||||||
*/
|
*/
|
||||||
handleDeviceTM(&pdu2HkTableDataset, id, true);
|
handleDeviceTM(&pdu2HkTableDataset, id, true);
|
||||||
|
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1 && PDU2_DEBUG == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && PDU2_DEBUG == 1
|
||||||
pdu2HkTableDataset.read();
|
pdu2HkTableDataset.read();
|
||||||
sif::info << "PDU2 Q7S current voltage: " << pdu2HkTableDataset.voltageOutQ7S << " mV" << std::endl;
|
sif::info << "PDU2 Q7S current voltage: " << pdu2HkTableDataset.voltageOutQ7S << " mV" << std::endl;
|
||||||
sif::info << "PDU2 VCC: " << pdu2HkTableDataset.vcc << " mV" << std::endl;
|
sif::info << "PDU2 VCC: " << pdu2HkTableDataset.vcc << " mV" << std::endl;
|
||||||
|
@ -98,7 +98,7 @@ ReturnValue_t Tmp1075Handler::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
int16_t tempValueRaw = 0;
|
int16_t tempValueRaw = 0;
|
||||||
tempValueRaw = packet[0] << 4 | packet[1] >> 4;
|
tempValueRaw = packet[0] << 4 | packet[1] >> 4;
|
||||||
float tempValue = ((static_cast<float>(tempValueRaw)) * 0.0625);
|
float tempValue = ((static_cast<float>(tempValueRaw)) * 0.0625);
|
||||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
sif::info << "Tmp1075 with object id: 0x" << std::hex << getObjectId()
|
sif::info << "Tmp1075 with object id: 0x" << std::hex << getObjectId()
|
||||||
<< ": Temperature: " << tempValue<< " °C"
|
<< ": Temperature: " << tempValue<< " °C"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user