fix compilation for rpi
This commit is contained in:
parent
3387a71399
commit
1400945d99
@ -16,6 +16,7 @@ set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
option(EIVE_BUILD_UNITTESTS "Build Catch2 unittests" OFF)
|
||||
option(EIVE_ADD_ETL_LIB "Add ETL library" ON)
|
||||
option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
|
||||
|
||||
option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF)
|
||||
|
||||
if(NOT FSFW_OSAL)
|
||||
@ -24,6 +25,9 @@ endif()
|
||||
|
||||
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
||||
option(LINUX_CROSS_COMPILE ON)
|
||||
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
|
||||
else()
|
||||
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
|
||||
endif()
|
||||
|
||||
# Perform steps like loading toolchain files where applicable.
|
||||
|
@ -1,4 +1,4 @@
|
||||
target_sources(${TARGET_NAME} PUBLIC
|
||||
target_sources(${OBSW_NAME} PUBLIC
|
||||
InitMission.cpp
|
||||
main.cpp
|
||||
ObjectFactory.cpp
|
||||
|
@ -1,7 +1,7 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
print.c
|
||||
)
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
target_include_directories(${OBSW_NAME} PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
@ -1,4 +1,4 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
)
|
||||
|
||||
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 0d6d44f72fb28ba480482f5d8b2eee6f78d664ce
|
||||
Subproject commit 508979d32d4e5910259bfb52b8fe16d1bb4f1cdb
|
@ -15,7 +15,9 @@
|
||||
|
||||
#include <bitset>
|
||||
|
||||
#if defined(XIPHOS_Q7S)
|
||||
#include "busConf.h"
|
||||
#endif
|
||||
#include "devices/gpioIds.h"
|
||||
#include "mission/devices/max1227.h"
|
||||
|
||||
|
@ -3,3 +3,9 @@ target_sources(${OBSW_NAME} PRIVATE
|
||||
PayloadPcduHandler.cpp
|
||||
SusHandler.cpp
|
||||
)
|
||||
|
||||
if(EIVE_BUILD_GPSD_GPS_HANDLER)
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
GPSHyperionLinuxController.cpp
|
||||
)
|
||||
endif()
|
||||
|
63
linux/devices/devicedefinitions/GPSDefinitions.h
Normal file
63
linux/devices/devicedefinitions/GPSDefinitions.h
Normal file
@ -0,0 +1,63 @@
|
||||
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_
|
||||
#define MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_
|
||||
|
||||
#include "fsfw/datapoollocal/StaticLocalDataSet.h"
|
||||
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
|
||||
|
||||
namespace GpsHyperion {
|
||||
|
||||
static constexpr DeviceCommandId_t GPS_REPLY = 0;
|
||||
static constexpr DeviceCommandId_t TRIGGER_RESET_PIN = 5;
|
||||
|
||||
static constexpr uint32_t DATASET_ID = 0;
|
||||
|
||||
enum GpsPoolIds : lp_id_t {
|
||||
LATITUDE = 0,
|
||||
LONGITUDE = 1,
|
||||
ALTITUDE = 2,
|
||||
SPEED = 3,
|
||||
FIX_MODE = 4,
|
||||
SATS_IN_USE = 5,
|
||||
SATS_IN_VIEW = 6,
|
||||
UNIX_SECONDS = 7,
|
||||
YEAR = 8,
|
||||
MONTH = 9,
|
||||
DAY = 10,
|
||||
HOURS = 11,
|
||||
MINUTES = 12,
|
||||
SECONDS = 13
|
||||
};
|
||||
|
||||
enum GpsFixModes : uint8_t { INVALID = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 };
|
||||
|
||||
} // namespace GpsHyperion
|
||||
|
||||
class GpsPrimaryDataset : public StaticLocalDataSet<18> {
|
||||
public:
|
||||
GpsPrimaryDataset(object_id_t gpsId) : StaticLocalDataSet(sid_t(gpsId, GpsHyperion::DATASET_ID)) {
|
||||
setAllVariablesReadOnly();
|
||||
}
|
||||
|
||||
lp_var_t<double> latitude = lp_var_t<double>(sid.objectId, GpsHyperion::LATITUDE, this);
|
||||
lp_var_t<double> longitude = lp_var_t<double>(sid.objectId, GpsHyperion::LONGITUDE, this);
|
||||
lp_var_t<double> altitude = lp_var_t<double>(sid.objectId, GpsHyperion::ALTITUDE, this);
|
||||
lp_var_t<double> speed = lp_var_t<double>(sid.objectId, GpsHyperion::SPEED, this);
|
||||
lp_var_t<uint8_t> fixMode = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::FIX_MODE, this);
|
||||
lp_var_t<uint8_t> satInUse = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SATS_IN_USE, this);
|
||||
lp_var_t<uint8_t> satInView = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SATS_IN_VIEW, this);
|
||||
lp_var_t<uint16_t> year = lp_var_t<uint16_t>(sid.objectId, GpsHyperion::YEAR, this);
|
||||
lp_var_t<uint8_t> month = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::MONTH, this);
|
||||
lp_var_t<uint8_t> day = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::DAY, this);
|
||||
lp_var_t<uint8_t> hours = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::HOURS, this);
|
||||
lp_var_t<uint8_t> minutes = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::MINUTES, this);
|
||||
lp_var_t<uint8_t> seconds = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SECONDS, this);
|
||||
lp_var_t<uint32_t> unixSeconds =
|
||||
lp_var_t<uint32_t>(sid.objectId, GpsHyperion::UNIX_SECONDS, this);
|
||||
|
||||
private:
|
||||
friend class GPSHyperionLinuxController;
|
||||
GpsPrimaryDataset(HasLocalDataPoolIF* hkOwner)
|
||||
: StaticLocalDataSet(hkOwner, GpsHyperion::DATASET_ID) {}
|
||||
};
|
||||
|
||||
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_ */
|
@ -1,5 +1,4 @@
|
||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
||||
GPSHyperionLinuxController.cpp
|
||||
GomspaceDeviceHandler.cpp
|
||||
BpxBatteryHandler.cpp
|
||||
Tmp1075Handler.cpp
|
||||
|
Loading…
x
Reference in New Issue
Block a user