Update Power Modules #287
@ -170,6 +170,9 @@ set(LIB_ETL_TARGET etl::etl)
|
|||||||
set(LIB_CSP_NAME libcsp)
|
set(LIB_CSP_NAME libcsp)
|
||||||
set(LIB_LWGPS_NAME lwgps)
|
set(LIB_LWGPS_NAME lwgps)
|
||||||
set(LIB_ARCSEC wire)
|
set(LIB_ARCSEC wire)
|
||||||
|
set(LIB_GOMSPACE_CLIENTS gs_clients)
|
||||||
|
set(LIB_GOMSPACE_CSP gs_csp)
|
||||||
|
|
||||||
set(THIRD_PARTY_FOLDER thirdparty)
|
set(THIRD_PARTY_FOLDER thirdparty)
|
||||||
set(LIB_CXX_FS -lstdc++fs)
|
set(LIB_CXX_FS -lstdc++fs)
|
||||||
set(LIB_CATCH2 Catch2)
|
set(LIB_CATCH2 Catch2)
|
||||||
@ -190,7 +193,6 @@ set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
|
|||||||
set(UNITTEST_CFG_PATH ${UNITTEST_PATH}/testcfg)
|
set(UNITTEST_CFG_PATH ${UNITTEST_PATH}/testcfg)
|
||||||
|
|
||||||
set(LIB_EIVE_MISSION_PATH mission)
|
set(LIB_EIVE_MISSION_PATH mission)
|
||||||
set(LIB_CSP_PATH ${THIRD_PARTY_FOLDER}/libcsp)
|
|
||||||
set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl)
|
set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl)
|
||||||
set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2)
|
set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2)
|
||||||
set(LIB_LWGPS_PATH ${THIRD_PARTY_FOLDER}/lwgps)
|
set(LIB_LWGPS_PATH ${THIRD_PARTY_FOLDER}/lwgps)
|
||||||
@ -218,8 +220,8 @@ if(TGT_BSP)
|
|||||||
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
||||||
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
||||||
set(EIVE_ADD_LINUX_FILES TRUE)
|
set(EIVE_ADD_LINUX_FILES TRUE)
|
||||||
set(ADD_CSP_LIB TRUE)
|
set(ADD_GOMSPACE_CSP TRUE)
|
||||||
set(ADD_GOMSPACE_LIB TRUE)
|
set(ADD_GOMSPACE_CLIENTS TRUE)
|
||||||
set(FSFW_HAL_ADD_LINUX ON)
|
set(FSFW_HAL_ADD_LINUX ON)
|
||||||
set(FSFW_HAL_LINUX_ADD_LIBGPIOD ON)
|
set(FSFW_HAL_LINUX_ADD_LIBGPIOD ON)
|
||||||
set(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS ON)
|
set(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS ON)
|
||||||
@ -321,9 +323,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||||||
"-Wcast-qual" # Warn if the constness is cast away
|
"-Wcast-qual" # Warn if the constness is cast away
|
||||||
"-Wstringop-overflow=4"
|
"-Wstringop-overflow=4"
|
||||||
# -Wstack-protector # Emits a few false positives for low level access
|
# -Wstack-protector # Emits a few false positives for low level access
|
||||||
# -Wconversion # Creates many false positives -Warith-conversion # Use with
|
# -Wconversion # Creates many false positives -Warith-conversion # Use
|
||||||
# Wconversion to find more implicit conversions -fanalyzer # Should be used
|
# with Wconversion to find more implicit conversions -fanalyzer # Should
|
||||||
# to look through problems
|
# be used to look through problems
|
||||||
)
|
)
|
||||||
target_compile_options(${OBSW_NAME} PRIVATE ${WARNING_FLAGS})
|
target_compile_options(${OBSW_NAME} PRIVATE ${WARNING_FLAGS})
|
||||||
target_compile_options(${LIB_EIVE_MISSION} PRIVATE ${WARNING_FLAGS})
|
target_compile_options(${LIB_EIVE_MISSION} PRIVATE ${WARNING_FLAGS})
|
||||||
@ -365,7 +367,7 @@ if(EIVE_ADD_LINUX_FILES)
|
|||||||
add_subdirectory(${LINUX_PATH})
|
add_subdirectory(${LINUX_PATH})
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(${BSP_PATH})
|
add_subdirectory(${BSP_PATH})
|
||||||
if(ADD_GOMSPACE_LIB)
|
if(ADD_GOMSPACE_CSP OR ADD_GOMSPACE_CLIENTS)
|
||||||
add_subdirectory(${LIB_GOMSPACE_PATH})
|
add_subdirectory(${LIB_GOMSPACE_PATH})
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(${COMMON_PATH})
|
add_subdirectory(${COMMON_PATH})
|
||||||
@ -458,8 +460,12 @@ if(TGT_BSP MATCHES "arm/egse")
|
|||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ADD_CSP_LIB)
|
if(ADD_GOMSPACE_CSP)
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_CSP_NAME} libp60client)
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_GOMSPACE_CSP})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ADD_GOMSPACE_CLIENTS)
|
||||||
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
|
@ -58,8 +58,8 @@
|
|||||||
|
|
||||||
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
|
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
|
||||||
#define OBSW_SYRLINKS_SIMULATED 1
|
#define OBSW_SYRLINKS_SIMULATED 1
|
||||||
#define OBSW_ADD_TEST_CODE 0
|
#define OBSW_ADD_TEST_CODE 1
|
||||||
#define OBSW_ADD_TEST_TASK 0
|
#define OBSW_ADD_TEST_TASK 1
|
||||||
#define OBSW_ADD_TEST_PST 0
|
#define OBSW_ADD_TEST_PST 0
|
||||||
// If this is enabled, all other SPI code should be disabled
|
// If this is enabled, all other SPI code should be disabled
|
||||||
#define OBSW_ADD_SPI_TEST_CODE 0
|
#define OBSW_ADD_SPI_TEST_CODE 0
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <gps.h>
|
#include <gps.h>
|
||||||
#include <libgpsmm.h>
|
#include <libgpsmm.h>
|
||||||
|
#include <param/param_string.h>
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
@ -18,10 +19,8 @@
|
|||||||
#include "bsp_q7s/memory/scratchApi.h"
|
#include "bsp_q7s/memory/scratchApi.h"
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
#include "fsfw/timemanager/Stopwatch.h"
|
#include "fsfw/timemanager/Stopwatch.h"
|
||||||
#include "test/DummyParameter.h"
|
|
||||||
|
|
||||||
#include "p60pdu.h"
|
#include "p60pdu.h"
|
||||||
#include <param/param_string.h>
|
#include "test/DummyParameter.h"
|
||||||
|
|
||||||
Q7STestTask::Q7STestTask(object_id_t objectId) : TestTask(objectId) {
|
Q7STestTask::Q7STestTask(object_id_t objectId) : TestTask(objectId) {
|
||||||
doTestSdCard = false;
|
doTestSdCard = false;
|
||||||
@ -38,6 +37,7 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
|
|||||||
if (doTestScratchApi) {
|
if (doTestScratchApi) {
|
||||||
testScratchApi();
|
testScratchApi();
|
||||||
}
|
}
|
||||||
|
if (DO_TEST_GOMSPACE_API) {
|
||||||
uint8_t p60pdu_node = 3;
|
uint8_t p60pdu_node = 3;
|
||||||
uint8_t hk_mem[P60PDU_HK_SIZE];
|
uint8_t hk_mem[P60PDU_HK_SIZE];
|
||||||
param_index_t p60pdu_hk{};
|
param_index_t p60pdu_hk{};
|
||||||
@ -45,8 +45,10 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
|
|||||||
if (!p60pdu_get_hk(&p60pdu_hk, p60pdu_node, 1000)) {
|
if (!p60pdu_get_hk(&p60pdu_hk, p60pdu_node, 1000)) {
|
||||||
printf("Error getting p60pdu hk\n");
|
printf("Error getting p60pdu hk\n");
|
||||||
} else {
|
} else {
|
||||||
//param_list(&p60pdu_hk, 1);
|
param_list(&p60pdu_hk, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// testJsonLibDirect();
|
// testJsonLibDirect();
|
||||||
// testDummyParams();
|
// testDummyParams();
|
||||||
if (doTestProtHandler) {
|
if (doTestProtHandler) {
|
||||||
|
@ -16,6 +16,7 @@ class Q7STestTask : public TestTask {
|
|||||||
private:
|
private:
|
||||||
bool doTestSdCard = false;
|
bool doTestSdCard = false;
|
||||||
bool doTestScratchApi = false;
|
bool doTestScratchApi = false;
|
||||||
|
static constexpr bool DO_TEST_GOMSPACE_API = true;
|
||||||
bool doTestGpsShm = false;
|
bool doTestGpsShm = false;
|
||||||
bool doTestGpsSocket = false;
|
bool doTestGpsSocket = false;
|
||||||
bool doTestProtHandler = false;
|
bool doTestProtHandler = false;
|
||||||
|
@ -230,8 +230,7 @@ ReturnValue_t GomspaceDeviceHandler::generateSetParamCommand(const uint8_t* comm
|
|||||||
uint16_t payloadlength = sizeof(address) + parameterSize;
|
uint16_t payloadlength = sizeof(address) + parameterSize;
|
||||||
|
|
||||||
/* Generate command for CspComIF */
|
/* Generate command for CspComIF */
|
||||||
CspSetParamCommand setParamCmd(querySize, payloadlength, address,
|
CspSetParamCommand setParamCmd(querySize, payloadlength, address, parameterPtr, parameterSize);
|
||||||
parameterPtr, parameterSize);
|
|
||||||
size_t cspPacketLen = 0;
|
size_t cspPacketLen = 0;
|
||||||
uint8_t* buffer = cspPacket;
|
uint8_t* buffer = cspPacket;
|
||||||
result = setParamCmd.serialize(&buffer, &cspPacketLen, sizeof(cspPacket),
|
result = setParamCmd.serialize(&buffer, &cspPacketLen, sizeof(cspPacket),
|
||||||
|
@ -116,6 +116,7 @@ class GomspaceDeviceHandler : public DeviceHandlerBase {
|
|||||||
std::array<uint8_t, PDU::CHANNELS_LEN> initOutEnb);
|
std::array<uint8_t, PDU::CHANNELS_LEN> initOutEnb);
|
||||||
|
|
||||||
static bool validTableId(uint8_t id);
|
static bool validTableId(uint8_t id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SetParamMessageUnpacker setParamCacher;
|
SetParamMessageUnpacker setParamCacher;
|
||||||
/**
|
/**
|
||||||
|
@ -9,11 +9,12 @@
|
|||||||
|
|
||||||
class CspParamRequestBase : public SerialLinkedListAdapter<SerializeIF> {
|
class CspParamRequestBase : public SerialLinkedListAdapter<SerializeIF> {
|
||||||
public:
|
public:
|
||||||
CspParamRequestBase(uint16_t querySize, uint8_t tableId): querySize(querySize), tableId(tableId) {
|
CspParamRequestBase(uint16_t querySize, uint8_t tableId)
|
||||||
|
: querySize(querySize), tableId(tableId) {
|
||||||
setLinks();
|
setLinks();
|
||||||
}
|
}
|
||||||
protected:
|
|
||||||
|
|
||||||
|
protected:
|
||||||
void setLinks() {
|
void setLinks() {
|
||||||
setStart(&cspPort);
|
setStart(&cspPort);
|
||||||
cspPort.setNext(&querySize);
|
cspPort.setNext(&querySize);
|
||||||
@ -104,9 +105,8 @@ class CspPingCommand : public SerialLinkedListAdapter<SerializeIF> {
|
|||||||
*/
|
*/
|
||||||
class CspSetParamCommand : public CspParamRequestBase {
|
class CspSetParamCommand : public CspParamRequestBase {
|
||||||
public:
|
public:
|
||||||
CspSetParamCommand(uint16_t querySize_, uint16_t payloadlength_,
|
CspSetParamCommand(uint16_t querySize_, uint16_t payloadlength_, uint16_t addr_,
|
||||||
uint16_t addr_, const uint8_t *parameter_,
|
const uint8_t *parameter_, uint8_t parameterCount_, uint8_t tableId = 1)
|
||||||
uint8_t parameterCount_, uint8_t tableId = 1)
|
|
||||||
: CspParamRequestBase(querySize_, tableId),
|
: CspParamRequestBase(querySize_, tableId),
|
||||||
addr(addr_),
|
addr(addr_),
|
||||||
parameter(parameter_, parameterCount_) {
|
parameter(parameter_, parameterCount_) {
|
||||||
@ -116,8 +116,8 @@ class CspSetParamCommand : public CspParamRequestBase {
|
|||||||
CspParamRequestBase::action = GOMSPACE::ParamRequestIds::SET;
|
CspParamRequestBase::action = GOMSPACE::ParamRequestIds::SET;
|
||||||
}
|
}
|
||||||
CspSetParamCommand(const CspSetParamCommand &command) = delete;
|
CspSetParamCommand(const CspSetParamCommand &command) = delete;
|
||||||
private:
|
|
||||||
|
|
||||||
|
private:
|
||||||
SerializeElement<uint16_t> addr;
|
SerializeElement<uint16_t> addr;
|
||||||
SerializeElement<SerialBufferAdapter<uint8_t>> parameter;
|
SerializeElement<SerialBufferAdapter<uint8_t>> parameter;
|
||||||
};
|
};
|
||||||
@ -135,17 +135,15 @@ class CspGetParamCommand : public CspParamRequestBase {
|
|||||||
/* The size of the header of a gomspace CSP packet. */
|
/* The size of the header of a gomspace CSP packet. */
|
||||||
static const uint8_t GS_HDR_LENGTH = 12;
|
static const uint8_t GS_HDR_LENGTH = 12;
|
||||||
|
|
||||||
CspGetParamCommand(uint16_t querySize_, uint8_t tableId_, uint16_t addresslength_,
|
CspGetParamCommand(uint16_t querySize_, uint8_t tableId_, uint16_t addresslength_, uint16_t addr_)
|
||||||
uint16_t addr_)
|
: CspParamRequestBase(querySize_, tableId_), addr(addr_) {
|
||||||
: CspParamRequestBase(querySize_, tableId_),
|
|
||||||
addr(addr_) {
|
|
||||||
total.setNext(&addr);
|
total.setNext(&addr);
|
||||||
CspParamRequestBase::tableId = tableId_;
|
CspParamRequestBase::tableId = tableId_;
|
||||||
CspParamRequestBase::payloadlength = addresslength_;
|
CspParamRequestBase::payloadlength = addresslength_;
|
||||||
}
|
}
|
||||||
CspGetParamCommand(const CspGetParamCommand &command) = delete;
|
CspGetParamCommand(const CspGetParamCommand &command) = delete;
|
||||||
private:
|
|
||||||
|
|
||||||
|
private:
|
||||||
SerializeElement<uint16_t> addr;
|
SerializeElement<uint16_t> addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,12 +62,7 @@ enum ParamRequestIds: uint8_t {
|
|||||||
SAVE_TO_STORE = 0x9a
|
SAVE_TO_STORE = 0x9a
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TableIds: uint8_t {
|
enum TableIds : uint8_t { BOARD_PARAMS = 0, CONFIG = 1, CALIBRATION = 2, HK = 4 };
|
||||||
BOARD_PARAMS = 0,
|
|
||||||
CONFIG = 1,
|
|
||||||
CALIBRATION = 2,
|
|
||||||
HK = 4
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace GOMSPACE
|
} // namespace GOMSPACE
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ if command -v ${cmake_fmt} &> /dev/null; then
|
|||||||
for dir in ${folder_list[@]}; do
|
for dir in ${folder_list[@]}; do
|
||||||
find ${dir} ${file_selectors} | xargs ${cmake_fmt} -i
|
find ${dir} ${file_selectors} | xargs ${cmake_fmt} -i
|
||||||
done
|
done
|
||||||
|
${cmake_fmt} -i ./thirdparty/gomspace-sw/CMakeLists.txt
|
||||||
else
|
else
|
||||||
echo "No ${cmake_fmt} tool found, not formatting CMake files"
|
echo "No ${cmake_fmt} tool found, not formatting CMake files"
|
||||||
fi
|
fi
|
||||||
|
2
thirdparty/gomspace-sw
vendored
2
thirdparty/gomspace-sw
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b99ea7371f5af591846df267d0a6d72e53f2cd88
|
Subproject commit 6b9db5e60cadcb9bbe1712f0f1b50aede2cbf7be
|
Loading…
Reference in New Issue
Block a user