Improved structure #17
@ -44,8 +44,10 @@ set(FSFW_PATH fsfw)
|
|||||||
set(MISSION_PATH mission)
|
set(MISSION_PATH mission)
|
||||||
set(CSPLIB_PATH libcsp)
|
set(CSPLIB_PATH libcsp)
|
||||||
set(TEST_PATH test/testtasks)
|
set(TEST_PATH test/testtasks)
|
||||||
|
set(LINUX_PATH linux)
|
||||||
|
|
||||||
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
|
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
|
||||||
|
set(ADD_LINUX_FILES FALSE)
|
||||||
|
|
||||||
# Analyse different OS and architecture/target options, determine BSP_PATH,
|
# Analyse different OS and architecture/target options, determine BSP_PATH,
|
||||||
# display information about compiler etc.
|
# display information about compiler etc.
|
||||||
@ -53,17 +55,15 @@ include (${CMAKE_SCRIPT_PATH}/HardwareOsPreConfig.cmake)
|
|||||||
pre_source_hw_os_config()
|
pre_source_hw_os_config()
|
||||||
|
|
||||||
if(TGT_BSP)
|
if(TGT_BSP)
|
||||||
if(${TGT_BSP} MATCHES "arm/q7s" OR ${TGT_BSP} MATCHES "arm/raspberrypi")
|
if(${TGT_BSP} MATCHES "arm/q7s" OR ${TGT_BSP} MATCHES "arm/raspberrypi")
|
||||||
set(ROOT_CONFIG_FOLDER TRUE)
|
set(ROOT_CONFIG_FOLDER TRUE)
|
||||||
set(FSFW_CONFIG_PATH "fsfwconfig")
|
set(FSFW_CONFIG_PATH "fsfwconfig")
|
||||||
endif()
|
set(ADD_LINUX_FILES TRUE)
|
||||||
|
set(ADD_CSP_LIB TRUE)
|
||||||
if(${TGT_BSP} MATCHES "arm/q7s")
|
endif()
|
||||||
set(ADD_CSP_LIB TRUE)
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
# Required by FSFW library
|
# Required by FSFW library
|
||||||
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -75,11 +75,15 @@ add_executable(${TARGET_NAME})
|
|||||||
|
|
||||||
# Add subdirectories
|
# Add subdirectories
|
||||||
if(ROOT_CONFIG_FOLDER)
|
if(ROOT_CONFIG_FOLDER)
|
||||||
add_subdirectory(${FSFW_CONFIG_PATH})
|
add_subdirectory(${FSFW_CONFIG_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ADD_CSP_LIB)
|
if(ADD_CSP_LIB)
|
||||||
add_subdirectory(${CSPLIB_PATH})
|
add_subdirectory(${CSPLIB_PATH})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ADD_LINUX_FILES)
|
||||||
|
add_subdirectory(${LINUX_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(${BSP_PATH})
|
add_subdirectory(${BSP_PATH})
|
||||||
|
42
README.md
42
README.md
@ -24,10 +24,7 @@ Target systems:
|
|||||||
The steps in the primary README are related to the main OBC target Q7S.
|
The steps in the primary README are related to the main OBC target Q7S.
|
||||||
The CMake build system can be used to generate build systems as well (see helper scripts in `cmake/scripts`:
|
The CMake build system can be used to generate build systems as well (see helper scripts in `cmake/scripts`:
|
||||||
|
|
||||||
- Linux (Raspberry Pi): Using the `bsp_rpi` BSP folder, and a very similar cross-compiler.
|
- Linux (Raspberry Pi): See special section below.
|
||||||
For running the software on a Raspberry Pi, it is recommended to follow the steps specified in
|
|
||||||
[the fsfw example](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example/src/branch/mueller/master/doc/README-rpi.md#top) and
|
|
||||||
using the TCF agent to have a similar set-up process also required for the Q7S.
|
|
||||||
- Linux Host: Uses the `bsp_hosted` BSP folder and the CMake Unix Makefiles generator.
|
- Linux Host: Uses the `bsp_hosted` BSP folder and the CMake Unix Makefiles generator.
|
||||||
- Windows Host: Uses the `bsp_hosted` BSP folder, the CMake MinGW Makefiles generator and MSYS2.
|
- Windows Host: Uses the `bsp_hosted` BSP folder, the CMake MinGW Makefiles generator and MSYS2.
|
||||||
|
|
||||||
@ -89,6 +86,13 @@ C++ applications. Alternatively you can download the toolchain
|
|||||||
sudo apt-get install cmake
|
sudo apt-get install cmake
|
||||||
````
|
````
|
||||||
|
|
||||||
|
## Getting the Q7S system root
|
||||||
|
|
||||||
|
It is necessary to copy the Q7S system root to your local development machine for libraries
|
||||||
|
like `libgpio`. You can find the system root [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Arbeitsdaten/08_Used%20Components/Q7S/Toolchain&fileid=422486). Download it and unzip it somewhere in the Xilinx installation folder.
|
||||||
|
|
||||||
|
Then, create a new environmental variables `Q7S_SYSROOT` and set it to the local system root path.
|
||||||
|
|
||||||
## Building the software with CMake
|
## Building the software with CMake
|
||||||
|
|
||||||
When using Windows, run theses steps in MSYS2.
|
When using Windows, run theses steps in MSYS2.
|
||||||
@ -149,9 +153,9 @@ The [TCF agent](https://wiki.eclipse.org/TCF) can be used to perform remote debu
|
|||||||
|
|
||||||
After that, comfortable remote debugging should be possible with the Debug button.
|
After that, comfortable remote debugging should be possible with the Debug button.
|
||||||
|
|
||||||
A build configuration and a shell helper script has been provided to set up the path variables and build the Q7S binary
|
A build configuration and a shell helper script has been provided to set up the path variables and
|
||||||
on Windows, but a launch configuration needs to be newly created because the IP address and path settings differ
|
build the Q7S binary on Windows, but a launch configuration needs to be newly created because the
|
||||||
from machine to machine.
|
IP address and path settings differ from machine to machine.
|
||||||
|
|
||||||
## Building in Xilinx SDK 2018.2
|
## Building in Xilinx SDK 2018.2
|
||||||
|
|
||||||
@ -501,6 +505,7 @@ GET out_en[0] = 1
|
|||||||
* Remote File Path: /tmp/eive_obsw.elf
|
* Remote File Path: /tmp/eive_obsw.elf
|
||||||
|
|
||||||
## Libgpiod
|
## Libgpiod
|
||||||
|
|
||||||
Detect all gpio device files:
|
Detect all gpio device files:
|
||||||
````
|
````
|
||||||
gpiodetect
|
gpiodetect
|
||||||
@ -527,3 +532,26 @@ gpioget <gpiogroup> <offset>
|
|||||||
````
|
````
|
||||||
Example to get state:
|
Example to get state:
|
||||||
gpioget gpiochip7 14
|
gpioget gpiochip7 14
|
||||||
|
|
||||||
|
## Running the EIVE OBSW on a Raspberry Pi
|
||||||
|
|
||||||
|
Special section for running the EIVE OBSW on the Raspberry Pi.
|
||||||
|
The Raspberry Pi build uses the `bsp_rpi` BSP folder, and a very similar cross-compiler.
|
||||||
|
|
||||||
|
For running the software on a Raspberry Pi, it is recommended to follow the steps specified in
|
||||||
|
[the fsfw example](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example/src/branch/mueller/master/doc/README-rpi.md#top)
|
||||||
|
and using the TCF agent to have a similar set-up process also required for the Q7S.
|
||||||
|
You should run the following command first on your Raspberry Pi
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo apt-get install gpiod libgpiod-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
to install the required GPIO libraries before cloning the system root folder.
|
||||||
|
|
||||||
|
## Special notes on Eclipse
|
||||||
|
|
||||||
|
When using Eclipse, there are two special build variables in the project properties
|
||||||
|
→ C/C++ Build → Build Variables called `Q7S_SYSROOT` or `RPI_SYSROOT`. You can set
|
||||||
|
the sysroot path in those variables to get any additional includes like `gpiod.h` in the
|
||||||
|
Eclipse indexer.
|
@ -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,7 @@ target_sources(${TARGET_NAME} PUBLIC
|
|||||||
|
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
add_subdirectory(comIF)
|
add_subdirectory(comIF)
|
||||||
add_subdirectory(gpio)
|
add_subdirectory(boardtest)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,147 +26,151 @@
|
|||||||
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||||
#include <mission/utility/TmFunnel.h>
|
#include <mission/utility/TmFunnel.h>
|
||||||
|
|
||||||
#include <bsp_q7s/comIF/cookies/CspCookie.h>
|
#include <linux/csp/CspCookie.h>
|
||||||
#include <bsp_q7s/comIF/cookies/I2cCookie.h>
|
#include <linux/csp/CspComIF.h>
|
||||||
#include <bsp_q7s/comIF/CspComIF.h>
|
#include <linux/i2c/I2cCookie.h>
|
||||||
#include <bsp_q7s/comIF/I2cComIF.h>
|
#include <linux/i2c/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
|
||||||
|
|
||||||
void Factory::setStaticFrameworkObjectIds() {
|
void Factory::setStaticFrameworkObjectIds() {
|
||||||
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
|
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
PusServiceBase::packetDestination = objects::TM_FUNNEL;
|
PusServiceBase::packetDestination = objects::TM_FUNNEL;
|
||||||
|
|
||||||
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
||||||
|
|
||||||
TmFunnel::downlinkDestination = objects::UDP_BRIDGE;
|
TmFunnel::downlinkDestination = objects::UDP_BRIDGE;
|
||||||
// No storage object for now.
|
// No storage object for now.
|
||||||
TmFunnel::storageDestination = objects::NO_OBJECT;
|
TmFunnel::storageDestination = objects::NO_OBJECT;
|
||||||
|
|
||||||
LocalDataPoolManager::defaultHkDestination = objects::NO_OBJECT;
|
LocalDataPoolManager::defaultHkDestination = objects::NO_OBJECT;
|
||||||
|
|
||||||
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
|
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
|
||||||
TmPacketStored::timeStamperId = objects::TIME_STAMPER;
|
TmPacketStored::timeStamperId = objects::TIME_STAMPER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ObjectFactory::produce(){
|
void ObjectFactory::produce(){
|
||||||
Factory::setStaticFrameworkObjectIds();
|
Factory::setStaticFrameworkObjectIds();
|
||||||
ObjectFactory::produceGenericObjects();
|
ObjectFactory::produceGenericObjects();
|
||||||
|
|
||||||
#if TE0720 == 1
|
#if TE0720 == 1
|
||||||
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
|
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
|
||||||
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
|
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
|
||||||
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
|
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
|
||||||
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
|
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
|
||||||
#else
|
#else
|
||||||
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
|
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
|
||||||
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
|
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
|
||||||
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
|
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
|
||||||
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
|
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
|
||||||
#endif
|
#endif
|
||||||
/* Communication interfaces */
|
/* Communication interfaces */
|
||||||
new CspComIF(objects::CSP_COM_IF);
|
new CspComIF(objects::CSP_COM_IF);
|
||||||
new I2cComIF(objects::I2C_COM_IF);
|
new I2cComIF(objects::I2C_COM_IF);
|
||||||
|
|
||||||
#if TE0720 == 0
|
#if TE0720 == 0
|
||||||
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH,
|
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH,
|
||||||
addresses::P60DOCK);
|
addresses::P60DOCK);
|
||||||
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH,
|
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH,
|
||||||
addresses::PDU1);
|
addresses::PDU1);
|
||||||
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH,
|
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH,
|
||||||
addresses::PDU2);
|
addresses::PDU2);
|
||||||
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH,
|
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH,
|
||||||
addresses::ACU);
|
addresses::ACU);
|
||||||
/* Device Handler */
|
/* Device Handler */
|
||||||
P60DockHandler* p60dockhandler = new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF, p60DockCspCookie);
|
P60DockHandler* p60dockhandler = new P60DockHandler(objects::P60DOCK_HANDLER,
|
||||||
PDU1Handler* pdu1handler = new PDU1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF, pdu1CspCookie);
|
objects::CSP_COM_IF, p60DockCspCookie);
|
||||||
PDU2Handler* pdu2handler = new PDU2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF, pdu2CspCookie);
|
PDU1Handler* pdu1handler = new PDU1Handler(objects::PDU1_HANDLER,
|
||||||
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie);
|
objects::CSP_COM_IF, pdu1CspCookie);
|
||||||
new PCDUHandler(objects::PCDU_HANDLER, 50);
|
PDU2Handler* pdu2handler = new PDU2Handler(objects::PDU2_HANDLER,
|
||||||
|
objects::CSP_COM_IF, pdu2CspCookie);
|
||||||
|
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER,
|
||||||
|
objects::CSP_COM_IF, acuCspCookie);
|
||||||
|
new PCDUHandler(objects::PCDU_HANDLER, 50);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setting PCDU devices to mode normal immediately after start up because PCDU is always
|
* Setting PCDU devices to mode normal immediately after start up because PCDU is always
|
||||||
* running.
|
* running.
|
||||||
*/
|
*/
|
||||||
p60dockhandler->setModeNormal();
|
p60dockhandler->setModeNormal();
|
||||||
pdu1handler->setModeNormal();
|
pdu1handler->setModeNormal();
|
||||||
pdu2handler->setModeNormal();
|
pdu2handler->setModeNormal();
|
||||||
acuhandler->setModeNormal();
|
acuhandler->setModeNormal();
|
||||||
#endif
|
#endif
|
||||||
/* Temperature sensors */
|
/* Temperature sensors */
|
||||||
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
||||||
objects::TMP1075_HANDLER_1, objects::I2C_COM_IF,
|
objects::TMP1075_HANDLER_1, objects::I2C_COM_IF,
|
||||||
i2cCookieTmp1075tcs1);
|
i2cCookieTmp1075tcs1);
|
||||||
tmp1075Handler_1->setStartUpImmediately();
|
tmp1075Handler_1->setStartUpImmediately();
|
||||||
Tmp1075Handler* tmp1075Handler_2 = new Tmp1075Handler(
|
Tmp1075Handler* tmp1075Handler_2 = new Tmp1075Handler(
|
||||||
objects::TMP1075_HANDLER_2, objects::I2C_COM_IF,
|
objects::TMP1075_HANDLER_2, objects::I2C_COM_IF,
|
||||||
i2cCookieTmp1075tcs2);
|
i2cCookieTmp1075tcs2);
|
||||||
tmp1075Handler_2->setStartUpImmediately();
|
tmp1075Handler_2->setStartUpImmediately();
|
||||||
|
|
||||||
GpioCookie* gpioCookie = new GpioCookie;
|
GpioCookie* gpioCookie = new GpioCookie;
|
||||||
new LinuxLibgpioIF(objects::GPIO_IF);
|
new LinuxLibgpioIF(objects::GPIO_IF);
|
||||||
#if TE0720 == 0
|
#if TE0720 == 0
|
||||||
/* Pin H2-11 on stack connector */
|
/* Pin H2-11 on stack connector */
|
||||||
GpioConfig_t gpioConfigHeater0(std::string("gpiochip7"), 18,
|
GpioConfig_t gpioConfigHeater0(std::string("gpiochip7"), 18,
|
||||||
std::string("Heater0"), Gpio::OUT, 0);
|
std::string("Heater0"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_0, gpioConfigHeater0);
|
gpioCookie->addGpio(gpioIds::HEATER_0, gpioConfigHeater0);
|
||||||
|
|
||||||
/* Pin H2-12 on stack connector */
|
/* Pin H2-12 on stack connector */
|
||||||
GpioConfig_t gpioConfigHeater1(std::string("gpiochip7"), 14,
|
GpioConfig_t gpioConfigHeater1(std::string("gpiochip7"), 14,
|
||||||
std::string("Heater1"), Gpio::OUT, 0);
|
std::string("Heater1"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_1, gpioConfigHeater1);
|
gpioCookie->addGpio(gpioIds::HEATER_1, gpioConfigHeater1);
|
||||||
|
|
||||||
/* Pin H2-13 on stack connector */
|
/* Pin H2-13 on stack connector */
|
||||||
GpioConfig_t gpioConfigHeater2(std::string("gpiochip7"), 20,
|
GpioConfig_t gpioConfigHeater2(std::string("gpiochip7"), 20,
|
||||||
std::string("Heater2"), Gpio::OUT, 0);
|
std::string("Heater2"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_2, gpioConfigHeater2);
|
gpioCookie->addGpio(gpioIds::HEATER_2, gpioConfigHeater2);
|
||||||
|
|
||||||
GpioConfig_t gpioConfigHeater3(std::string("gpiochip7"), 16,
|
GpioConfig_t gpioConfigHeater3(std::string("gpiochip7"), 16,
|
||||||
std::string("Heater3"), Gpio::OUT, 0);
|
std::string("Heater3"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_3, gpioConfigHeater3);
|
gpioCookie->addGpio(gpioIds::HEATER_3, gpioConfigHeater3);
|
||||||
|
|
||||||
GpioConfig_t gpioConfigHeater4(std::string("gpiochip7"), 24,
|
GpioConfig_t gpioConfigHeater4(std::string("gpiochip7"), 24,
|
||||||
std::string("Heater4"), Gpio::OUT, 0);
|
std::string("Heater4"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_4, gpioConfigHeater4);
|
gpioCookie->addGpio(gpioIds::HEATER_4, gpioConfigHeater4);
|
||||||
|
|
||||||
GpioConfig_t gpioConfigHeater5(std::string("gpiochip7"), 26,
|
GpioConfig_t gpioConfigHeater5(std::string("gpiochip7"), 26,
|
||||||
std::string("Heater5"), Gpio::OUT, 0);
|
std::string("Heater5"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_5, gpioConfigHeater5);
|
gpioCookie->addGpio(gpioIds::HEATER_5, gpioConfigHeater5);
|
||||||
|
|
||||||
GpioConfig_t gpioConfigHeater6(std::string("gpiochip7"), 22,
|
GpioConfig_t gpioConfigHeater6(std::string("gpiochip7"), 22,
|
||||||
std::string("Heater6"), Gpio::OUT, 0);
|
std::string("Heater6"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_6, gpioConfigHeater6);
|
gpioCookie->addGpio(gpioIds::HEATER_6, gpioConfigHeater6);
|
||||||
|
|
||||||
GpioConfig_t gpioConfigHeater7(std::string("gpiochip7"), 28,
|
GpioConfig_t gpioConfigHeater7(std::string("gpiochip7"), 28,
|
||||||
std::string("Heater7"), Gpio::OUT, 0);
|
std::string("Heater7"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_7, gpioConfigHeater7);
|
gpioCookie->addGpio(gpioIds::HEATER_7, gpioConfigHeater7);
|
||||||
|
|
||||||
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, gpioCookie, objects::PCDU_HANDLER,
|
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, gpioCookie, objects::PCDU_HANDLER,
|
||||||
pcduSwitches::TCS_BOARD_8V_HEATER_IN);
|
pcduSwitches::TCS_BOARD_8V_HEATER_IN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
new TmTcUnixUdpBridge(objects::UDP_BRIDGE,
|
new TmTcUnixUdpBridge(objects::UDP_BRIDGE,
|
||||||
objects::CCSDS_PACKET_DISTRIBUTOR,
|
objects::CCSDS_PACKET_DISTRIBUTOR,
|
||||||
objects::TM_STORE, objects::TC_STORE);
|
objects::TM_STORE, objects::TC_STORE);
|
||||||
new TcUnixUdpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
|
new TcUnixUdpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
|
||||||
|
|
||||||
#if TE0720 == 1 && TEST_LIBGPIOD == 1
|
#if TE0720 == 1 && TEST_LIBGPIOD == 1
|
||||||
/* Configure MIO0 as input */
|
/* Configure MIO0 as input */
|
||||||
GpioConfig_t gpioConfigMio0(std::string("gpiochip0"), 0,
|
GpioConfig_t gpioConfigMio0(std::string("gpiochip0"), 0,
|
||||||
std::string("MIO0"), Gpio::IN, 0);
|
std::string("MIO0"), gpio::IN, 0);
|
||||||
gpioCookie->addGpio(gpioIds::Test_ID, gpioConfigMio0);
|
gpioCookie->addGpio(gpioIds::Test_ID, gpioConfigMio0);
|
||||||
new LibgpiodTest(objects::LIBGPIOD_TEST, objects::GPIO_IF, gpioCookie);
|
new LibgpiodTest(objects::LIBGPIOD_TEST, objects::GPIO_IF, gpioCookie);
|
||||||
#elif TE0720 == 1
|
#elif TE0720 == 1
|
||||||
// Configuration for MIO0 on TE0720-03-1CFA
|
/* Configuration for MIO0 on TE0720-03-1CFA */
|
||||||
GpioConfig_t gpioConfigForDummyHeater(std::string("gpiochip0"), 0,
|
GpioConfig_t gpioConfigForDummyHeater(std::string("gpiochip0"), 0,
|
||||||
std::string("Heater0"), Gpio::OUT, 0);
|
std::string("Heater0"), gpio::OUT, 0);
|
||||||
gpioCookie->addGpio(gpioIds::HEATER_0, gpioConfigForDummyHeater);
|
gpioCookie->addGpio(gpioIds::HEATER_0, gpioConfigForDummyHeater);
|
||||||
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, gpioCookie, objects::PCDU_HANDLER,
|
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, gpioCookie, objects::PCDU_HANDLER,
|
||||||
pcduSwitches::TCS_BOARD_8V_HEATER_IN);
|
pcduSwitches::TCS_BOARD_8V_HEATER_IN);
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#ifndef BSP_Q7S_OBJECTFACTORY_H_
|
#ifndef BSP_Q7S_OBJECTFACTORY_H_
|
||||||
#define BSP_Q7S_OBJECTFACTORY_H_
|
#define BSP_Q7S_OBJECTFACTORY_H_
|
||||||
|
|
||||||
|
|
||||||
namespace ObjectFactory {
|
namespace ObjectFactory {
|
||||||
void setStatics();
|
void setStatics();
|
||||||
void produce();
|
void produce();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BSP_Q7S_OBJECTFACTORY_H_ */
|
#endif /* BSP_Q7S_OBJECTFACTORY_H_ */
|
||||||
|
7
bsp_q7s/boardtest/CMakeLists.txt
Normal file
7
bsp_q7s/boardtest/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
target_sources(${TARGET_NAME} PRIVATE
|
||||||
|
LibgpiodTest.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
|||||||
#include "LibgpiodTest.h"
|
#include "LibgpiodTest.h"
|
||||||
|
|
||||||
#include "devices/gpioIds.h"
|
#include <fsfwconfig/devices/gpioIds.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
|
|
||||||
LibgpiodTest::LibgpiodTest(object_id_t objectId, object_id_t gpioIfobjectId, GpioCookie* gpioCookie) :
|
LibgpiodTest::LibgpiodTest(object_id_t objectId, object_id_t gpioIfobjectId,
|
||||||
|
GpioCookie* gpioCookie):
|
||||||
TestTask(objectId) {
|
TestTask(objectId) {
|
||||||
|
|
||||||
gpioInterface = objectManager->get<GpioIF>(gpioIfobjectId);
|
gpioInterface = objectManager->get<GpioIF>(gpioIfobjectId);
|
@ -2,8 +2,8 @@
|
|||||||
#define TEST_TESTTASKS_LIBGPIODTEST_H_
|
#define TEST_TESTTASKS_LIBGPIODTEST_H_
|
||||||
|
|
||||||
#include "TestTask.h"
|
#include "TestTask.h"
|
||||||
#include "GpioIF.h"
|
#include <linux/gpio/GpioIF.h>
|
||||||
#include "GpioCookie.h"
|
#include <linux/gpio/GpioCookie.h>
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,8 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${TARGET_NAME} PRIVATE
|
||||||
cookies/CspCookie.cpp
|
|
||||||
cookies/I2cCookie.cpp
|
|
||||||
CspComIF.cpp
|
|
||||||
I2cComIF.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
|
||||||
cookies/GpioCookie.cpp
|
|
||||||
LinuxLibgpioIF.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PUBLIC
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cookies
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 7d0916a44e18c87b00998448333023186b3d85b1
|
Subproject commit c28398257b68facbabb19d7228b045f1388305df
|
@ -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 {
|
||||||
|
5
linux/CMakeLists.txt
Normal file
5
linux/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
add_subdirectory(gpio)
|
||||||
|
add_subdirectory(i2c)
|
||||||
|
add_subdirectory(csp)
|
||||||
|
add_subdirectory(spi)
|
||||||
|
|
8
linux/csp/CMakeLists.txt
Normal file
8
linux/csp/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
target_sources(${TARGET_NAME} PUBLIC
|
||||||
|
CspComIF.cpp
|
||||||
|
CspCookie.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
#include "CspComIF.h"
|
#include "CspComIF.h"
|
||||||
#include "cookies/CspCookie.h"
|
#include "CspCookie.h"
|
||||||
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
#include <csp/drivers/can_socketcan.h>
|
#include <csp/drivers/can_socketcan.h>
|
||||||
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
CspComIF::CspComIF(object_id_t objectId) :
|
CspComIF::CspComIF(object_id_t objectId) :
|
||||||
SystemObject(objectId) {
|
SystemObject(objectId) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CspComIF::~CspComIF() {
|
CspComIF::~CspComIF() {
|
8
linux/gpio/CMakeLists.txt
Normal file
8
linux/gpio/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
target_sources(${TARGET_NAME} PUBLIC
|
||||||
|
GpioCookie.cpp
|
||||||
|
LinuxLibgpioIF.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#include <bsp_q7s/gpio/cookies/GpioCookie.h>
|
#include "GpioCookie.h"
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
|
|
||||||
GpioCookie::GpioCookie() {
|
GpioCookie::GpioCookie() {
|
@ -1,17 +1,17 @@
|
|||||||
#ifndef SAM9G20_COMIF_COOKIES_GPIO_COOKIE_H_
|
#ifndef SAM9G20_COMIF_COOKIES_GPIO_COOKIE_H_
|
||||||
#define SAM9G20_COMIF_COOKIES_GPIO_COOKIE_H_
|
#define SAM9G20_COMIF_COOKIES_GPIO_COOKIE_H_
|
||||||
|
|
||||||
|
#include "GpioIF.h"
|
||||||
#include <fsfw/devicehandlers/CookieIF.h>
|
#include <fsfw/devicehandlers/CookieIF.h>
|
||||||
#include <bsp_q7s/gpio/GpioIF.h>
|
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace Gpio {
|
namespace gpio {
|
||||||
enum Direction {
|
enum Direction {
|
||||||
IN = 0,
|
IN = 0,
|
||||||
OUT = 1
|
OUT = 1
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,17 +29,17 @@ namespace Gpio {
|
|||||||
* pointer.
|
* pointer.
|
||||||
*/
|
*/
|
||||||
typedef struct GpioConfig {
|
typedef struct GpioConfig {
|
||||||
GpioConfig(std::string chipname_, int lineNum_, std::string consumer_,
|
GpioConfig(std::string chipname_, int lineNum_, std::string consumer_,
|
||||||
Gpio::Direction direction_, int initValue_) :
|
gpio::Direction direction_, int initValue_) :
|
||||||
chipname(chipname_), lineNum(lineNum_), consumer(consumer_), direction(
|
chipname(chipname_), lineNum(lineNum_), consumer(consumer_), direction(direction_),
|
||||||
direction_), initValue(initValue_) {
|
initValue(initValue_) {
|
||||||
}
|
}
|
||||||
std::string chipname;
|
std::string chipname;
|
||||||
int lineNum;
|
int lineNum;
|
||||||
std::string consumer;
|
std::string consumer;
|
||||||
Gpio::Direction direction;
|
gpio::Direction direction;
|
||||||
int initValue;
|
int initValue;
|
||||||
struct gpiod_line* lineHandle;
|
struct gpiod_line* lineHandle = nullptr;
|
||||||
} GpioConfig_t;
|
} GpioConfig_t;
|
||||||
using GpioMap = std::unordered_map<gpioId_t, GpioConfig_t>;
|
using GpioMap = std::unordered_map<gpioId_t, GpioConfig_t>;
|
||||||
using GpioMapIter = GpioMap::iterator;
|
using GpioMapIter = GpioMap::iterator;
|
||||||
@ -57,20 +57,20 @@ using GpioMapIter = GpioMap::iterator;
|
|||||||
class GpioCookie: public CookieIF {
|
class GpioCookie: public CookieIF {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
GpioCookie();
|
GpioCookie();
|
||||||
|
|
||||||
virtual ~GpioCookie();
|
virtual ~GpioCookie();
|
||||||
|
|
||||||
void addGpio(gpioId_t gpioId, GpioConfig_t gpioConfig);
|
void addGpio(gpioId_t gpioId, GpioConfig_t gpioConfig);
|
||||||
/**
|
/**
|
||||||
* @brief Get map with registered GPIOs.
|
* @brief Get map with registered GPIOs.
|
||||||
*/
|
*/
|
||||||
GpioMap getGpioMap() const;
|
GpioMap getGpioMap() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
GpioMap gpioMap;
|
GpioMap gpioMap;
|
||||||
GpioMapIter gpioMapIter;
|
GpioMapIter gpioMapIter;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,5 +1,5 @@
|
|||||||
#include <bsp_q7s/gpio/LinuxLibgpioIF.h>
|
#include "LinuxLibgpioIF.h"
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -12,36 +12,36 @@ LinuxLibgpioIF::~LinuxLibgpioIF() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t LinuxLibgpioIF::initialize(CookieIF * cookie){
|
ReturnValue_t LinuxLibgpioIF::initialize(CookieIF * cookie){
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
GpioMap mapToAdd;
|
GpioMap mapToAdd;
|
||||||
|
|
||||||
if(cookie == nullptr) {
|
if(cookie == nullptr) {
|
||||||
sif::error << "LinuxLibgpioIF::initialize: Invalid cookie" << std::endl;
|
sif::error << "LinuxLibgpioIF::initialize: Invalid cookie" << std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
GpioCookie* gpioCookie = dynamic_cast<GpioCookie*>(cookie);
|
GpioCookie* gpioCookie = dynamic_cast<GpioCookie*>(cookie);
|
||||||
if(gpioCookie == nullptr) {
|
if(gpioCookie == nullptr) {
|
||||||
sif::error << "LinuxLibgpioIF: Invalid Gpio Cookie!"
|
sif::error << "LinuxLibgpioIF: Invalid Gpio Cookie!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
mapToAdd = gpioCookie->getGpioMap();
|
mapToAdd = gpioCookie->getGpioMap();
|
||||||
|
|
||||||
result = checkForConflicts(mapToAdd);
|
result = checkForConflicts(mapToAdd);
|
||||||
if (result != RETURN_OK){
|
if (result != RETURN_OK){
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = configureGpios(&mapToAdd);
|
result = configureGpios(&mapToAdd);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register new GPIOs in gpioMap*/
|
/* Register new GPIOs in gpioMap*/
|
||||||
gpioMap.insert(mapToAdd.begin(), mapToAdd.end());
|
gpioMap.insert(mapToAdd.begin(), mapToAdd.end());
|
||||||
|
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap* mapToAdd) {
|
ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap* mapToAdd) {
|
||||||
@ -49,7 +49,7 @@ ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap* mapToAdd) {
|
|||||||
std::string chipname;
|
std::string chipname;
|
||||||
unsigned int lineNum;
|
unsigned int lineNum;
|
||||||
struct gpiod_chip *chip;
|
struct gpiod_chip *chip;
|
||||||
Gpio::Direction direction;
|
gpio::Direction direction;
|
||||||
std::string consumer;
|
std::string consumer;
|
||||||
struct gpiod_line *lineHandle;
|
struct gpiod_line *lineHandle;
|
||||||
int result;
|
int result;
|
||||||
@ -77,7 +77,7 @@ ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap* mapToAdd) {
|
|||||||
consumer = mapToAddIter->second.consumer;
|
consumer = mapToAddIter->second.consumer;
|
||||||
/* Configure direction and add a description to the GPIO */
|
/* Configure direction and add a description to the GPIO */
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case Gpio::OUT:
|
case gpio::OUT:
|
||||||
result = gpiod_line_request_output(lineHandle, consumer.c_str(),
|
result = gpiod_line_request_output(lineHandle, consumer.c_str(),
|
||||||
mapToAddIter->second.initValue);
|
mapToAddIter->second.initValue);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
@ -88,7 +88,7 @@ ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap* mapToAdd) {
|
|||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Gpio::IN:
|
case gpio::IN:
|
||||||
result = gpiod_line_request_input(lineHandle, consumer.c_str());
|
result = gpiod_line_request_input(lineHandle, consumer.c_str());
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
sif::error << "LinuxLibgpioIF::configureGpios: Failed to request line "
|
sif::error << "LinuxLibgpioIF::configureGpios: Failed to request line "
|
||||||
@ -100,7 +100,7 @@ ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap* mapToAdd) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sif::error << "LinuxLibgpioIF::configureGpios: Invalid direction specified"
|
sif::error << "LinuxLibgpioIF::configureGpios: Invalid direction specified"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -113,33 +113,33 @@ ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap* mapToAdd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t LinuxLibgpioIF::pullHigh(gpioId_t gpioId){
|
ReturnValue_t LinuxLibgpioIF::pullHigh(gpioId_t gpioId){
|
||||||
return driveGpio(gpioId, 1);
|
return driveGpio(gpioId, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t LinuxLibgpioIF::pullLow(gpioId_t gpioId){
|
ReturnValue_t LinuxLibgpioIF::pullLow(gpioId_t gpioId){
|
||||||
return driveGpio(gpioId, 0);
|
return driveGpio(gpioId, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t LinuxLibgpioIF::driveGpio(gpioId_t gpioId,
|
ReturnValue_t LinuxLibgpioIF::driveGpio(gpioId_t gpioId,
|
||||||
unsigned int logiclevel) {
|
unsigned int logiclevel) {
|
||||||
int result;
|
int result;
|
||||||
struct gpiod_line *lineHandle;
|
struct gpiod_line *lineHandle;
|
||||||
|
|
||||||
gpioMapIter = gpioMap.find(gpioId);
|
gpioMapIter = gpioMap.find(gpioId);
|
||||||
if (gpioMapIter == gpioMap.end()){
|
if (gpioMapIter == gpioMap.end()){
|
||||||
sif::debug << "LinuxLibgpioIF::driveGpio: Unknown gpio id " << gpioId << std::endl;
|
sif::debug << "LinuxLibgpioIF::driveGpio: Unknown gpio id " << gpioId << std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
lineHandle = gpioMapIter->second.lineHandle;
|
lineHandle = gpioMapIter->second.lineHandle;
|
||||||
result = gpiod_line_set_value(lineHandle, logiclevel);
|
result = gpiod_line_set_value(lineHandle, logiclevel);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
sif::error << "LinuxLibgpioIF::driveGpio: Failed to pull GPIO with ID "
|
sif::error << "LinuxLibgpioIF::driveGpio: Failed to pull GPIO with ID "
|
||||||
<< gpioId << " to logic level " << logiclevel << std::endl;
|
<< gpioId << " to logic level " << logiclevel << std::endl;
|
||||||
return DRIVE_GPIO_FAILURE;
|
return DRIVE_GPIO_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t LinuxLibgpioIF::readGpio(gpioId_t gpioId, int* gpioState) {
|
ReturnValue_t LinuxLibgpioIF::readGpio(gpioId_t gpioId, int* gpioState) {
|
||||||
@ -158,23 +158,23 @@ ReturnValue_t LinuxLibgpioIF::readGpio(gpioId_t gpioId, int* gpioState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t LinuxLibgpioIF::checkForConflicts(GpioMap mapToAdd){
|
ReturnValue_t LinuxLibgpioIF::checkForConflicts(GpioMap mapToAdd){
|
||||||
gpioId_t gpioId;
|
gpioId_t gpioId;
|
||||||
GpioMapIter mapToAddIter = mapToAdd.begin();
|
GpioMapIter mapToAddIter = mapToAdd.begin();
|
||||||
for(; mapToAddIter != mapToAdd.end(); mapToAddIter++){
|
for(; mapToAddIter != mapToAdd.end(); mapToAddIter++){
|
||||||
gpioId = mapToAddIter->first;
|
gpioId = mapToAddIter->first;
|
||||||
gpioMapIter = gpioMap.find(gpioId);
|
gpioMapIter = gpioMap.find(gpioId);
|
||||||
if(gpioMapIter != mapToAdd.end()){
|
if(gpioMapIter != mapToAdd.end()){
|
||||||
/* An entry for this GPIO already exists. Check if configuration
|
/* An entry for this GPIO already exists. Check if configuration
|
||||||
* of direction is equivalent */
|
* of direction is equivalent */
|
||||||
if (mapToAddIter->second.direction != gpioMapIter->second.direction){
|
if (mapToAddIter->second.direction != gpioMapIter->second.direction){
|
||||||
sif::error << "LinuxLibgpioIF::checkForConflicts: Detected conflict "
|
sif::error << "LinuxLibgpioIF::checkForConflicts: Detected conflict "
|
||||||
<< "for GPIO " << mapToAddIter->first << std::endl;
|
<< "for GPIO " << mapToAddIter->first << std::endl;
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
/* Remove element from map to add because a entry for this GPIO
|
/* Remove element from map to add because a entry for this GPIO
|
||||||
* already exists */
|
* already exists */
|
||||||
mapToAdd.erase(mapToAddIter);
|
mapToAdd.erase(mapToAddIter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef BSP_Q7S_GPIO_LINUXLIBGPIOIF_H_
|
#ifndef BSP_Q7S_GPIO_LINUXLIBGPIOIF_H_
|
||||||
#define BSP_Q7S_GPIO_LINUXLIBGPIOIF_H_
|
#define BSP_Q7S_GPIO_LINUXLIBGPIOIF_H_
|
||||||
|
|
||||||
#include <bsp_q7s/gpio/GpioIF.h>
|
#include <linux/gpio/GpioIF.h>
|
||||||
|
#include <linux/gpio/GpioCookie.h>
|
||||||
#include <fsfwconfig/returnvalues/classIds.h>
|
#include <fsfwconfig/returnvalues/classIds.h>
|
||||||
#include <bsp_q7s/gpio/cookies/GpioCookie.h>
|
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
|
|
||||||
/**
|
/**
|
8
linux/i2c/CMakeLists.txt
Normal file
8
linux/i2c/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
target_sources(${TARGET_NAME} PUBLIC
|
||||||
|
I2cComIF.cpp
|
||||||
|
I2cCookie.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
|||||||
#include <bsp_q7s/comIF/I2cComIF.h>
|
#include "I2cComIF.h"
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef BSP_Q7S_COMIF_I2COMIF_H_
|
#ifndef BSP_Q7S_COMIF_I2COMIF_H_
|
||||||
#define BSP_Q7S_COMIF_I2COMIF_H_
|
#define BSP_Q7S_COMIF_I2COMIF_H_
|
||||||
|
|
||||||
|
#include "I2cCookie.h"
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||||
#include <bsp_q7s/comIF/cookies/I2cCookie.h>
|
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
@ -1,4 +1,4 @@
|
|||||||
#include <bsp_q7s/comIF/cookies/I2cCookie.h>
|
#include "I2cCookie.h"
|
||||||
|
|
||||||
I2cCookie::I2cCookie(address_t i2cAddress_, size_t maxReplyLen_,
|
I2cCookie::I2cCookie(address_t i2cAddress_, size_t maxReplyLen_,
|
||||||
std::string deviceFile_) :
|
std::string deviceFile_) :
|
6
linux/spi/CMakeLists.txt
Normal file
6
linux/spi/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
target_sources(${TARGET_NAME} PUBLIC
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -219,6 +219,9 @@
|
|||||||
</cconfiguration>
|
</cconfiguration>
|
||||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851">
|
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851">
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851" moduleId="org.eclipse.cdt.core.settings" name="eive-rpi-debug-win">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851" moduleId="org.eclipse.cdt.core.settings" name="eive-rpi-debug-win">
|
||||||
|
<macros>
|
||||||
|
<stringMacro name="RPI_SYSROOT" type="VALUE_TEXT" value="C:\Users\Robin\raspberrypi\rootfs"/>
|
||||||
|
</macros>
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
@ -315,6 +318,7 @@
|
|||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.2065184927" name="GNU Arm Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.2065184927" name="GNU Arm Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1596179531" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1596179531" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${RPI_SYSROOT}/usr/include""/>
|
||||||
</option>
|
</option>
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.864441147" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.864441147" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||||
<listOptionValue builtIn="false" value="LINUX=1"/>
|
<listOptionValue builtIn="false" value="LINUX=1"/>
|
||||||
@ -324,6 +328,7 @@
|
|||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1595165802" name="GNU Arm Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1595165802" name="GNU Arm Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1606583601" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1606583601" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${RPI_SYSROOT}/usr/include""/>
|
||||||
</option>
|
</option>
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1683468766" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1683468766" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||||
<listOptionValue builtIn="false" value="LINUX=1"/>
|
<listOptionValue builtIn="false" value="LINUX=1"/>
|
||||||
@ -355,7 +360,7 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -363,6 +368,9 @@
|
|||||||
</cconfiguration>
|
</cconfiguration>
|
||||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171">
|
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171">
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171" moduleId="org.eclipse.cdt.core.settings" name="eive-rpi-release-win">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171" moduleId="org.eclipse.cdt.core.settings" name="eive-rpi-release-win">
|
||||||
|
<macros>
|
||||||
|
<stringMacro name="RPI_SYSROOT" type="VALUE_TEXT" value="C:\Users\Robin\raspberrypi\rootfs"/>
|
||||||
|
</macros>
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
@ -459,6 +467,7 @@
|
|||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.193772074" name="GNU Arm Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.193772074" name="GNU Arm Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.606914861" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.606914861" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${RPI_SYSROOT}/usr/include""/>
|
||||||
</option>
|
</option>
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1796598598" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1796598598" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||||
<listOptionValue builtIn="false" value="LINUX=1"/>
|
<listOptionValue builtIn="false" value="LINUX=1"/>
|
||||||
@ -468,6 +477,7 @@
|
|||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.2044466190" name="GNU Arm Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.2044466190" name="GNU Arm Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.77129276" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.77129276" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${RPI_SYSROOT}/usr/include""/>
|
||||||
</option>
|
</option>
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1881223360" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1881223360" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||||
<listOptionValue builtIn="false" value="LINUX=1"/>
|
<listOptionValue builtIn="false" value="LINUX=1"/>
|
||||||
@ -499,7 +509,7 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -507,6 +517,9 @@
|
|||||||
</cconfiguration>
|
</cconfiguration>
|
||||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689">
|
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689">
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689" moduleId="org.eclipse.cdt.core.settings" name="eive-q7s-debug-win">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689" moduleId="org.eclipse.cdt.core.settings" name="eive-q7s-debug-win">
|
||||||
|
<macros>
|
||||||
|
<stringMacro name="Q7S_SYSROOT" type="VALUE_TEXT" value="C:\Xilinx\cortexa9hf-neon-xiphos-linux-gnueabi"/>
|
||||||
|
</macros>
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
@ -612,6 +625,7 @@
|
|||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1535302916" name="GNU Arm Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1535302916" name="GNU Arm Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1607430527" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1607430527" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/eive_obsw}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${Q7S_SYSROOT}/usr/include""/>
|
||||||
</option>
|
</option>
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1199844227" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1199844227" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||||
<listOptionValue builtIn="false" value="LINUX=1"/>
|
<listOptionValue builtIn="false" value="LINUX=1"/>
|
||||||
@ -643,7 +657,7 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -787,7 +801,7 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -795,19 +809,26 @@
|
|||||||
</cconfiguration>
|
</cconfiguration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<project id="eive_obsw.null.1062489770" name="eive_obsw"/>
|
<project id="eive_obsw.null.1569861610" name="eive_obsw"/>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
<configuration configurationName="eive-linux-host-debug">
|
<configuration configurationName="eive-linux-host-debug"/>
|
||||||
|
<configuration configurationName="eive-q7s-release-win">
|
||||||
<resource resourceType="PROJECT" workspacePath="/eive_obsw"/>
|
<resource resourceType="PROJECT" workspacePath="/eive_obsw"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration configurationName="eive-mingw-release"/>
|
||||||
|
<configuration configurationName="eive-rpi-release-win"/>
|
||||||
|
<configuration configurationName="eive-linux-host-release"/>
|
||||||
<configuration configurationName="eive-mingw-debug">
|
<configuration configurationName="eive-mingw-debug">
|
||||||
<resource resourceType="PROJECT" workspacePath="/eive_obsw"/>
|
<resource resourceType="PROJECT" workspacePath="/eive_obsw"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration configurationName="Default">
|
<configuration configurationName="Default">
|
||||||
<resource resourceType="PROJECT" workspacePath="/eive_obsw"/>
|
<resource resourceType="PROJECT" workspacePath="/eive_obsw"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration configurationName="eive-rpi-debug-win"/>
|
||||||
|
<configuration configurationName="eive-q7s-debug-win"/>
|
||||||
|
<configuration configurationName="eive-rpi-debug"/>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
|
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
|
||||||
<doc-comment-owner id="org.eclipse.cdt.ui.doxygen">
|
<doc-comment-owner id="org.eclipse.cdt.ui.doxygen">
|
||||||
@ -816,17 +837,9 @@
|
|||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||||
<buildTargets>
|
<buildTargets>
|
||||||
<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
|
||||||
<buildCommand>make</buildCommand>
|
|
||||||
<buildArguments>-j16</buildArguments>
|
|
||||||
<buildTarget>clean</buildTarget>
|
|
||||||
<stopOnError>true</stopOnError>
|
|
||||||
<useDefaultCommand>true</useDefaultCommand>
|
|
||||||
<runAllBuilders>true</runAllBuilders>
|
|
||||||
</target>
|
|
||||||
<target name="hardclean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
<target name="hardclean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
<buildCommand>make</buildCommand>
|
<buildCommand>make</buildCommand>
|
||||||
<buildArguments>-j16</buildArguments>
|
<buildArguments>-f Makefile-Hosted -j16</buildArguments>
|
||||||
<buildTarget>hardclean</buildTarget>
|
<buildTarget>hardclean</buildTarget>
|
||||||
<stopOnError>true</stopOnError>
|
<stopOnError>true</stopOnError>
|
||||||
<useDefaultCommand>true</useDefaultCommand>
|
<useDefaultCommand>true</useDefaultCommand>
|
||||||
@ -836,10 +849,28 @@
|
|||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="scannerConfiguration">
|
<storageModule moduleId="scannerConfiguration">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.2047596104;cdt.managedbuild.toolchain.gnu.base.2047596104.1629235648;cdt.managedbuild.tool.gnu.c.compiler.base.1751527394;cdt.managedbuild.tool.gnu.c.compiler.input.72239787">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.2065184927;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.920837857">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.2047596104;cdt.managedbuild.toolchain.gnu.base.2047596104.1629235648;cdt.managedbuild.tool.gnu.cpp.compiler.base.1852610587;cdt.managedbuild.tool.gnu.cpp.compiler.input.1985567520">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.628631287;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.216437361">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1535302916;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.96000231">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1031020513;cdt.managedbuild.toolchain.gnu.mingw.base.1031020513.519944638;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.438317679;cdt.managedbuild.tool.gnu.c.compiler.input.336445831">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1595165802;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1925043110">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.2044466190;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1551006500">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1031020513;cdt.managedbuild.toolchain.gnu.mingw.base.1031020513.519944638;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.205410786;cdt.managedbuild.tool.gnu.cpp.compiler.input.1560428812">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.193772074;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.2081570054">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
|
@ -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;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${TARGET_NAME} PUBLIC
|
||||||
LibgpiodTest.cpp
|
|
||||||
TestTask.cpp
|
TestTask.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* MutextestTask.cpp
|
|
||||||
*
|
|
||||||
* Created on: 19.07.2018
|
|
||||||
* Author: mohr
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <test/testtasks/MutextestTask.h>
|
|
||||||
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
|
||||||
|
|
||||||
MutexIF * MutextestTask::mutex = nullptr;
|
|
||||||
|
|
||||||
MutextestTask::MutextestTask(const char *name, object_id_t setObjectId) :
|
|
||||||
SystemObject(setObjectId), name(name), locked(false) {
|
|
||||||
if (mutex == NULL) {
|
|
||||||
mutex = MutexFactory::instance()->createMutex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t MutextestTask::performOperation(uint8_t operationCode) {
|
|
||||||
if (!locked){
|
|
||||||
sif::info << name << ": locking..." << std::endl;
|
|
||||||
ReturnValue_t result = mutex->lockMutex(MutexIF::BLOCKING);
|
|
||||||
sif::info << name << ": locked with " << (int) result << std::endl;
|
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK){
|
|
||||||
locked = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
sif::info << name << ": releasing" << std::endl;
|
|
||||||
mutex->unlockMutex();
|
|
||||||
locked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
MutextestTask::~MutextestTask() {
|
|
||||||
// TODO Auto-generated destructor stub
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* MutextestTask.h
|
|
||||||
*
|
|
||||||
* Created on: 19.07.2018
|
|
||||||
* Author: mohr
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MISSION_MUTEXTESTTASK_H_
|
|
||||||
#define MISSION_MUTEXTESTTASK_H_
|
|
||||||
|
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
|
||||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
|
||||||
#include <fsfw/ipc/MutexFactory.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Start two of them with a little time difference and different periods to see mutex in action
|
|
||||||
*/
|
|
||||||
|
|
||||||
class MutextestTask: public SystemObject, public ExecutableObjectIF {
|
|
||||||
public:
|
|
||||||
|
|
||||||
virtual ReturnValue_t performOperation(uint8_t operationCode = 0);
|
|
||||||
|
|
||||||
MutextestTask(const char *name, object_id_t setObjectId);
|
|
||||||
virtual ~MutextestTask();
|
|
||||||
private:
|
|
||||||
static MutexIF *mutex;
|
|
||||||
const char * name;
|
|
||||||
bool locked;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* MISSION_MUTEXTESTTASK_H_ */
|
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 110ec9644a520af9c6f4cb7f2b5d47f3d34ba256
|
Subproject commit 2b85ece07195ee905c35b35494bc7a86b94335f5
|
Loading…
Reference in New Issue
Block a user