Merge remote-tracking branch 'origin/develop' into meier/ReactionWheelHandler

This commit is contained in:
2021-07-05 15:38:04 +02:00
committed by Robin Mueller
26 changed files with 380 additions and 112 deletions

View File

@ -1,12 +1,14 @@
target_sources(${TARGET_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp
)
add_subdirectory(boardconfig)
add_subdirectory(comIF)
add_subdirectory(boardtest)
add_subdirectory(gpio)
add_subdirectory(core)
add_subdirectory(spiCallbacks)
if(Q7S_SIMPLE_MODE)
add_subdirectory(simple)
else()
add_subdirectory(boardconfig)
add_subdirectory(comIF)
add_subdirectory(boardtest)
add_subdirectory(gpio)
add_subdirectory(core)
add_subdirectory(spiCallbacks)
endif()

View File

@ -1,6 +1,7 @@
#ifndef BSP_Q7S_BOARDCONFIG_Q7S_CONFIG_H_
#define BSP_Q7S_BOARDCONFIG_Q7S_CONFIG_H_
#cmakedefine01 Q7S_SIMPLE_MODE
#define Q7S_ADD_RTD_DEVICES 0
/* Only one of those 2 should be enabled! */

View File

@ -1,6 +0,0 @@
CXXSRC += $(wildcard $(CURRENTPATH)/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/comIF/cookies/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/comIF/*.cpp)
CSRC += $(wildcard $(CURRENTPATH)/*.c)
CSRC += $(wildcard $(CURRENTPATH)/boardconfig/*.c)

View File

@ -1,3 +1,6 @@
target_sources(${TARGET_NAME} PRIVATE
CoreController.cpp
obsw.cpp
InitMission.cpp
ObjectFactory.cpp
)

25
bsp_q7s/core/obsw.cpp Normal file
View File

@ -0,0 +1,25 @@
#include "obsw.h"
#include "OBSWVersion.h"
#include "InitMission.h"
#include "fsfw/tasks/TaskFactory.h"
#include <iostream>
int obsw::obsw() {
std::cout << "-- EIVE OBSW --" << std::endl;
#if TE0720 == 0
std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl;
#else
std::cout << "-- Compiled for Linux (TE0720) --" << std::endl;
#endif
std::cout << "-- Software version " << SW_NAME << " v" << SW_VERSION << "."
<< SW_SUBVERSION << "." << SW_SUBSUBVERSION << " -- " << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();
for(;;) {
/* Suspend main thread by sleeping it. */
TaskFactory::delayTask(5000);
}
return 0;
}

10
bsp_q7s/core/obsw.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef BSP_Q7S_CORE_OBSW_H_
#define BSP_Q7S_CORE_OBSW_H_
namespace obsw {
int obsw();
};
#endif /* BSP_Q7S_CORE_OBSW_H_ */

View File

@ -1,11 +1,10 @@
#include "InitMission.h"
#include <OBSWVersion.h>
#include <fsfw/tasks/TaskFactory.h>
#include "OBSWConfig.h"
#include "q7sConfig.h"
#include <iostream>
#include <unistd.h>
#if Q7S_SIMPLE_MODE == 0
#include "core/obsw.h"
#else
#include "simple/simple.h"
#endif
/**
* @brief This is the main program for the target hardware.
@ -13,22 +12,9 @@
*/
int main(void)
{
std::cout << "-- EIVE OBSW --" << std::endl;
#if TE0720 == 0
std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl;
#if Q7S_SIMPLE_MODE == 0
return obsw::obsw();
#else
std::cout << "-- Compiled for Linux (TE0720) --" << std::endl;
return simple::simple();
#endif
std::cout << "-- Software version " << SW_NAME << " v" << SW_VERSION << "."
<< SW_SUBVERSION << "." << SW_SUBSUBVERSION << " -- " << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();
for(;;) {
/* Suspend main thread by sleeping it. */
TaskFactory::delayTask(5000);
}
}

View File

@ -0,0 +1,3 @@
target_sources(${TARGET_NAME} PRIVATE
simple.cpp
)

View File

@ -0,0 +1,5 @@
#include "simple.h"
int simple::simple() {
return 0;
}

10
bsp_q7s/simple/simple.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef BSP_Q7S_SIMPLE_SIMPLE_H_
#define BSP_Q7S_SIMPLE_SIMPLE_H_
namespace simple {
int simple();
}
#endif /* BSP_Q7S_SIMPLE_SIMPLE_H_ */