GNSS ACS board update #92

Merged
meierj merged 47 commits from mueller/gnss-acs-update into develop 2021-09-15 15:43:01 +02:00
37 changed files with 1949 additions and 1629 deletions

2
.gitmodules vendored
View File

@ -15,7 +15,7 @@
url = https://github.com/rmspacefish/lwgps.git url = https://github.com/rmspacefish/lwgps.git
[submodule "generators/fsfwgen"] [submodule "generators/fsfwgen"]
path = generators/fsfwgen path = generators/fsfwgen
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-generators.git url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-gen.git
[submodule "thirdparty/arcsec_star_tracker"] [submodule "thirdparty/arcsec_star_tracker"]
path = thirdparty/arcsec_star_tracker path = thirdparty/arcsec_star_tracker
url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git

View File

@ -86,6 +86,7 @@ include (${CMAKE_SCRIPT_PATH}/HardwareOsPreConfig.cmake)
pre_source_hw_os_config() pre_source_hw_os_config()
if(TGT_BSP) if(TGT_BSP)
message(STATUS ${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"
OR TGT_BSP MATCHES "arm/beagleboneblack" OR TGT_BSP MATCHES "arm/beagleboneblack"
) )
@ -97,18 +98,18 @@ if(TGT_BSP)
endif() endif()
endif() endif()
if(${TGT_BSP} MATCHES "arm/raspberrypi") if(TGT_BSP MATCHES "arm/raspberrypi")
# Used by configure file # Used by configure file
set(RASPBERRY_PI ON) set(RASPBERRY_PI ON)
set(FSFW_HAL_ADD_RASPBERRY_PI ON) set(FSFW_HAL_ADD_RASPBERRY_PI ON)
endif() endif()
if(${TGT_BSP} MATCHES "arm/beagleboneblack") if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file # Used by configure file
set(BEAGLEBONEBLACK ON) set(BEAGLEBONEBLACK ON)
endif() endif()
if(${TGT_BSP} MATCHES "arm/q7s") if(TGT_BSP MATCHES "arm/q7s")
# Used by configure file # Used by configure file
set(XIPHOS_Q7S ON) set(XIPHOS_Q7S ON)
endif() endif()
@ -122,9 +123,9 @@ if(NOT EIVE_BUILD_WATCHDOG)
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h) configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h) configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h) configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h)
if(${TGT_BSP} MATCHES "arm/q7s") if(TGT_BSP MATCHES "arm/q7s")
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h) configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
elseif(${TGT_BSP} MATCHES "arm/raspberrypi") elseif(TGT_BSP MATCHES "arm/raspberrypi")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h) configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif() endif()
endif() endif()
@ -135,8 +136,6 @@ set(FSFW_ADDITIONAL_INC_PATHS
"${COMMON_PATH}/config" "${COMMON_PATH}/config"
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
) )
# Set for lwgps library
set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config")
################################################################################ ################################################################################
# Executable and Sources # Executable and Sources

View File

@ -65,7 +65,7 @@ prerequisites.
as a [separate download](#arm-toolchain) as a [separate download](#arm-toolchain)
2. [Q7S sysroot](#q7s-sysroot) on local development machine 2. [Q7S sysroot](#q7s-sysroot) on local development machine
3. Recommended: Eclipse or [Vivado 2018.2 SDK](#vivado) for OBSW development 3. Recommended: Eclipse or [Vivado 2018.2 SDK](#vivado) for OBSW development
3. [TCF agent] running on Q7S 3. [TCF agent](https://wiki.eclipse.org/TCF) running on Q7S
## Hardware Design ## Hardware Design
@ -324,6 +324,33 @@ For Linux, you can also download a more recent version of the
[Linaro 8.3.0 cross-compiler](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads) [Linaro 8.3.0 cross-compiler](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads)
from [here](https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz?revision=e09a1c45-0ed3-4a8e-b06b-db3978fd8d56&la=en&hash=93ED4444B8B3A812B893373B490B90BBB28FD2E3) from [here](https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz?revision=e09a1c45-0ed3-4a8e-b06b-db3978fd8d56&la=en&hash=93ED4444B8B3A812B893373B490B90BBB28FD2E3)
### Compatibility issues with wayland on more recent Linux distributions
If Vivado crashes and you find following lines in the `hs_err_pid*` files:
```sh
#
# An unexpected error has occurred (11)
#
Stack:
/opt/Xilinx/Vivado/2017.4/tps/lnx64/jre/lib/amd64/server/libjvm.so(+0x923da9) [0x7f666cf5eda9]
/opt/Xilinx/Vivado/2017.4/tps/lnx64/jre/lib/amd64/server/libjvm.so(JVM_handle_linux_signal+0xb6) [0x7f666cf653f6]
/opt/Xilinx/Vivado/2017.4/tps/lnx64/jre/lib/amd64/server/libjvm.so(+0x9209d3) [0x7f666cf5b9d3]
/lib/x86_64-linux-gnu/libc.so.6(+0x35fc0) [0x7f66a993efc0]
/opt/Xilinx/Vivado/2017.4/tps/lnx64/jre/lib/amd64/libawt_xawt.so(+0x42028) [0x7f664e24d028]
...
```
You can [solve this](https://forums.xilinx.com/t5/Design-Entry/Bug-Vivado-2017-4-crashing-on-rightclick-in-console-log/td-p/881811)
by logging in with `xorg` like specified [here](https://www.maketecheasier.com/switch-xorg-wayland-ubuntu1710/).
### Using `docnav` on more recent Linux versions
If you want to use `docnav` for navigating Xilinx documentation, it is recommended to install
it as a standalone version from [here](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/documentation-nav.html).
This is because the `docnav` installed as part of version 2018.2 requires `libpng12`, which is not part of
more recent disitributions anymore.
## <a id="arm-toolchain"></a> Installing toolchain without Vivado ## <a id="arm-toolchain"></a> Installing toolchain without Vivado
You can download the toolchains for Windows and Linux You can download the toolchains for Windows and Linux

View File

@ -112,6 +112,7 @@ void ObjectFactory::produce(void* args){
if(gpioCookie == nullptr) { if(gpioCookie == nullptr) {
gpioCookie = new GpioCookie(); gpioCookie = new GpioCookie();
} }
// TODO: Missing pin for Gyro 2
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN, gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN,
"MGM_0_LIS3", gpio::Direction::OUT, 1); "MGM_0_LIS3", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_1_RM3100_CS, gpio::MGM_1_BCM_PIN, gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_1_RM3100_CS, gpio::MGM_1_BCM_PIN,
@ -124,7 +125,7 @@ void ObjectFactory::produce(void* args){
"GYRO_0_ADIS", gpio::Direction::OUT, 1); "GYRO_0_ADIS", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN, gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN,
"GYRO_1_L3G", gpio::Direction::OUT, 1); "GYRO_1_L3G", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_2_L3G_CS, gpio::GYRO_2_BCM_PIN, gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_3_L3G_CS, gpio::GYRO_2_BCM_PIN,
"GYRO_2_L3G", gpio::Direction::OUT, 1); "GYRO_2_L3G", gpio::Direction::OUT, 1);
gpioIF->addGpios(gpioCookie); gpioIF->addGpios(gpioCookie);

View File

@ -12,6 +12,6 @@ else()
add_subdirectory(gpio) add_subdirectory(gpio)
add_subdirectory(core) add_subdirectory(core)
add_subdirectory(memory) add_subdirectory(memory)
add_subdirectory(spiCallbacks) add_subdirectory(callbacks)
add_subdirectory(devices) add_subdirectory(devices)
endif() endif()

View File

@ -10,32 +10,58 @@ static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-1";
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL3"; static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL3";
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL4"; static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL4";
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL5";
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8"; static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8";
static constexpr char GPIO_ACS_BOARD_DEFAULT_CHIP[] = "gpiochip5"; static constexpr char UART_GNSS_0_DEV[] = "/dev/ttyUL0";
static constexpr char GPIO_MGM2_LIS3_CHIP[] = "gpiochip6"; static constexpr char UART_GNSS_1_DEV[] = "/dev/ttyUL2";
// TODO: Determine new pins, additional ADIS gyro device /**************************************************************/
static constexpr uint32_t GPIO_GYRO_0_ADIS_CS = 1; /** OBC1E */
static constexpr uint32_t GPIO_GYRO_1_L3G_CS = 7; /**************************************************************/
static constexpr uint32_t GPIO_GYRO_2_ADIS_CS = 3; static constexpr char GPIO_MULTIPURPOSE_1V8_OBC1D[] = "gpiochip4";
static constexpr uint32_t GPIO_GYRO_3_L3G_CS = 3; static const char* const GPIO_GYRO_ADIS_CHIP = GPIO_MULTIPURPOSE_1V8_OBC1D;
static constexpr uint32_t GPIO_GYRO_0_ADIS_CS = 0; // Package Pin: W20
static constexpr uint32_t GPIO_GYRO_2_ADIS_CS = 2; // AA22
static constexpr uint32_t GPIO_MGM_0_LIS3_CS = 5; /**************************************************************/
static constexpr uint32_t GPIO_MGM_1_RM3100_CS = 16; /** OBC1F B0 */
static constexpr uint32_t GPIO_MGM_2_LIS3_CS = 0; /**************************************************************/
static constexpr uint32_t GPIO_MGM_3_RM3100_CS = 10; static constexpr char GPIO_FLEX_OBC1F_B0[] = "gpiochip5";
static const char* const GPIO_ACS_BOARD_DEFAULT_CHIP = GPIO_FLEX_OBC1F_B0;
static const char* const GPIO_RW_DEFAULT_CHIP = GPIO_FLEX_OBC1F_B0;
static const char* const GPIO_RAD_SENSOR_CHIP = GPIO_FLEX_OBC1F_B0;
static constexpr char GPIO_RW_DEFAULT_CHIP[] = "gpiochip5"; static constexpr uint32_t GPIO_RW_0_CS = 7; // B20
static constexpr uint32_t GPIO_RW_0_CS = 7;
static constexpr uint32_t GPIO_RW_1_CS = 3; static constexpr uint32_t GPIO_RW_1_CS = 3;
static constexpr uint32_t GPIO_RW_2_CS = 11; static constexpr uint32_t GPIO_RW_2_CS = 11;
static constexpr uint32_t GPIO_RW_3_CS = 6; static constexpr uint32_t GPIO_RW_3_CS = 6;
static constexpr char GPIO_RW_SPI_MUX_CHIP[] = "gpiochip11"; static constexpr uint32_t GPIO_GYRO_1_L3G_CS = 18;
static constexpr uint32_t GPIO_RW_SPI_MUX_CS = 57; static constexpr uint32_t GPIO_GYRO_3_L3G_CS = 1;
static constexpr uint32_t GPIO_MGM_0_LIS3_CS = 5;
static constexpr uint32_t GPIO_MGM_1_RM3100_CS = 16;
static constexpr char GPIO_HEATER_CHIP[] = "gpiochip7"; static constexpr uint32_t GPIO_MGM_3_RM3100_CS = 10;
// Active low reset pin
static constexpr uint32_t GPIO_RESET_GNSS_0 = 9; // C22
static constexpr uint32_t GPIO_RESET_GNSS_1 = 12; // B21
static constexpr uint32_t GPIO_RAD_SENSOR_CS = 19; // R18
/**************************************************************/
/** OBC1F B1 */
/**************************************************************/
static constexpr char GPIO_FLEX_OBC1F_B1[] = "gpiochip6";
static const char* const GPIO_MGM2_LIS3_CHIP = GPIO_FLEX_OBC1F_B1;
static constexpr uint32_t GPIO_MGM_2_LIS3_CS = 0;
/**************************************************************/
/** OBC1C */
/**************************************************************/
static constexpr char GPIO_3V3_OBC1C[] = "gpiochip7";
static const char* const GPIO_HEATER_CHIP = GPIO_3V3_OBC1C;
static const char* const GPIO_SOLAR_ARR_DEPL_CHIP = GPIO_3V3_OBC1C;
static constexpr uint32_t GPIO_HEATER_0_PIN = 6; static constexpr uint32_t GPIO_HEATER_0_PIN = 6;
static constexpr uint32_t GPIO_HEATER_1_PIN = 12; static constexpr uint32_t GPIO_HEATER_1_PIN = 12;
static constexpr uint32_t GPIO_HEATER_2_PIN = 7; static constexpr uint32_t GPIO_HEATER_2_PIN = 7;
@ -45,12 +71,12 @@ static constexpr uint32_t GPIO_HEATER_5_PIN = 0;
static constexpr uint32_t GPIO_HEATER_6_PIN = 1; static constexpr uint32_t GPIO_HEATER_6_PIN = 1;
static constexpr uint32_t GPIO_HEATER_7_PIN = 11; static constexpr uint32_t GPIO_HEATER_7_PIN = 11;
static constexpr char GPIO_SOLAR_ARR_DEPL_CHIP[] = "gpiochip7";
static constexpr uint32_t GPIO_SOL_DEPL_SA_0_PIN = 4; static constexpr uint32_t GPIO_SOL_DEPL_SA_0_PIN = 4;
static constexpr uint32_t GPIO_SOL_DEPL_SA_1_PIN = 2; static constexpr uint32_t GPIO_SOL_DEPL_SA_1_PIN = 2;
static constexpr char GPIO_RAD_SENSOR_CHIP[] = "gpiochip5"; static constexpr char GPIO_RW_SPI_MUX_CHIP[] = "gpiochip11";
static constexpr uint32_t GPIO_RAD_SENSOR_CS = 19; static constexpr uint32_t GPIO_RW_SPI_MUX_CS = 57;
} }
#endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */ #endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */

View File

@ -5,6 +5,17 @@
#cmakedefine01 Q7S_SIMPLE_MODE #cmakedefine01 Q7S_SIMPLE_MODE
/*******************************************************************/
/** All of the following flags should be enabled for mission code */
/*******************************************************************/
//! Timers can mess up the code when debugging
//! All of this should be enabled for mission code!
/*******************************************************************/
/** Other flags */
/*******************************************************************/
#define Q7S_SD_NONE 0 #define Q7S_SD_NONE 0
#define Q7S_SD_COLD_REDUNDANT 1 #define Q7S_SD_COLD_REDUNDANT 1
#define Q7S_SD_HOT_REDUNDANT 2 #define Q7S_SD_HOT_REDUNDANT 2
@ -19,15 +30,11 @@
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1 #define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1
#define Q7S_ADD_RTD_DEVICES 0 #define Q7S_ADD_RTD_DEVICES 0
/* Only one of those 2 should be enabled! */ // Only one of those 2 should be enabled!
/* Add code for ACS board */
#define OBSW_ADD_ACS_BOARD 0
#if OBSW_ADD_ACS_BOARD == 0 #if OBSW_ADD_ACS_BOARD == 0
#define Q7S_ADD_SPI_TEST 0 #define Q7S_ADD_SPI_TEST 0
#endif #endif
#define Q7S_ADD_SYRLINKS_HANDLER 1
#define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0 #define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0
namespace config { namespace config {

View File

@ -1,3 +1,4 @@
target_sources(${TARGET_NAME} PRIVATE target_sources(${TARGET_NAME} PRIVATE
rwSpiCallback.cpp rwSpiCallback.cpp
gnssCallback.cpp
) )

View File

@ -0,0 +1,26 @@
#include "gnssCallback.h"
#include "devices/gpioIds.h"
#include "fsfw/tasks/TaskFactory.h"
ReturnValue_t gps::triggerGpioResetPin(void *args) {
ResetArgs* resetArgs = reinterpret_cast<ResetArgs*>(args);
if(args == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
if (resetArgs->gpioComIF == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
gpioId_t gpioId;
if(resetArgs->gnss1) {
gpioId = gpioIds::GNSS_1_NRESET;
}
else {
gpioId = gpioIds::GNSS_0_NRESET;
}
resetArgs->gpioComIF->pullLow(gpioId);
TaskFactory::delayTask(resetArgs->waitPeriodMs);
resetArgs->gpioComIF->pullHigh(gpioId);
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -0,0 +1,19 @@
#ifndef BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
#define BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
struct ResetArgs {
bool gnss1 = false;
LinuxLibgpioIF* gpioComIF = nullptr;
uint32_t waitPeriodMs = 100;
};
namespace gps {
ReturnValue_t triggerGpioResetPin(void* args);
}
#endif /* BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_ */

View File

@ -1,9 +1,10 @@
#include <bsp_q7s/spiCallbacks/rwSpiCallback.h> #include "rwSpiCallback.h"
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <mission/devices/RwHandler.h>
#include <fsfw_hal/linux/spi/SpiCookie.h>
#include <fsfw_hal/linux/UnixFileGuard.h>
#include "devices/gpioIds.h" #include "devices/gpioIds.h"
#include "mission/devices/RwHandler.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/UnixFileGuard.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
namespace rwSpiCallback { namespace rwSpiCallback {

View File

@ -1,9 +1,9 @@
#ifndef BSP_Q7S_RW_SPI_CALLBACK_H_ #ifndef BSP_Q7S_RW_SPI_CALLBACK_H_
#define BSP_Q7S_RW_SPI_CALLBACK_H_ #define BSP_Q7S_RW_SPI_CALLBACK_H_
#include <fsfw/returnvalues/HasReturnvaluesIF.h> #include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include <fsfw_hal/linux/spi/SpiComIF.h> #include "fsfw_hal/linux/spi/SpiComIF.h"
#include <fsfw_hal/common/gpio/GpioCookie.h> #include "fsfw_hal/common/gpio/GpioCookie.h"
namespace rwSpiCallback { namespace rwSpiCallback {

View File

@ -9,12 +9,13 @@
#include "devices/powerSwitcherList.h" #include "devices/powerSwitcherList.h"
#include "bsp_q7s/gpio/gpioCallbacks.h" #include "bsp_q7s/gpio/gpioCallbacks.h"
#include "bsp_q7s/core/CoreController.h" #include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/spiCallbacks/rwSpiCallback.h"
#include "bsp_q7s/boardtest/Q7STestTask.h" #include "bsp_q7s/boardtest/Q7STestTask.h"
#include "bsp_q7s/memory/FileSystemHandler.h" #include "bsp_q7s/memory/FileSystemHandler.h"
#include "bsp_q7s/devices/PlocSupervisorHandler.h" #include "bsp_q7s/devices/PlocSupervisorHandler.h"
#include "bsp_q7s/devices/PlocUpdater.h" #include "bsp_q7s/devices/PlocUpdater.h"
#include "bsp_q7s/devices/PlocMemoryDumper.h" #include "bsp_q7s/devices/PlocMemoryDumper.h"
#include "bsp_q7s/callbacks/rwSpiCallback.h"
#include "bsp_q7s/callbacks/gnssCallback.h"
#include "linux/devices/HeaterHandler.h" #include "linux/devices/HeaterHandler.h"
#include "linux/devices/SolarArrayDeploymentHandler.h" #include "linux/devices/SolarArrayDeploymentHandler.h"
@ -32,6 +33,7 @@
#include "mission/devices/P60DockHandler.h" #include "mission/devices/P60DockHandler.h"
#include "mission/devices/Tmp1075Handler.h" #include "mission/devices/Tmp1075Handler.h"
#include "mission/devices/Max31865PT1000Handler.h" #include "mission/devices/Max31865PT1000Handler.h"
#include "mission/devices/GyroADIS16507Handler.h"
#include "mission/devices/IMTQHandler.h" #include "mission/devices/IMTQHandler.h"
#include "mission/devices/SyrlinksHkHandler.h" #include "mission/devices/SyrlinksHkHandler.h"
#include "mission/devices/MGMHandlerLIS3MDL.h" #include "mission/devices/MGMHandlerLIS3MDL.h"
@ -81,6 +83,9 @@
#include "linux/boardtest/LibgpiodTest.h" #include "linux/boardtest/LibgpiodTest.h"
#endif #endif
ResetArgs resetArgsGnss0;
ResetArgs resetArgsGnss1;
void ObjectFactory::setStatics() { void ObjectFactory::setStatics() {
Factory::setStaticFrameworkObjectIds(); Factory::setStaticFrameworkObjectIds();
} }
@ -169,7 +174,8 @@ void ObjectFactory::produce(void* args){
sif::info << "Created UDP server for TMTC commanding with listener port " << sif::info << "Created UDP server for TMTC commanding with listener port " <<
udpBridge->getUdpPort() << std::endl; udpBridge->getUdpPort() << std::endl;
#else #else
new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR); auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
auto tcpServer = new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE); auto tcpServer = new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
sif::info << "Created TCP server for TMTC commanding with listener port " << sif::info << "Created TCP server for TMTC commanding with listener port " <<
tcpServer->getTcpPort() << std::endl; tcpServer->getTcpPort() << std::endl;
@ -391,14 +397,13 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF,
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComIF* uartComIF) { void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComIF* uartComIF) {
GpioCookie* gpioCookieAcsBoard = new GpioCookie(); GpioCookie* gpioCookieAcsBoard = new GpioCookie();
GpiodRegular* gpio = nullptr; GpiodRegular* gpio = nullptr;
// TODO: Determine new Gyro GPIO pins gpio = new GpiodRegular(q7s::GPIO_GYRO_ADIS_CHIP, q7s::GPIO_GYRO_0_ADIS_CS,
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_0_ADIS_CS,
"CS_GYRO_0_ADIS", gpio::OUT, gpio::HIGH); "CS_GYRO_0_ADIS", gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio);
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_1_L3G_CS, gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_1_L3G_CS,
"CS_GYRO_1_L3G", gpio::OUT, gpio::HIGH); "CS_GYRO_1_L3G", gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio);
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_2_ADIS_CS, gpio = new GpiodRegular(q7s::GPIO_GYRO_ADIS_CHIP, q7s::GPIO_GYRO_2_ADIS_CS,
"CS_GYRO_2_ADIS", gpio::OUT, gpio::HIGH); "CS_GYRO_2_ADIS", gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio);
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_3_L3G_CS, gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_3_L3G_CS,
@ -418,6 +423,18 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
"CS_MGM_3_RM3100_B", gpio::OUT, gpio::HIGH); "CS_MGM_3_RM3100_B", gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio); gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio);
// GNSS reset pins are active low
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_RESET_GNSS_0,
"GNSS_0_NRESET", gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_NRESET, gpio);
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_RESET_GNSS_1,
"GNSS_1_NRESET", gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_NRESET, gpio);
// GNSS enable pins must be pulled high
gpioComIF->addGpios(gpioCookieAcsBoard); gpioComIF->addGpios(gpioCookieAcsBoard);
std::string spiDev = q7s::SPI_DEFAULT_DEV; std::string spiDev = q7s::SPI_DEFAULT_DEV;
@ -427,48 +444,75 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
objects::SPI_COM_IF, spiCookie); objects::SPI_COM_IF, spiCookie);
mgmLis3Handler->setStartUpImmediately(); mgmLis3Handler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler2 = new MGMHandlerLIS3MDL(objects::MGM_2_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie);
mgmLis3Handler2->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev, spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED); RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_1_RM3100_HANDLER, auto mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_1_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie); objects::SPI_COM_IF, spiCookie);
mgmRm3100Handler->setStartUpImmediately(); mgmRm3100Handler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler2 = new MGMHandlerLIS3MDL(objects::MGM_2_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie);
mgmLis3Handler2->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev, spiCookie = new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED); RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_3_RM3100_HANDLER, mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_3_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie); objects::SPI_COM_IF, spiCookie);
mgmRm3100Handler->setStartUpImmediately(); mgmRm3100Handler->setStartUpImmediately();
//TODO: Adis Gyro (Gyro 0 Side A)
// Commented until ACS board V2 in in clean room again // Commented until ACS board V2 in in clean room again
/* Gyro 1 Side A */ // Gyro 0 Side A
// spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev, spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
// L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED); ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
// auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF, spi::DEFAULT_ADIS16507_SPEED);
// spiCookie); auto adisHandler = new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER,
// gyroL3gHandler->setStartUpImmediately(); objects::SPI_COM_IF, spiCookie);
// adisHandler->setStartUpImmediately();
// /* Gyro 2 Side B */ // Gyro 1 Side A
// spiCookie = new SpiCookie(addresses::GYRO_2_L3G, gpioIds::GYRO_2_L3G_CS, spiDev, spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev,
// L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED); L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
// gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_2_L3G_HANDLER, objects::SPI_COM_IF, auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER,
// spiCookie); objects::SPI_COM_IF, spiCookie);
// gyroL3gHandler->setStartUpImmediately(); gyroL3gHandler->setStartUpImmediately();
// Gyro 2 Side B
spiCookie = new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
spi::DEFAULT_ADIS16507_SPEED);
adisHandler = new GyroADIS16507Handler(objects::GYRO_2_ADIS_HANDLER,
objects::SPI_COM_IF, spiCookie);
adisHandler->setStartUpImmediately();
// Gyro 3 Side B
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER,
objects::SPI_COM_IF, spiCookie);
gyroL3gHandler->setStartUpImmediately();
// TODO: Add GPS device handlers resetArgsGnss1.gnss1 = true;
// auto uartCookieGps0 = new UartCookie(objects::GPS0_HANDLER, deviceFile, uartMode, baudrate, resetArgsGnss1.gpioComIF = gpioComIF;
// maxReplyLen); resetArgsGnss1.waitPeriodMs = 100;
// auto uartCookieGps1 = new UartCookie(objects::GPS0_HANDLER, deviceFile, uartMode, baudrate, resetArgsGnss0.gnss1 = false;
// maxReplyLen); resetArgsGnss0.gpioComIF = gpioComIF;
// new GPSHyperionHandler(objects::GPS0_HANDLER, uartComIF); resetArgsGnss0.waitPeriodMs = 100;
// new GPSHyperionHandler(objects::GPS1_HANDLER, uartComIF); auto uartCookieGps0 = new UartCookie(objects::GPS0_HANDLER, q7s::UART_GNSS_0_DEV,
UartModes::CANONICAL, uart::GNSS_BAUD, uart::HYPERION_GPS_REPLY_MAX_BUFFER);
uartCookieGps0->setToFlushInput(true);
uartCookieGps0->setReadCycles(6);
auto uartCookieGps1 = new UartCookie(objects::GPS1_HANDLER, q7s::UART_GNSS_1_DEV,
UartModes::CANONICAL, uart::GNSS_BAUD, uart::HYPERION_GPS_REPLY_MAX_BUFFER);
uartCookieGps1->setToFlushInput(true);
uartCookieGps1->setReadCycles(6);
auto gpsHandler0 = new GPSHyperionHandler(objects::GPS0_HANDLER, objects::UART_COM_IF,
uartCookieGps0, true);
gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0);
gpsHandler0->setStartUpImmediately();
auto gpsHandler1 = new GPSHyperionHandler(objects::GPS1_HANDLER, objects::UART_COM_IF,
uartCookieGps1, true);
gpsHandler1->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss1);
gpsHandler1->setStartUpImmediately();
} }
void ObjectFactory::createHeaterComponents() { void ObjectFactory::createHeaterComponents() {
@ -532,7 +576,8 @@ void ObjectFactory::createSolarArrayDeploymentComponents() {
void ObjectFactory::createSyrlinksComponents() { void ObjectFactory::createSyrlinksComponents() {
UartCookie* syrlinksUartCookie = new UartCookie(objects::SYRLINKS_HK_HANDLER, UartCookie* syrlinksUartCookie = new UartCookie(objects::SYRLINKS_HK_HANDLER,
std::string("/dev/ttyUL5"), UartModes::NON_CANONICAL, 38400, SYRLINKS::MAX_REPLY_SIZE); q7s::UART_SYRLINKS_DEV, UartModes::NON_CANONICAL, uart::SYRLINKS_BAUD,
SYRLINKS::MAX_REPLY_SIZE);
syrlinksUartCookie->setParityEven(); syrlinksUartCookie->setParityEven();
new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, objects::UART_COM_IF, syrlinksUartCookie); new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, objects::UART_COM_IF, syrlinksUartCookie);

View File

@ -53,9 +53,9 @@ endif()
if(TGT_BSP) if(TGT_BSP)
if (${TGT_BSP} MATCHES "arm/raspberrypi" OR ${TGT_BSP} MATCHES "arm/beagleboneblack") if (TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
set(BSP_PATH "bsp_linux_board") set(BSP_PATH "bsp_linux_board")
elseif(${TGT_BSP} MATCHES "arm/q7s") elseif(TGT_BSP MATCHES "arm/q7s")
set(BSP_PATH "bsp_q7s") set(BSP_PATH "bsp_q7s")
else() else()
message(WARNING "CMake not configured for this target!") message(WARNING "CMake not configured for this target!")

View File

@ -1,5 +1,8 @@
if(DEFINED ENV{Q7S_SYSROOT})
set(ENV{Q7S_ROOTFS} $ENV{Q7S_SYSROOT})
endif()
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command # CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
if(NOT DEFINED ENV{Q7S_SYSROOT}) if(NOT DEFINED ENV{Q7S_ROOTFS})
# Sysroot has not been cached yet and was not set in environment either # Sysroot has not been cached yet and was not set in environment either
if(NOT DEFINED SYSROOT_PATH) if(NOT DEFINED SYSROOT_PATH)
message(FATAL_ERROR message(FATAL_ERROR
@ -7,7 +10,7 @@ if(NOT DEFINED ENV{Q7S_SYSROOT})
) )
endif() endif()
else() else()
set(SYSROOT_PATH "$ENV{Q7S_SYSROOT}" CACHE PATH "Q7S root filesystem path") set(SYSROOT_PATH "$ENV{Q7S_ROOTFS}" CACHE PATH "Q7S root filesystem path")
endif() endif()
if(NOT DEFINED ENV{CROSS_COMPILE}) if(NOT DEFINED ENV{CROSS_COMPILE})

View File

@ -35,6 +35,9 @@ static constexpr uint32_t RTD_SPEED = 2000000;
namespace uart { namespace uart {
static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
static constexpr uint32_t SYRLINKS_BAUD = 38400;
static constexpr uint32_t GNSS_BAUD = 9600;
static constexpr uint32_t PLOC_MPSOC_BAUD = 115200; static constexpr uint32_t PLOC_MPSOC_BAUD = 115200;
static constexpr uint32_t PLOC_SUPERVISOR_BAUD = 115200; static constexpr uint32_t PLOC_SUPERVISOR_BAUD = 115200;
static constexpr uint32_t STAR_TRACKER_BAUD = 115200; static constexpr uint32_t STAR_TRACKER_BAUD = 115200;

2
fsfw

@ -1 +1 @@
Subproject commit 882da68a2f0c1301d433d517c449c9c31f3cb35e Subproject commit 40adca5f1d13ef8d6c712842ebc37e37fe449446

1
generators/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.~lock*

View File

@ -321,7 +321,7 @@ void SpiTestClass::acsInit() {
gpio = new GpiodRegular(rpiGpioName, gyro2L3gd20ChipSelect, "GYRO_2_L3G", gpio = new GpiodRegular(rpiGpioName, gyro2L3gd20ChipSelect, "GYRO_2_L3G",
gpio::Direction::OUT, 1); gpio::Direction::OUT, 1);
gpioCookie->addGpio(gpioIds::GYRO_2_L3G_CS, gpio); gpioCookie->addGpio(gpioIds::GYRO_3_L3G_CS, gpio);
gpio = new GpiodRegular(rpiGpioName, mgm2Lis3mdlChipSelect, "MGM_2_LIS3", gpio = new GpiodRegular(rpiGpioName, mgm2Lis3mdlChipSelect, "MGM_2_LIS3",
gpio::Direction::OUT, 1); gpio::Direction::OUT, 1);

View File

@ -73,5 +73,6 @@ static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 2048;
} }
#define FSFW_HAL_LINUX_SPI_WIRETAPPING 0 #define FSFW_HAL_LINUX_SPI_WIRETAPPING 0
#define FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV 0
#endif /* CONFIG_FSFWCONFIG_H_ */ #endif /* CONFIG_FSFWCONFIG_H_ */

View File

@ -6,9 +6,9 @@
#ifndef FSFWCONFIG_OBSWCONFIG_H_ #ifndef FSFWCONFIG_OBSWCONFIG_H_
#define FSFWCONFIG_OBSWCONFIG_H_ #define FSFWCONFIG_OBSWCONFIG_H_
/* #undef RASPBERRY_PI */ #cmakedefine RASPBERRY_PI
#define XIPHOS_Q7S #cmakedefine XIPHOS_Q7S
/* #undef BEAGLEBONEBLACK */ #cmakedefine BEAGLEBONEBLACK
#ifdef RASPBERRY_PI #ifdef RASPBERRY_PI
#include "rpiConfig.h" #include "rpiConfig.h"
@ -32,10 +32,13 @@ debugging. */
//! Timers can mess up the code when debugging //! Timers can mess up the code when debugging
//! All of this should be enabled for mission code! //! All of this should be enabled for mission code!
#define OBSW_ENABLE_TIMERS 1 #define OBSW_ENABLE_TIMERS 1
#define OBSW_ADD_GPS 0
#define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_STAR_TRACKER 0
#define OBSW_ADD_PLOC_SUPERVISOR 0 #define OBSW_ADD_PLOC_SUPERVISOR 0
#define OBSW_ADD_PLOC_MPSOC 0 #define OBSW_ADD_PLOC_MPSOC 0
#define OBSW_ADD_SUN_SENSORS 0
#define OBSW_ADD_ACS_BOARD 0
#define OBSW_ADD_GPS_0 0
#define OBSW_ADD_GPS_1 0
/*******************************************************************/ /*******************************************************************/
/** All of the following flags should be disabled for mission code */ /** All of the following flags should be disabled for mission code */

View File

@ -25,6 +25,9 @@ enum gpioId_t {
MGM_2_LIS3_CS, MGM_2_LIS3_CS,
MGM_3_RM3100_CS, MGM_3_RM3100_CS,
GNSS_0_NRESET,
GNSS_1_NRESET,
TEST_ID_0, TEST_ID_0,
TEST_ID_1, TEST_ID_1,

View File

@ -143,6 +143,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::RAD_SENSOR, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ);
#if OBSW_ADD_SUN_SENSORS == 1
/** /**
* The sun sensor will be shutdown as soon as the chip select is pulled high. Thus all * The sun sensor will be shutdown as soon as the chip select is pulled high. Thus all
* requests to a sun sensor must be performed consecutively. Another reason for calling multiple * requests to a sun sensor must be performed consecutively. Another reason for calling multiple
@ -151,253 +152,253 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
* One sun sensor communication sequence also blocks the SPI bus. So other devices can not be * One sun sensor communication sequence also blocks the SPI bus. So other devices can not be
* inserted between the device handler cycles of one SUS. * inserted between the device handler cycles of one SUS.
*/ */
/* Write setup */
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::SUS_1, length * 0.9, SusHandler::FIRST_WRITE);
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::GET_READ);
/* Write setup */
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::SUS_1, length * 0.901, SusHandler::FIRST_WRITE);
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_READ);
/* Write setup */
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::SUS_1, length * 0.902, SusHandler::FIRST_WRITE);
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_READ);
/* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_1, length * 0.9, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_2, length * 0.903, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_1, length * 0.901, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_2, length * 0.904, SusHandler::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_1, length * 0.902, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_2, length * 0.905, SusHandler::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_READ);
/* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_2, length * 0.903, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_3, length * 0.8, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_2, length * 0.904, SusHandler::SEND_WRITE); thisSequence->addSlot(objects::SUS_3, length * 0.91, SusHandler::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_2, length * 0.905, SusHandler::SEND_WRITE); thisSequence->addSlot(objects::SUS_3, length * 0.93, SusHandler::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_READ);
/* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_3, length * 0.8, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_4, length * 0.909, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_3, length * 0.91, SusHandler::SEND_WRITE); thisSequence->addSlot(objects::SUS_4, length * 0.91, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_3, length * 0.93, SusHandler::SEND_WRITE); thisSequence->addSlot(objects::SUS_4, length * 0.911, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_4, length * 0.909, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_5, length * 0.912, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_4, length * 0.91, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_5, length * 0.913, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_4, length * 0.911, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_5, length * 0.914, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_5, length * 0.912, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_6, length * 0.915, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_5, length * 0.913, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_READ);
// /* Write setup */ /* Read ADC conversions from inernal FIFO */
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_5, length * 0.914, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_6, length * 0.915, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_7, length * 0.918, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_READ);
// /* Start ADC conversions */ /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_READ);
// /* Read ADC conversions from inernal FIFO */ /* Read ADC conversions from inernal FIFO */
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_7, length * 0.918, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.921, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::GET_READ);
// /* Start ADC conversions */ /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::GET_READ);
// /* Read ADC conversions from inernal FIFO */ /* Read ADC conversions from inernal FIFO */
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_8, length * 0.921, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.924, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_READ);
// /* Start ADC conversions */ /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_READ);
// /* Read ADC conversions from inernal FIFO */ /* Read ADC conversions */
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_9, length * 0.924, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.927, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_READ);
// /* Start ADC conversions */ /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_READ);
// /* Read ADC conversions */ /* Read ADC conversions */
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_10, length * 0.927, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.93, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_READ);
// /* Start ADC conversions */ /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_READ);
// /* Read ADC conversions */ /* Read ADC conversions */
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_11, length * 0.93, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_12, length * 0.933, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::GET_READ);
// /* Start ADC conversions */ /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::GET_READ);
// /* Read ADC conversions */ /* Read ADC conversions */
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::GET_READ);
//
// /* Write setup */ /* Write setup */
// thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_13, length * 0.936, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_12, length * 0.933, SusHandler::FIRST_WRITE); thisSequence->addSlot(objects::SUS_13, length * 0.936, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_13, length * 0.936, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_13, length * 0.936, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_13, length * 0.936, DeviceHandlerIF::GET_READ);
// /* Start ADC conversions */ /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::GET_READ);
// /* Read ADC conversions */ /* Read ADC conversions */
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::GET_READ);
// #endif
// /* Write setup */
// thisSequence->addSlot(objects::SUS_13, length * 0.936, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_13, length * 0.936, SusHandler::FIRST_WRITE);
// thisSequence->addSlot(objects::SUS_13, length * 0.936, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_13, length * 0.936, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_13, length * 0.936, DeviceHandlerIF::GET_READ);
// /* Start ADC conversions */
// thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_13, length * 0.937, DeviceHandlerIF::GET_READ);
// /* Read ADC conversions */
// thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::SUS_13, length * 0.938, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RW1, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::RW1, length * 0.2, DeviceHandlerIF::SEND_WRITE);
@ -424,75 +425,94 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::RW4, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RW4, length * 0.8, DeviceHandlerIF::GET_READ);
#if OBSW_ADD_ACS_BOARD == 1 #if OBSW_ADD_ACS_BOARD == 1
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, // thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); // DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.2, // thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE); // DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.4, // thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE); // DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.6, // thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ); // DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8, // thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ); // DeviceHandlerIF::GET_READ);
//
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.2,
// DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.4,
// DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6,
// DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.8,
// DeviceHandlerIF::GET_READ);
//
// thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.2,
// DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.4,
// DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.6,
// DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.8,
// DeviceHandlerIF::GET_READ);
//
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.2,
// DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.4,
// DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.6,
// DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.8,
// DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0, // thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); // DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.2, // thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE); // DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.4, // thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE); // DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6, // thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ); // DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.8, // thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ); // DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, // thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); // DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.2, // thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE); // DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.4, // thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE); // DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.6, // thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ); // DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.8, // thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ); // DeviceHandlerIF::GET_READ);
// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.2,
// DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.4,
// DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.6,
// DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.8,
// DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); // DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE); // DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE); // DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ); // DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ); // DeviceHandlerIF::GET_READ);
#endif /* OBSW_ADD_ACS_BOARD == 1 */
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ);
#endif
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) { if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "SPI PST initialization failed" << std::endl; sif::error << "SPI PST initialization failed" << std::endl;
@ -519,8 +539,11 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) { ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
// Length of a communication cycle // Length of a communication cycle
uint32_t length = thisSequence->getPeriodMs(); uint32_t length = thisSequence->getPeriodMs();
static_cast<void>(length);
bool uartPstEmpty = true;
#if OBSW_ADD_PLOC_MPSOC == 1 #if OBSW_ADD_PLOC_MPSOC == 1
uartPstEmpty = false;
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2, thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2,
@ -550,60 +573,53 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
#endif #endif
#if Q7S_ADD_SYRLINKS_HANDLER == 1 #if Q7S_ADD_SYRLINKS_HANDLER == 1
uartPstEmpty = false;
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
#endif
#if OBSW_ADD_ACS_BOARD == 1
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
#endif
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.2, thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE); DeviceHandlerIF::SEND_WRITE);
#if OBSW_ADD_ACS_BOARD == 1
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
#endif
#if Q7S_ADD_SYRLINKS_HANDLER == 1
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.4, thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE); DeviceHandlerIF::GET_WRITE);
#endif
#if OBSW_ADD_ACS_BOARD == 1
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
#endif
#if Q7S_ADD_SYRLINKS_HANDLER == 1
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.6, thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ); DeviceHandlerIF::SEND_READ);
#endif
#if OBSW_ADD_ACS_BOARD == 1
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
#endif
#if Q7S_ADD_SYRLINKS_HANDLER == 1
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.8, thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ); DeviceHandlerIF::GET_READ);
#endif #endif
#if OBSW_ADD_ACS_BOARD == 1 #if OBSW_ADD_ACS_BOARD == 1
#if OBSW_ADD_GPS_0 == 1
uartPstEmpty = false;
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GPS0_HANDLER, length * 0.8, thisSequence->addSlot(objects::GPS0_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ); DeviceHandlerIF::GET_READ);
#endif /* OBSW_ADD_GPS_0 == 1 */
#if OBSW_ADD_GPS_1 == 1
uartPstEmpty = false;
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GPS1_HANDLER, length * 0.8, thisSequence->addSlot(objects::GPS1_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ); DeviceHandlerIF::GET_READ);
#endif #endif /* OBSW_ADD_GPS_1 == 1 */
#endif /* OBSW_ADD_ACS_BOARD == 1 */
#if OBSW_ADD_STAR_TRACKER == 1 #if OBSW_ADD_STAR_TRACKER == 1
uartPstEmpty = false;
thisSequence->addSlot(objects::START_TRACKER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::START_TRACKER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::START_TRACKER, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::START_TRACKER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::START_TRACKER, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::START_TRACKER, length * 0.4, DeviceHandlerIF::GET_WRITE);
@ -611,6 +627,9 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::START_TRACKER, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::START_TRACKER, length * 0.8, DeviceHandlerIF::GET_READ);
#endif #endif
if(uartPstEmpty) {
return HasReturnvaluesIF::RETURN_OK;
}
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) { if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "UART PST initialization failed" << std::endl; sif::error << "UART PST initialization failed" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;

View File

@ -6,6 +6,11 @@
#include "lwgps/lwgps.h" #include "lwgps/lwgps.h"
#if FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV == 1
#include <filesystem>
#include <fstream>
#endif
GPSHyperionHandler::GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication, GPSHyperionHandler::GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication,
CookieIF *comCookie, bool debugHyperionGps): CookieIF *comCookie, bool debugHyperionGps):
DeviceHandlerBase(objectId, deviceCommunication, comCookie), gpsSet(this), DeviceHandlerBase(objectId, deviceCommunication, comCookie), gpsSet(this),
@ -37,16 +42,32 @@ void GPSHyperionHandler::doShutDown() {
} }
ReturnValue_t GPSHyperionHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t GPSHyperionHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return HasReturnvaluesIF::RETURN_OK; return NOTHING_TO_SEND;
} }
ReturnValue_t GPSHyperionHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t GPSHyperionHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return HasReturnvaluesIF::RETURN_OK; return NOTHING_TO_SEND;
} }
ReturnValue_t GPSHyperionHandler::buildCommandFromCommand( ReturnValue_t GPSHyperionHandler::buildCommandFromCommand(
DeviceCommandId_t deviceCommand, const uint8_t *commandData, DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) { size_t commandDataLen) {
// By default, send nothing
rawPacketLen = 0;
switch(deviceCommand) {
case(GpsHyperion::TRIGGER_RESET_PIN): {
if(resetCallback != nullptr) {
PoolReadGuard pg(&gpsSet);
// Set HK entries invalid
gpsSet.setValidity(false, true);
// The user needs to implement this. Don't touch states for now, the device should
// quickly reboot and send valid strings again.
actionHelper.finish(true, getCommanderQueueId(deviceCommand), deviceCommand);
return resetCallback(resetCallbackArgs);
}
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
}
}
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
@ -54,9 +75,9 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) { DeviceCommandId_t *foundId, size_t *foundLen) {
// Pass data to GPS library // Pass data to GPS library
if(len > 0) { if(len > 0) {
sif::info << "GPSHandler::scanForReply: Received " << len << " bytes" << std::endl; sif::debug << "GPSHandler::scanForReply: Received " << len << " bytes" << std::endl;
if (internalState == InternalStates::WAIT_FIRST_MESSAGE) { if (internalState == InternalStates::WAIT_FIRST_MESSAGE) {
// TODO: Check whether data is valid by chcking whether NMEA start string is valid // TODO: Check whether data is valid by checking whether NMEA start string is valid?
commandExecuted = true; commandExecuted = true;
} }
int result = lwgps_process(&gpsData, start, len); int result = lwgps_process(&gpsData, start, len);
@ -82,7 +103,14 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
// Negative latitude -> South direction // Negative latitude -> South direction
gpsSet.latitude.value = gpsData.latitude; gpsSet.latitude.value = gpsData.latitude;
// Negative longitude -> West direction // Negative longitude -> West direction
gpsSet.longitude.value = gpsData.latitude; gpsSet.longitude.value = gpsData.longitude;
if(gpsData.altitude > 600000.0 or gpsData.altitude < 400000.0) {
gpsSet.altitude.setValid(false);
}
else {
gpsSet.altitude.setValid(true);
gpsSet.altitude.value = gpsData.altitude;
}
gpsSet.fixMode.value = gpsData.fix_mode; gpsSet.fixMode.value = gpsData.fix_mode;
gpsSet.satInUse.value = gpsData.sats_in_use; gpsSet.satInUse.value = gpsData.sats_in_use;
Clock::TimeOfDay_t timeStruct = {}; Clock::TimeOfDay_t timeStruct = {};
@ -101,6 +129,7 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
gpsSet.hours = gpsData.hours; gpsSet.hours = gpsData.hours;
gpsSet.minutes = gpsData.minutes; gpsSet.minutes = gpsData.minutes;
gpsSet.seconds = gpsData.seconds; gpsSet.seconds = gpsData.seconds;
gpsSet.unixSeconds = timeval.tv_sec;
if(debugHyperionGps) { if(debugHyperionGps) {
sif::info << "GPS Data" << std::endl; sif::info << "GPS Data" << std::endl;
printf("Valid status: %d\n", gpsData.is_valid); printf("Valid status: %d\n", gpsData.is_valid);
@ -108,8 +137,18 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
printf("Longitude: %f degrees\n", gpsData.longitude); printf("Longitude: %f degrees\n", gpsData.longitude);
printf("Altitude: %f meters\n", gpsData.altitude); printf("Altitude: %f meters\n", gpsData.altitude);
} }
#if FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV == 1
std::string filename = "/mnt/sd0/gps_log.txt";
std::ofstream gpsFile;
if(not std::filesystem::exists(filename)) {
gpsFile.open(filename, std::ofstream::out);
}
gpsFile.open(filename, std::ofstream::out | std::ofstream::app);
gpsFile.write(reinterpret_cast<const char*>(start), len);
#endif
} }
*foundLen = len; *foundLen = len;
*foundId = GpsHyperion::GPS_REPLY;
} }
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
@ -145,8 +184,19 @@ ReturnValue_t GPSHyperionHandler::initializeLocalDataPool(
void GPSHyperionHandler::fillCommandAndReplyMap() { void GPSHyperionHandler::fillCommandAndReplyMap() {
// Reply length does not matter, packets should always arrive periodically // Reply length does not matter, packets should always arrive periodically
insertInReplyMap(GpsHyperion::GPS_REPLY, 4, &gpsSet, 0, true); insertInReplyMap(GpsHyperion::GPS_REPLY, 4, &gpsSet, 0, true);
insertInCommandMap(GpsHyperion::TRIGGER_RESET_PIN);
} }
void GPSHyperionHandler::modeChanged() { void GPSHyperionHandler::modeChanged() {
internalState = InternalStates::NONE; internalState = InternalStates::NONE;
} }
void GPSHyperionHandler::setResetPinTriggerFunction(gpioResetFunction_t resetCallback,
void *args) {
this->resetCallback = resetCallback;
resetCallbackArgs = args;
}
void GPSHyperionHandler::debugInterface(uint8_t positionTracker, object_id_t objectId,
uint32_t parameter) {
}

View File

@ -6,7 +6,6 @@
#include "devicedefinitions/GPSDefinitions.h" #include "devicedefinitions/GPSDefinitions.h"
#include "lwgps/lwgps.h" #include "lwgps/lwgps.h"
/** /**
* @brief Device handler for the Hyperion HT-GPS200 device * @brief Device handler for the Hyperion HT-GPS200 device
* @details * @details
@ -15,12 +14,17 @@
*/ */
class GPSHyperionHandler: public DeviceHandlerBase { class GPSHyperionHandler: public DeviceHandlerBase {
public: public:
using gpioResetFunction_t = ReturnValue_t (*) (void* args);
GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication, GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication,
CookieIF* comCookie, bool debugHyperionGps = false); CookieIF* comCookie, bool debugHyperionGps = false);
virtual ~GPSHyperionHandler(); virtual ~GPSHyperionHandler();
void setResetPinTriggerFunction(gpioResetFunction_t resetCallback, void*args);
protected: protected:
gpioResetFunction_t resetCallback = nullptr;
void* resetCallbackArgs = nullptr;
enum class InternalStates { enum class InternalStates {
NONE, NONE,
WAIT_FIRST_MESSAGE, WAIT_FIRST_MESSAGE,
@ -49,7 +53,8 @@ protected:
uint32_t getTransitionDelayMs(Mode_t from, Mode_t to) override; uint32_t getTransitionDelayMs(Mode_t from, Mode_t to) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap, ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override; LocalDataPoolManager &poolManager) override;
virtual void debugInterface(uint8_t positionTracker = 0,
object_id_t objectId = 0, uint32_t parameter = 0) override;
private: private:
lwgps_t gpsData = {}; lwgps_t gpsData = {};
GpsPrimaryDataset gpsSet; GpsPrimaryDataset gpsSet;

View File

@ -75,6 +75,10 @@ ReturnValue_t GomspaceDeviceHandler::buildCommandFromCommand(
} }
break; break;
} }
case(GOMSPACE::PRINT_OUT_ENB_STATUS): {
result = printStatus(deviceCommand);
break;
}
case(GOMSPACE::REQUEST_HK_TABLE): { case(GOMSPACE::REQUEST_HK_TABLE): {
result = generateRequestFullHkTableCmd(hkTableReplySize); result = generateRequestFullHkTableCmd(hkTableReplySize);
if(result != HasReturnvaluesIF::RETURN_OK){ if(result != HasReturnvaluesIF::RETURN_OK){
@ -95,6 +99,7 @@ void GomspaceDeviceHandler::fillCommandAndReplyMap(){
this->insertInCommandAndReplyMap(GOMSPACE::PARAM_GET, 3); this->insertInCommandAndReplyMap(GOMSPACE::PARAM_GET, 3);
this->insertInCommandAndReplyMap(GOMSPACE::REQUEST_HK_TABLE, 3); this->insertInCommandAndReplyMap(GOMSPACE::REQUEST_HK_TABLE, 3);
this->insertInCommandMap(GOMSPACE::GNDWDT_RESET); this->insertInCommandMap(GOMSPACE::GNDWDT_RESET);
this->insertInCommandMap(GOMSPACE::PRINT_OUT_ENB_STATUS);
} }
ReturnValue_t GomspaceDeviceHandler::scanForReply(const uint8_t *start, ReturnValue_t GomspaceDeviceHandler::scanForReply(const uint8_t *start,
@ -396,3 +401,8 @@ LocalPoolDataSetBase* GomspaceDeviceHandler::getDataSetHandle(sid_t sid) {
void GomspaceDeviceHandler::setModeNormal() { void GomspaceDeviceHandler::setModeNormal() {
mode = MODE_NORMAL; mode = MODE_NORMAL;
} }
ReturnValue_t GomspaceDeviceHandler::printStatus(DeviceCommandId_t cmd) {
sif::info << "No printHkTable implementation given.." << std::endl;
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -88,6 +88,13 @@ protected:
*/ */
virtual ReturnValue_t generateRequestFullHkTableCmd(uint16_t hkTableSize); virtual ReturnValue_t generateRequestFullHkTableCmd(uint16_t hkTableSize);
/**
* This command handles printing the HK table to the console. This is useful for debugging
* purposes
* @return
*/
virtual ReturnValue_t printStatus(DeviceCommandId_t cmd);
/** /**
* @brief Because housekeeping tables are device specific the handling of the reply is * @brief Because housekeeping tables are device specific the handling of the reply is
* given to the child class. * given to the child class.

View File

@ -73,6 +73,7 @@ ReturnValue_t GyroADIS16507Handler::buildTransitionDeviceCommand(DeviceCommandId
break; break;
} }
case(InternalState::STARTUP): { case(InternalState::STARTUP): {
return NOTHING_TO_SEND;
break; break;
} }
default: { default: {

View File

@ -1,11 +1,12 @@
#include <fsfw/datapool/PoolReadGuard.h>
#include "PDU1Handler.h" #include "PDU1Handler.h"
#include <mission/devices/devicedefinitions/GomSpacePackets.h> #include <mission/devices/devicedefinitions/GomSpacePackets.h>
#include <OBSWConfig.h> #include <OBSWConfig.h>
PDU1Handler::PDU1Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) : PDU1Handler::PDU1Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS, GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu1HkTableDataset), pdu1HkTableDataset( PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu1HkTableDataset),
this) { pdu1HkTableDataset(this) {
} }
PDU1Handler::~PDU1Handler() { PDU1Handler::~PDU1Handler() {
@ -55,25 +56,9 @@ void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
<< std::endl; << std::endl;
sif::info << "PDU1 channel 8 current: " << pdu1HkTableDataset.currentOutChannel8 sif::info << "PDU1 channel 8 current: " << pdu1HkTableDataset.currentOutChannel8
<< std::endl; << std::endl;
sif::info << "PDU1 TCS Board switch: " printOutputSwitchStates();
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledTCSBoard3V3.value) << std::endl; sif::info << "PDU1 battery mode: " <<
sif::info << "PDU1 Syrlinks switch: " static_cast<unsigned int>(pdu1HkTableDataset.battMode.value) << std::endl;
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSyrlinks.value) << std::endl;
sif::info << "PDU1 star tracker switch: "
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledStarTracker.value) << std::endl;
sif::info << "PDU1 MGT switch: "
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledMGT.value) << std::endl;
sif::info << "PDU1 SUS nominal switch: "
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSUSNominal.value) << std::endl;
sif::info << "PDU1 solar cell experiment switch: "
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSolarCellExp.value) << std::endl;
sif::info << "PDU1 PLOC switch: "
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledPLOC.value) << std::endl;
sif::info << "PDU1 ACS Side A switch: "
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledAcsBoardSideA.value) << std::endl;
sif::info << "PDU1 channel 8 switch: "
<< static_cast<unsigned int>(pdu1HkTableDataset.outEnabledChannel8.value) << std::endl;
sif::info << "PDU1 battery mode: " << static_cast<unsigned int>(pdu1HkTableDataset.battMode.value) << std::endl;
sif::info << "PDU1 VCC: " << pdu1HkTableDataset.vcc << " mV" << std::endl; sif::info << "PDU1 VCC: " << pdu1HkTableDataset.vcc << " mV" << std::endl;
float vbat = pdu1HkTableDataset.vbat.value * 0.001; float vbat = pdu1HkTableDataset.vbat.value * 0.001;
sif::info << "PDU1 VBAT: " << vbat << "V" << std::endl; sif::info << "PDU1 VBAT: " << vbat << "V" << std::endl;
@ -87,9 +72,35 @@ void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
#endif #endif
} }
void PDU1Handler::printOutputSwitchStates() {
sif::info << "PDU1 TCS Board switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledTCSBoard3V3.value) << std::endl;
sif::info << "PDU1 Syrlinks switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSyrlinks.value) << std::endl;
sif::info << "PDU1 star tracker switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledStarTracker.value) << std::endl;
sif::info << "PDU1 MGT switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledMGT.value) << std::endl;
sif::info << "PDU1 SUS nominal switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSUSNominal.value) << std::endl;
sif::info << "PDU1 solar cell experiment switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSolarCellExp.value) << std::endl;
sif::info << "PDU1 PLOC switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledPLOC.value) << std::endl;
sif::info << "PDU1 ACS Side A switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledAcsBoardSideA.value) << std::endl;
sif::info << "PDU1 channel 8 switch: " <<
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledChannel8.value) << std::endl;
}
void PDU1Handler::parseHkTableReply(const uint8_t *packet) { void PDU1Handler::parseHkTableReply(const uint8_t *packet) {
uint16_t dataOffset = 0; uint16_t dataOffset = 0;
pdu1HkTableDataset.read(); PoolReadGuard pg(&pdu1HkTableDataset);
ReturnValue_t readResult = pg.getReadResult();
if(readResult != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Reading PDU1 HK table failed!" << std::endl;
return;
}
/* Fist 10 bytes contain the gomspace header. Each variable is preceded by the 16-bit table /* Fist 10 bytes contain the gomspace header. Each variable is preceded by the 16-bit table
* address. */ * address. */
dataOffset += 12; dataOffset += 12;
@ -249,8 +260,10 @@ void PDU1Handler::parseHkTableReply(const uint8_t *packet) {
dataOffset += 3; dataOffset += 3;
pdu1HkTableDataset.csp2WatchdogPingsLeft = *(packet + dataOffset); pdu1HkTableDataset.csp2WatchdogPingsLeft = *(packet + dataOffset);
pdu1HkTableDataset.commit();
pdu1HkTableDataset.setChanged(true); pdu1HkTableDataset.setChanged(true);
if(not pdu1HkTableDataset.isValid()) {
pdu1HkTableDataset.setValidity(true, true);
}
} }
ReturnValue_t PDU1Handler::initializeLocalDataPool( ReturnValue_t PDU1Handler::initializeLocalDataPool(
@ -341,3 +354,20 @@ ReturnValue_t PDU1Handler::initializeLocalDataPool(
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t PDU1Handler::printStatus(DeviceCommandId_t cmd) {
switch(cmd) {
case(GOMSPACE::PRINT_OUT_ENB_STATUS): {
PoolReadGuard pg(&pdu1HkTableDataset);
ReturnValue_t readResult = pg.getReadResult();
if(readResult != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Reading PDU1 HK table failed!" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
printOutputSwitchStates();
return HasReturnvaluesIF::RETURN_OK;
}
default: {
return HasReturnvaluesIF::RETURN_FAILED;
}
}
}

View File

@ -32,11 +32,13 @@ protected:
*/ */
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override; virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override;
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override; virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
ReturnValue_t printStatus(DeviceCommandId_t cmd) override;
private: private:
/** Dataset for the housekeeping table of the PDU1 */ /** Dataset for the housekeeping table of the PDU1 */
PDU1::PDU1HkTableDataset pdu1HkTableDataset; PDU1::PDU1HkTableDataset pdu1HkTableDataset;
void printOutputSwitchStates();
void parseHkTableReply(const uint8_t *packet); void parseHkTableReply(const uint8_t *packet);
}; };

View File

@ -1,11 +1,13 @@
#include "OBSWConfig.h"
#include "PDU2Handler.h" #include "PDU2Handler.h"
#include <mission/devices/devicedefinitions/GomSpacePackets.h> #include <mission/devices/devicedefinitions/GomSpacePackets.h>
#include <OBSWConfig.h> #include <fsfw/datapool/PoolReadGuard.h>
PDU2Handler::PDU2Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) : PDU2Handler::PDU2Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS, GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu2HkTableDataset), pdu2HkTableDataset( PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu2HkTableDataset),
this) { pdu2HkTableDataset(this) {
} }
PDU2Handler::~PDU2Handler() { PDU2Handler::~PDU2Handler() {
@ -34,23 +36,7 @@ void PDU2Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
sif::info << "PDU2 VBAT: " << vbat << std::endl; sif::info << "PDU2 VBAT: " << vbat << std::endl;
float temperatureC = pdu2HkTableDataset.temperature.value * 0.1; float temperatureC = pdu2HkTableDataset.temperature.value * 0.1;
sif::info << "PDU2 Temperature: " << temperatureC << " °C" << std::endl; sif::info << "PDU2 Temperature: " << temperatureC << " °C" << std::endl;
sif::info << "PDU2 Q7S enable state: " << unsigned(pdu2HkTableDataset.outEnabledQ7S.value) << std::endl; printOutputSwitchStates();
sif::info << "PDU2 Payload PCDU channel 1 enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledPlPCDUCh1.value) << std::endl;
sif::info << "PDU2 reaction wheels enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledReactionWheels.value) << std::endl;
sif::info << "PDU2 TCS Board 8V heater input enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledTCSBoardHeaterIn.value) << std::endl;
sif::info << "PDU2 redundant SUS group enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledSUSRedundant.value) << std::endl;
sif::info << "PDU2 deployment mechanism enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledDeplMechanism.value) << std::endl;
sif::info << "PDU2 PCDU channel 6 enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledPlPCDUCh6.value) << std::endl;
sif::info << "PDU2 ACS board side B enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledAcsBoardSideB.value) << std::endl;
sif::info << "PDU2 payload camera enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledPayloadCamera.value) << std::endl;
sif::info << "PDU2 uptime: " << pdu2HkTableDataset.uptime << " seconds" << std::endl; sif::info << "PDU2 uptime: " << pdu2HkTableDataset.uptime << " seconds" << std::endl;
sif::info << "PDU2 battery mode: " << unsigned(pdu2HkTableDataset.battMode.value) << std::endl; sif::info << "PDU2 battery mode: " << unsigned(pdu2HkTableDataset.battMode.value) << std::endl;
sif::info << "PDU2 ground watchdog reboots: " << pdu2HkTableDataset.gndWdtReboots << std::endl; sif::info << "PDU2 ground watchdog reboots: " << pdu2HkTableDataset.gndWdtReboots << std::endl;
@ -323,3 +309,42 @@ ReturnValue_t PDU2Handler::initializeLocalDataPool(
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t PDU2Handler::printStatus(DeviceCommandId_t cmd) {
switch(cmd) {
case(GOMSPACE::PRINT_OUT_ENB_STATUS): {
PoolReadGuard pg(&pdu2HkTableDataset);
ReturnValue_t readResult = pg.getReadResult();
if(readResult != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Reading PDU2 HK table failed!" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
printOutputSwitchStates();
return HasReturnvaluesIF::RETURN_OK;
}
default: {
return HasReturnvaluesIF::RETURN_FAILED;
}
}
}
void PDU2Handler::printOutputSwitchStates() {
sif::info << "PDU2 Q7S enable state: " <<
unsigned(pdu2HkTableDataset.outEnabledQ7S.value) << std::endl;
sif::info << "PDU2 Payload PCDU channel 1 enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledPlPCDUCh1.value) << std::endl;
sif::info << "PDU2 reaction wheels enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledReactionWheels.value) << std::endl;
sif::info << "PDU2 TCS Board 8V heater input enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledTCSBoardHeaterIn.value) << std::endl;
sif::info << "PDU2 redundant SUS group enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledSUSRedundant.value) << std::endl;
sif::info << "PDU2 deployment mechanism enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledDeplMechanism.value) << std::endl;
sif::info << "PDU2 PCDU channel 6 enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledPlPCDUCh6.value) << std::endl;
sif::info << "PDU2 ACS board side B enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledAcsBoardSideB.value) << std::endl;
sif::info << "PDU2 payload camera enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledPayloadCamera.value) << std::endl;
}

View File

@ -32,12 +32,14 @@ protected:
*/ */
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override; virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override;
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override; virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
ReturnValue_t printStatus(DeviceCommandId_t cmd) override;
private: private:
/** Dataset for the housekeeping table of the PDU2 */ /** Dataset for the housekeeping table of the PDU2 */
PDU2::PDU2HkTableDataset pdu2HkTableDataset; PDU2::PDU2HkTableDataset pdu2HkTableDataset;
void printOutputSwitchStates();
void parseHkTableReply(const uint8_t *packet); void parseHkTableReply(const uint8_t *packet);
}; };

View File

@ -7,6 +7,7 @@
namespace GpsHyperion { namespace GpsHyperion {
static constexpr DeviceCommandId_t GPS_REPLY = 0; static constexpr DeviceCommandId_t GPS_REPLY = 0;
static constexpr DeviceCommandId_t TRIGGER_RESET_PIN = 5;
static constexpr uint32_t DATASET_ID = 0; static constexpr uint32_t DATASET_ID = 0;

View File

@ -15,28 +15,30 @@
#include <fsfw/datapoollocal/LocalPoolVariable.h> #include <fsfw/datapoollocal/LocalPoolVariable.h>
namespace GOMSPACE{ namespace GOMSPACE{
static const uint16_t IGNORE_CHECKSUM = 0xbb0; static const uint16_t IGNORE_CHECKSUM = 0xbb0;
/** 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;
/** CSP port to ping gomspace devices. */ /** CSP port to ping gomspace devices. */
static const uint8_t PING_PORT = 1; static const uint8_t PING_PORT = 1;
static const uint8_t REBOOT_PORT = 4; static const uint8_t REBOOT_PORT = 4;
/** CSP port of gomspace devices to request or set parameters */ /** CSP port of gomspace devices to request or set parameters */
static const uint8_t PARAM_PORT = 7; static const uint8_t PARAM_PORT = 7;
static const uint8_t P60_PORT_GNDWDT_RESET = 9; static const uint8_t P60_PORT_GNDWDT_RESET = 9;
/* Device commands are derived from the rparam.h of the gomspace lib */
static const DeviceCommandId_t PING = 1; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t NONE = 2; // Set when no command is pending
static const DeviceCommandId_t REBOOT = 4; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t GNDWDT_RESET = 9; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t PARAM_GET = 0; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t PARAM_SET = 255; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t REQUEST_HK_TABLE = 16; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t PRINT_OUT_ENB_STATUS = 17; //!< [EXPORT] : [COMMAND]
/* Device commands are derived from the rparam.h of the gomspace lib */
static const DeviceCommandId_t PING = 0x1; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t NONE = 0x2; // Set when no command is pending
static const DeviceCommandId_t REBOOT = 0x4; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t GNDWDT_RESET = 0x9; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t PARAM_GET = 0x00; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t PARAM_SET = 0xFF; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t REQUEST_HK_TABLE = 0x10; //!< [EXPORT] : [COMMAND]
} }
namespace P60System { namespace P60System {
enum P60SytemPoolIds: lp_id_t { enum P60SytemPoolIds: lp_id_t {
P60DOCK_CURRENT_ACU_VCC, P60DOCK_CURRENT_ACU_VCC,
P60DOCK_CURRENT_PDU1_VCC, P60DOCK_CURRENT_PDU1_VCC,
P60DOCK_CURRENT_X3_IDLE_VCC, P60DOCK_CURRENT_X3_IDLE_VCC,
@ -351,32 +353,32 @@ namespace P60System {
ACU_DEVICE_7_STATUS, ACU_DEVICE_7_STATUS,
ACU_WDT_CNT_GND, ACU_WDT_CNT_GND,
ACU_WDT_GND_LEFT ACU_WDT_GND_LEFT
}; };
} }
namespace P60Dock { namespace P60Dock {
/** Max reply size reached when requesting full hk table */ /** Max reply size reached when requesting full hk table */
static const uint16_t MAX_REPLY_LENGTH = 407; static const uint16_t MAX_REPLY_LENGTH = 407;
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 408; static const uint16_t MAX_CONFIGTABLE_ADDRESS = 408;
static const uint16_t MAX_HKTABLE_ADDRESS = 187; static const uint16_t MAX_HKTABLE_ADDRESS = 187;
static const uint16_t HK_TABLE_SIZE = 188; static const uint16_t HK_TABLE_SIZE = 188;
static const uint8_t HK_TABLE_DATA_SET_ID = 0x3; static const uint8_t HK_TABLE_DATA_SET_ID = 0x3;
static const uint8_t HK_TABLE_ENTRIES = 100; static const uint8_t HK_TABLE_ENTRIES = 100;
/** /**
* Requesting the full housekeeping table from the P60 dock will generate a reply comprising * Requesting the full housekeeping table from the P60 dock will generate a reply comprising
* 402 bytes of data. * 402 bytes of data.
*/ */
static const uint16_t HK_TABLE_REPLY_SIZE = 407; static const uint16_t HK_TABLE_REPLY_SIZE = 407;
/** /**
* @brief This class defines a dataset for the hk table of the P60 Dock. * @brief This class defines a dataset for the hk table of the P60 Dock.
*/ */
class HkTableDataset: class HkTableDataset:
public StaticLocalDataSet<HK_TABLE_ENTRIES> { public StaticLocalDataSet<HK_TABLE_ENTRIES> {
public: public:
@ -602,7 +604,7 @@ namespace P60Dock {
P60System::P60DOCK_ANT6_DEPL, this); P60System::P60DOCK_ANT6_DEPL, this);
lp_var_t<int8_t> ar6Depl = lp_var_t<int8_t>(sid.objectId, lp_var_t<int8_t> ar6Depl = lp_var_t<int8_t>(sid.objectId,
P60System::P60DOCK_AR6_DEPL, this); P60System::P60DOCK_AR6_DEPL, this);
}; };
} }
@ -610,36 +612,36 @@ namespace P60Dock {
* @brief Constants common for both PDU1 and PDU2. * @brief Constants common for both PDU1 and PDU2.
*/ */
namespace PDU{ namespace PDU{
/** When retrieving full configuration parameter table */ /** When retrieving full configuration parameter table */
static const uint16_t MAX_REPLY_LENGTH = 318; static const uint16_t MAX_REPLY_LENGTH = 318;
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316; static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316;
static const uint16_t MAX_HKTABLE_ADDRESS = 141; static const uint16_t MAX_HKTABLE_ADDRESS = 141;
/** The size of the csp reply containing the housekeeping table data */ /** The size of the csp reply containing the housekeeping table data */
static const uint16_t HK_TABLE_REPLY_SIZE = 303; static const uint16_t HK_TABLE_REPLY_SIZE = 303;
static const uint8_t HK_TABLE_ENTRIES = 73; static const uint8_t HK_TABLE_ENTRIES = 73;
} }
namespace PDU1 { namespace PDU1 {
static const uint32_t HK_TABLE_DATA_SET_ID = 0x1; // hk table has table id 4 static const uint32_t HK_TABLE_DATA_SET_ID = 0x1; // hk table has table id 4
/** /**
* Addresses within configuration table to enable or disable output channels. Refer also to * Addresses within configuration table to enable or disable output channels. Refer also to
* gs-man-nanopower-p60-pdu-200.pdf on page 16. * gs-man-nanopower-p60-pdu-200.pdf on page 16.
*/ */
static const uint16_t CONFIG_ADDRESS_OUT_EN_TCS_BOARD_3V3 = 0x48; static const uint16_t CONFIG_ADDRESS_OUT_EN_TCS_BOARD_3V3 = 0x48;
static const uint16_t CONFIG_ADDRESS_OUT_EN_SYRLINKS = 0x49; static const uint16_t CONFIG_ADDRESS_OUT_EN_SYRLINKS = 0x49;
static const uint16_t CONFIG_ADDRESS_OUT_EN_STAR_TRACKER = 0x50; static const uint16_t CONFIG_ADDRESS_OUT_EN_STAR_TRACKER = 0x50;
static const uint16_t CONFIG_ADDRESS_OUT_EN_MGT = 0x51; static const uint16_t CONFIG_ADDRESS_OUT_EN_MGT = 0x51;
static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_NOMINAL = 0x52; static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_NOMINAL = 0x52;
static const uint16_t CONFIG_ADDRESS_OUT_EN_SOLAR_CELL_EXP = 0x53; static const uint16_t CONFIG_ADDRESS_OUT_EN_SOLAR_CELL_EXP = 0x53;
static const uint16_t CONFIG_ADDRESS_OUT_EN_PLOC = 0x54; static const uint16_t CONFIG_ADDRESS_OUT_EN_PLOC = 0x54;
static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_A = 0x55; static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_A = 0x55;
static const uint16_t CONFIG_ADDRESS_OUT_EN_CHANNEL8 = 0x56; static const uint16_t CONFIG_ADDRESS_OUT_EN_CHANNEL8 = 0x56;
/** /**
* @brief This class defines a dataset for the hk table of the PDU1. * @brief This class defines a dataset for the hk table of the PDU1.
*/ */
class PDU1HkTableDataset : class PDU1HkTableDataset :
public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> { public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> {
public: public:
@ -824,30 +826,30 @@ namespace PDU1 {
P60System::PDU1_WDT_CSP_LEFT1, this); P60System::PDU1_WDT_CSP_LEFT1, this);
lp_var_t<uint8_t> csp1WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> csp1WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_WDT_CSP_LEFT2, this); P60System::PDU1_WDT_CSP_LEFT2, this);
}; };
} }
namespace PDU2 { namespace PDU2 {
static const uint32_t HK_TABLE_DATA_SET_ID = 0x2; static const uint32_t HK_TABLE_DATA_SET_ID = 0x2;
/** /**
* Addresses within configuration table to enable or disable output channels. Refer also to * Addresses within configuration table to enable or disable output channels. Refer also to
* gs-man-nanopower-p60-pdu-200.pdf on page 16. * gs-man-nanopower-p60-pdu-200.pdf on page 16.
*/ */
static const uint16_t CONFIG_ADDRESS_OUT_EN_Q7S = 0x48; static const uint16_t CONFIG_ADDRESS_OUT_EN_Q7S = 0x48;
static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH1 = 0x49; static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH1 = 0x49;
static const uint16_t CONFIG_ADDRESS_OUT_EN_RW = 0x4A; static const uint16_t CONFIG_ADDRESS_OUT_EN_RW = 0x4A;
static const uint16_t CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN = 0x4B; static const uint16_t CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN = 0x4B;
static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT = 0x4C; static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT = 0x4C;
static const uint16_t CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM = 0x4D; static const uint16_t CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM = 0x4D;
static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6PLOC = 0x4E; static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6PLOC = 0x4E;
static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B = 0x4F; static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B = 0x4F;
static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA = 0x50; static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA = 0x50;
/** /**
* @brief This class defines a dataset for the hk table of the PDU2. * @brief This class defines a dataset for the hk table of the PDU2.
*/ */
class PDU2HkTableDataset: class PDU2HkTableDataset:
public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> { public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> {
public: public:
@ -1032,25 +1034,25 @@ namespace PDU2 {
P60System::PDU2_WDT_CSP_LEFT1, this); P60System::PDU2_WDT_CSP_LEFT1, this);
lp_var_t<uint8_t> csp2WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> csp2WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_WDT_CSP_LEFT2, this); P60System::PDU2_WDT_CSP_LEFT2, this);
}; };
} }
namespace ACU { namespace ACU {
static const uint32_t HK_TABLE_DATA_SET_ID = 0x4; static const uint32_t HK_TABLE_DATA_SET_ID = 0x4;
/* When receiving full housekeeping (telemetry) table */ /* When receiving full housekeeping (telemetry) table */
static const uint16_t MAX_REPLY_LENGTH = 262; static const uint16_t MAX_REPLY_LENGTH = 262;
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26; static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26;
static const uint16_t MAX_HKTABLE_ADDRESS = 120; static const uint16_t MAX_HKTABLE_ADDRESS = 120;
static const uint8_t HK_TABLE_ENTRIES = 64; static const uint8_t HK_TABLE_ENTRIES = 64;
static const uint16_t HK_TABLE_REPLY_SIZE = 262; static const uint16_t HK_TABLE_REPLY_SIZE = 262;
/** /**
* @brief This class defines a dataset for the hk table of the ACU. * @brief This class defines a dataset for the hk table of the ACU.
*/ */
class HkTableDataset: class HkTableDataset:
public StaticLocalDataSet<HK_TABLE_ENTRIES> { public StaticLocalDataSet<HK_TABLE_ENTRIES> {
public: public:
@ -1200,7 +1202,7 @@ namespace ACU {
P60System::ACU_WDT_CNT_GND, this); P60System::ACU_WDT_CNT_GND, this);
lp_var_t<uint32_t> wdtGndLeft = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> wdtGndLeft = lp_var_t<uint32_t>(sid.objectId,
P60System::ACU_WDT_GND_LEFT, this); P60System::ACU_WDT_GND_LEFT, this);
}; };
} }
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_ */ #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_ */

@ -1 +1 @@
Subproject commit 657c06e4a6e4c460e897c4a5b4eaefe7c6d1085e Subproject commit 2d10c6b85ea4cab4f4baf1918c51d54eee4202c2

2
thirdparty/lwgps vendored

@ -1 +1 @@
Subproject commit 3dbfe390a6784ebc723d3907062cf883c8cf85cd Subproject commit 52999ddfe5177493b96b55871961a8a97131596d

2
tmtc

@ -1 +1 @@
Subproject commit 9b176aebfaba51f4d045881a125d42b123f4eeb3 Subproject commit 90f85b7dae63e93a3c5686fab9dd0d4a8147e96b