GNSS ACS board update #92
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -15,7 +15,7 @@
|
||||
url = https://github.com/rmspacefish/lwgps.git
|
||||
[submodule "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"]
|
||||
path = thirdparty/arcsec_star_tracker
|
||||
url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git
|
||||
|
@ -86,6 +86,7 @@ include (${CMAKE_SCRIPT_PATH}/HardwareOsPreConfig.cmake)
|
||||
pre_source_hw_os_config()
|
||||
|
||||
if(TGT_BSP)
|
||||
message(STATUS ${TGT_BSP})
|
||||
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi"
|
||||
OR TGT_BSP MATCHES "arm/beagleboneblack"
|
||||
)
|
||||
@ -97,18 +98,18 @@ if(TGT_BSP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${TGT_BSP} MATCHES "arm/raspberrypi")
|
||||
if(TGT_BSP MATCHES "arm/raspberrypi")
|
||||
# Used by configure file
|
||||
set(RASPBERRY_PI ON)
|
||||
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
|
||||
endif()
|
||||
|
||||
if(${TGT_BSP} MATCHES "arm/beagleboneblack")
|
||||
if(TGT_BSP MATCHES "arm/beagleboneblack")
|
||||
# Used by configure file
|
||||
set(BEAGLEBONEBLACK ON)
|
||||
endif()
|
||||
|
||||
if(${TGT_BSP} MATCHES "arm/q7s")
|
||||
if(TGT_BSP MATCHES "arm/q7s")
|
||||
# Used by configure file
|
||||
set(XIPHOS_Q7S ON)
|
||||
endif()
|
||||
@ -122,9 +123,9 @@ if(NOT EIVE_BUILD_WATCHDOG)
|
||||
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}/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)
|
||||
elseif(${TGT_BSP} MATCHES "arm/raspberrypi")
|
||||
elseif(TGT_BSP MATCHES "arm/raspberrypi")
|
||||
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
|
||||
endif()
|
||||
endif()
|
||||
@ -135,8 +136,6 @@ set(FSFW_ADDITIONAL_INC_PATHS
|
||||
"${COMMON_PATH}/config"
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
# Set for lwgps library
|
||||
set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config")
|
||||
|
||||
################################################################################
|
||||
# Executable and Sources
|
||||
|
29
README.md
29
README.md
@ -65,7 +65,7 @@ prerequisites.
|
||||
as a [separate download](#arm-toolchain)
|
||||
2. [Q7S sysroot](#q7s-sysroot) on local development machine
|
||||
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
|
||||
|
||||
@ -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)
|
||||
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
|
||||
|
||||
You can download the toolchains for Windows and Linux
|
||||
|
@ -112,6 +112,7 @@ void ObjectFactory::produce(void* args){
|
||||
if(gpioCookie == nullptr) {
|
||||
gpioCookie = new GpioCookie();
|
||||
}
|
||||
// TODO: Missing pin for Gyro 2
|
||||
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN,
|
||||
"MGM_0_LIS3", gpio::Direction::OUT, 1);
|
||||
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);
|
||||
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN,
|
||||
"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);
|
||||
gpioIF->addGpios(gpioCookie);
|
||||
|
||||
|
@ -12,6 +12,6 @@ else()
|
||||
add_subdirectory(gpio)
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(memory)
|
||||
add_subdirectory(spiCallbacks)
|
||||
add_subdirectory(callbacks)
|
||||
add_subdirectory(devices)
|
||||
endif()
|
||||
|
@ -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_SUPERVSIOR_DEV[] = "/dev/ttyUL4";
|
||||
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL5";
|
||||
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8";
|
||||
|
||||
static constexpr char GPIO_ACS_BOARD_DEFAULT_CHIP[] = "gpiochip5";
|
||||
static constexpr char GPIO_MGM2_LIS3_CHIP[] = "gpiochip6";
|
||||
static constexpr char UART_GNSS_0_DEV[] = "/dev/ttyUL0";
|
||||
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;
|
||||
static constexpr uint32_t GPIO_GYRO_1_L3G_CS = 7;
|
||||
static constexpr uint32_t GPIO_GYRO_2_ADIS_CS = 3;
|
||||
static constexpr uint32_t GPIO_GYRO_3_L3G_CS = 3;
|
||||
/**************************************************************/
|
||||
/** OBC1E */
|
||||
/**************************************************************/
|
||||
static constexpr char GPIO_MULTIPURPOSE_1V8_OBC1D[] = "gpiochip4";
|
||||
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;
|
||||
static constexpr uint32_t GPIO_MGM_2_LIS3_CS = 0;
|
||||
static constexpr uint32_t GPIO_MGM_3_RM3100_CS = 10;
|
||||
/**************************************************************/
|
||||
/** OBC1F B0 */
|
||||
/**************************************************************/
|
||||
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;
|
||||
static constexpr uint32_t GPIO_RW_0_CS = 7; // B20
|
||||
static constexpr uint32_t GPIO_RW_1_CS = 3;
|
||||
static constexpr uint32_t GPIO_RW_2_CS = 11;
|
||||
static constexpr uint32_t GPIO_RW_3_CS = 6;
|
||||
|
||||
static constexpr char GPIO_RW_SPI_MUX_CHIP[] = "gpiochip11";
|
||||
static constexpr uint32_t GPIO_RW_SPI_MUX_CS = 57;
|
||||
static constexpr uint32_t GPIO_GYRO_1_L3G_CS = 18;
|
||||
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_1_PIN = 12;
|
||||
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_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_1_PIN = 2;
|
||||
|
||||
static constexpr char GPIO_RAD_SENSOR_CHIP[] = "gpiochip5";
|
||||
static constexpr uint32_t GPIO_RAD_SENSOR_CS = 19;
|
||||
static constexpr char GPIO_RW_SPI_MUX_CHIP[] = "gpiochip11";
|
||||
static constexpr uint32_t GPIO_RW_SPI_MUX_CS = 57;
|
||||
|
||||
}
|
||||
|
||||
#endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */
|
||||
|
@ -5,6 +5,17 @@
|
||||
|
||||
#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_COLD_REDUNDANT 1
|
||||
#define Q7S_SD_HOT_REDUNDANT 2
|
||||
@ -19,15 +30,11 @@
|
||||
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1
|
||||
#define Q7S_ADD_RTD_DEVICES 0
|
||||
|
||||
/* Only one of those 2 should be enabled! */
|
||||
/* Add code for ACS board */
|
||||
#define OBSW_ADD_ACS_BOARD 0
|
||||
// Only one of those 2 should be enabled!
|
||||
#if OBSW_ADD_ACS_BOARD == 0
|
||||
#define Q7S_ADD_SPI_TEST 0
|
||||
#endif
|
||||
|
||||
#define Q7S_ADD_SYRLINKS_HANDLER 1
|
||||
|
||||
#define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0
|
||||
|
||||
namespace config {
|
||||
|
@ -1,3 +1,4 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
rwSpiCallback.cpp
|
||||
gnssCallback.cpp
|
||||
)
|
26
bsp_q7s/callbacks/gnssCallback.cpp
Normal file
26
bsp_q7s/callbacks/gnssCallback.cpp
Normal 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;
|
||||
}
|
19
bsp_q7s/callbacks/gnssCallback.h
Normal file
19
bsp_q7s/callbacks/gnssCallback.h
Normal 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_ */
|
@ -1,9 +1,10 @@
|
||||
#include <bsp_q7s/spiCallbacks/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 "rwSpiCallback.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 {
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef BSP_Q7S_RW_SPI_CALLBACK_H_
|
||||
#define BSP_Q7S_RW_SPI_CALLBACK_H_
|
||||
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
||||
#include "fsfw_hal/linux/spi/SpiComIF.h"
|
||||
#include "fsfw_hal/common/gpio/GpioCookie.h"
|
||||
|
||||
|
||||
namespace rwSpiCallback {
|
@ -9,12 +9,13 @@
|
||||
#include "devices/powerSwitcherList.h"
|
||||
#include "bsp_q7s/gpio/gpioCallbacks.h"
|
||||
#include "bsp_q7s/core/CoreController.h"
|
||||
#include "bsp_q7s/spiCallbacks/rwSpiCallback.h"
|
||||
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
||||
#include "bsp_q7s/memory/FileSystemHandler.h"
|
||||
#include "bsp_q7s/devices/PlocSupervisorHandler.h"
|
||||
#include "bsp_q7s/devices/PlocUpdater.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/SolarArrayDeploymentHandler.h"
|
||||
@ -32,6 +33,7 @@
|
||||
#include "mission/devices/P60DockHandler.h"
|
||||
#include "mission/devices/Tmp1075Handler.h"
|
||||
#include "mission/devices/Max31865PT1000Handler.h"
|
||||
#include "mission/devices/GyroADIS16507Handler.h"
|
||||
#include "mission/devices/IMTQHandler.h"
|
||||
#include "mission/devices/SyrlinksHkHandler.h"
|
||||
#include "mission/devices/MGMHandlerLIS3MDL.h"
|
||||
@ -81,6 +83,9 @@
|
||||
#include "linux/boardtest/LibgpiodTest.h"
|
||||
#endif
|
||||
|
||||
ResetArgs resetArgsGnss0;
|
||||
ResetArgs resetArgsGnss1;
|
||||
|
||||
void ObjectFactory::setStatics() {
|
||||
Factory::setStaticFrameworkObjectIds();
|
||||
}
|
||||
@ -169,7 +174,8 @@ void ObjectFactory::produce(void* args){
|
||||
sif::info << "Created UDP server for TMTC commanding with listener port " <<
|
||||
udpBridge->getUdpPort() << std::endl;
|
||||
#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);
|
||||
sif::info << "Created TCP server for TMTC commanding with listener port " <<
|
||||
tcpServer->getTcpPort() << std::endl;
|
||||
@ -391,14 +397,13 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF,
|
||||
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComIF* uartComIF) {
|
||||
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
||||
GpiodRegular* gpio = nullptr;
|
||||
// TODO: Determine new Gyro GPIO pins
|
||||
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_0_ADIS_CS,
|
||||
gpio = new GpiodRegular(q7s::GPIO_GYRO_ADIS_CHIP, q7s::GPIO_GYRO_0_ADIS_CS,
|
||||
"CS_GYRO_0_ADIS", gpio::OUT, gpio::HIGH);
|
||||
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio);
|
||||
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_1_L3G_CS,
|
||||
"CS_GYRO_1_L3G", gpio::OUT, gpio::HIGH);
|
||||
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);
|
||||
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio);
|
||||
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);
|
||||
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);
|
||||
|
||||
std::string spiDev = q7s::SPI_DEFAULT_DEV;
|
||||
@ -427,48 +444,75 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
||||
objects::SPI_COM_IF, spiCookie);
|
||||
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,
|
||||
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||
auto mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_1_RM3100_HANDLER,
|
||||
objects::SPI_COM_IF, spiCookie);
|
||||
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,
|
||||
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||
mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_3_RM3100_HANDLER,
|
||||
objects::SPI_COM_IF, spiCookie);
|
||||
mgmRm3100Handler->setStartUpImmediately();
|
||||
|
||||
//TODO: Adis Gyro (Gyro 0 Side A)
|
||||
|
||||
// Commented until ACS board V2 in in clean room again
|
||||
/* Gyro 1 Side A */
|
||||
// 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);
|
||||
// auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
|
||||
// spiCookie);
|
||||
// gyroL3gHandler->setStartUpImmediately();
|
||||
//
|
||||
// /* Gyro 2 Side B */
|
||||
// spiCookie = new SpiCookie(addresses::GYRO_2_L3G, gpioIds::GYRO_2_L3G_CS, spiDev,
|
||||
// L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||
// gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_2_L3G_HANDLER, objects::SPI_COM_IF,
|
||||
// spiCookie);
|
||||
// gyroL3gHandler->setStartUpImmediately();
|
||||
// Gyro 0 Side A
|
||||
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
|
||||
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
|
||||
spi::DEFAULT_ADIS16507_SPEED);
|
||||
auto adisHandler = new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER,
|
||||
objects::SPI_COM_IF, spiCookie);
|
||||
adisHandler->setStartUpImmediately();
|
||||
// Gyro 1 Side A
|
||||
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);
|
||||
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER,
|
||||
objects::SPI_COM_IF, spiCookie);
|
||||
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
|
||||
// auto uartCookieGps0 = new UartCookie(objects::GPS0_HANDLER, deviceFile, uartMode, baudrate,
|
||||
// maxReplyLen);
|
||||
// auto uartCookieGps1 = new UartCookie(objects::GPS0_HANDLER, deviceFile, uartMode, baudrate,
|
||||
// maxReplyLen);
|
||||
// new GPSHyperionHandler(objects::GPS0_HANDLER, uartComIF);
|
||||
// new GPSHyperionHandler(objects::GPS1_HANDLER, uartComIF);
|
||||
resetArgsGnss1.gnss1 = true;
|
||||
resetArgsGnss1.gpioComIF = gpioComIF;
|
||||
resetArgsGnss1.waitPeriodMs = 100;
|
||||
resetArgsGnss0.gnss1 = false;
|
||||
resetArgsGnss0.gpioComIF = gpioComIF;
|
||||
resetArgsGnss0.waitPeriodMs = 100;
|
||||
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() {
|
||||
@ -532,7 +576,8 @@ void ObjectFactory::createSolarArrayDeploymentComponents() {
|
||||
|
||||
void ObjectFactory::createSyrlinksComponents() {
|
||||
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();
|
||||
|
||||
new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, objects::UART_COM_IF, syrlinksUartCookie);
|
||||
|
@ -53,9 +53,9 @@ endif()
|
||||
|
||||
|
||||
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")
|
||||
elseif(${TGT_BSP} MATCHES "arm/q7s")
|
||||
elseif(TGT_BSP MATCHES "arm/q7s")
|
||||
set(BSP_PATH "bsp_q7s")
|
||||
else()
|
||||
message(WARNING "CMake not configured for this target!")
|
||||
|
@ -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
|
||||
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
|
||||
if(NOT DEFINED SYSROOT_PATH)
|
||||
message(FATAL_ERROR
|
||||
@ -7,7 +10,7 @@ if(NOT DEFINED ENV{Q7S_SYSROOT})
|
||||
)
|
||||
endif()
|
||||
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()
|
||||
|
||||
if(NOT DEFINED ENV{CROSS_COMPILE})
|
||||
|
@ -35,6 +35,9 @@ static constexpr uint32_t RTD_SPEED = 2000000;
|
||||
|
||||
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_SUPERVISOR_BAUD = 115200;
|
||||
static constexpr uint32_t STAR_TRACKER_BAUD = 115200;
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 882da68a2f0c1301d433d517c449c9c31f3cb35e
|
||||
Subproject commit 40adca5f1d13ef8d6c712842ebc37e37fe449446
|
1
generators/.gitignore
vendored
Normal file
1
generators/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.~lock*
|
@ -321,7 +321,7 @@ void SpiTestClass::acsInit() {
|
||||
|
||||
gpio = new GpiodRegular(rpiGpioName, gyro2L3gd20ChipSelect, "GYRO_2_L3G",
|
||||
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::Direction::OUT, 1);
|
||||
|
@ -73,5 +73,6 @@ static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 2048;
|
||||
}
|
||||
|
||||
#define FSFW_HAL_LINUX_SPI_WIRETAPPING 0
|
||||
#define FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV 0
|
||||
|
||||
#endif /* CONFIG_FSFWCONFIG_H_ */
|
||||
|
@ -6,9 +6,9 @@
|
||||
#ifndef FSFWCONFIG_OBSWCONFIG_H_
|
||||
#define FSFWCONFIG_OBSWCONFIG_H_
|
||||
|
||||
/* #undef RASPBERRY_PI */
|
||||
#define XIPHOS_Q7S
|
||||
/* #undef BEAGLEBONEBLACK */
|
||||
#cmakedefine RASPBERRY_PI
|
||||
#cmakedefine XIPHOS_Q7S
|
||||
#cmakedefine BEAGLEBONEBLACK
|
||||
|
||||
#ifdef RASPBERRY_PI
|
||||
#include "rpiConfig.h"
|
||||
@ -32,10 +32,13 @@ debugging. */
|
||||
//! Timers can mess up the code when debugging
|
||||
//! All of this should be enabled for mission code!
|
||||
#define OBSW_ENABLE_TIMERS 1
|
||||
#define OBSW_ADD_GPS 0
|
||||
#define OBSW_ADD_STAR_TRACKER 0
|
||||
#define OBSW_ADD_PLOC_SUPERVISOR 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 */
|
||||
|
@ -25,6 +25,9 @@ enum gpioId_t {
|
||||
MGM_2_LIS3_CS,
|
||||
MGM_3_RM3100_CS,
|
||||
|
||||
GNSS_0_NRESET,
|
||||
GNSS_1_NRESET,
|
||||
|
||||
TEST_ID_0,
|
||||
TEST_ID_1,
|
||||
|
||||
|
@ -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.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
|
||||
* 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
|
||||
* 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 */
|
||||
// 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);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, SusHandler::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, SusHandler::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.903, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, SusHandler::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, SusHandler::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, SusHandler::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, SusHandler::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.8, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, SusHandler::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, SusHandler::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.909, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.912, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.915, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions from inernal FIFO */
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.918, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions from inernal FIFO */
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.921, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions from inernal FIFO */
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.924, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.927, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.93, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.933, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// /* 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::SUS_4, length * 0.909, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions from inernal FIFO */
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions from inernal FIFO */
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.921, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.921, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.922, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions from inernal FIFO */
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.933, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.933, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.934, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_12, length * 0.935, DeviceHandlerIF::GET_READ);
|
||||
|
||||
/* 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);
|
||||
#endif
|
||||
|
||||
thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
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);
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.2,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.4,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.6,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.2,
|
||||
// DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.4,
|
||||
// DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.6,
|
||||
// DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8,
|
||||
// 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,
|
||||
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::GYRO_0_ADIS_HANDLER, length * 0,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.2,
|
||||
// DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.4,
|
||||
// DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6,
|
||||
// DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::GYRO_0_ADIS_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::GYRO_1_L3G_HANDLER, length * 0,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2,
|
||||
// DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4,
|
||||
// DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6,
|
||||
// DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8,
|
||||
// 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,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
|
||||
|
||||
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
|
||||
// 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);
|
||||
#endif /* OBSW_ADD_ACS_BOARD == 1 */
|
||||
|
||||
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "SPI PST initialization failed" << std::endl;
|
||||
@ -519,8 +539,11 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
||||
ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
|
||||
// Length of a communication cycle
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
static_cast<void>(length);
|
||||
bool uartPstEmpty = true;
|
||||
|
||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||
uartPstEmpty = false;
|
||||
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2,
|
||||
@ -550,60 +573,53 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
|
||||
#endif
|
||||
|
||||
#if Q7S_ADD_SYRLINKS_HANDLER == 1
|
||||
uartPstEmpty = false;
|
||||
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
|
||||
#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,
|
||||
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,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
#endif /* OBSW_ADD_GPS_1 == 1 */
|
||||
|
||||
#endif /* OBSW_ADD_ACS_BOARD == 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.2, DeviceHandlerIF::SEND_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);
|
||||
#endif
|
||||
|
||||
if(uartPstEmpty) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "UART PST initialization failed" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
|
@ -6,6 +6,11 @@
|
||||
|
||||
#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,
|
||||
CookieIF *comCookie, bool debugHyperionGps):
|
||||
DeviceHandlerBase(objectId, deviceCommunication, comCookie), gpsSet(this),
|
||||
@ -37,16 +42,32 @@ void GPSHyperionHandler::doShutDown() {
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return NOTHING_TO_SEND;
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return NOTHING_TO_SEND;
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::buildCommandFromCommand(
|
||||
DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
||||
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;
|
||||
}
|
||||
|
||||
@ -54,9 +75,9 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
|
||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||
// Pass data to GPS library
|
||||
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) {
|
||||
// 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;
|
||||
}
|
||||
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
|
||||
gpsSet.latitude.value = gpsData.latitude;
|
||||
// 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.satInUse.value = gpsData.sats_in_use;
|
||||
Clock::TimeOfDay_t timeStruct = {};
|
||||
@ -101,6 +129,7 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
|
||||
gpsSet.hours = gpsData.hours;
|
||||
gpsSet.minutes = gpsData.minutes;
|
||||
gpsSet.seconds = gpsData.seconds;
|
||||
gpsSet.unixSeconds = timeval.tv_sec;
|
||||
if(debugHyperionGps) {
|
||||
sif::info << "GPS Data" << std::endl;
|
||||
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("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;
|
||||
*foundId = GpsHyperion::GPS_REPLY;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
|
||||
@ -145,8 +184,19 @@ ReturnValue_t GPSHyperionHandler::initializeLocalDataPool(
|
||||
void GPSHyperionHandler::fillCommandAndReplyMap() {
|
||||
// Reply length does not matter, packets should always arrive periodically
|
||||
insertInReplyMap(GpsHyperion::GPS_REPLY, 4, &gpsSet, 0, true);
|
||||
insertInCommandMap(GpsHyperion::TRIGGER_RESET_PIN);
|
||||
}
|
||||
|
||||
void GPSHyperionHandler::modeChanged() {
|
||||
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) {
|
||||
}
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "devicedefinitions/GPSDefinitions.h"
|
||||
#include "lwgps/lwgps.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief Device handler for the Hyperion HT-GPS200 device
|
||||
* @details
|
||||
@ -15,12 +14,17 @@
|
||||
*/
|
||||
class GPSHyperionHandler: public DeviceHandlerBase {
|
||||
public:
|
||||
using gpioResetFunction_t = ReturnValue_t (*) (void* args);
|
||||
GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication,
|
||||
CookieIF* comCookie, bool debugHyperionGps = false);
|
||||
virtual ~GPSHyperionHandler();
|
||||
|
||||
void setResetPinTriggerFunction(gpioResetFunction_t resetCallback, void*args);
|
||||
protected:
|
||||
|
||||
gpioResetFunction_t resetCallback = nullptr;
|
||||
void* resetCallbackArgs = nullptr;
|
||||
|
||||
enum class InternalStates {
|
||||
NONE,
|
||||
WAIT_FIRST_MESSAGE,
|
||||
@ -49,7 +53,8 @@ protected:
|
||||
uint32_t getTransitionDelayMs(Mode_t from, Mode_t to) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) override;
|
||||
|
||||
virtual void debugInterface(uint8_t positionTracker = 0,
|
||||
object_id_t objectId = 0, uint32_t parameter = 0) override;
|
||||
private:
|
||||
lwgps_t gpsData = {};
|
||||
GpsPrimaryDataset gpsSet;
|
||||
|
@ -75,6 +75,10 @@ ReturnValue_t GomspaceDeviceHandler::buildCommandFromCommand(
|
||||
}
|
||||
break;
|
||||
}
|
||||
case(GOMSPACE::PRINT_OUT_ENB_STATUS): {
|
||||
result = printStatus(deviceCommand);
|
||||
break;
|
||||
}
|
||||
case(GOMSPACE::REQUEST_HK_TABLE): {
|
||||
result = generateRequestFullHkTableCmd(hkTableReplySize);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK){
|
||||
@ -95,6 +99,7 @@ void GomspaceDeviceHandler::fillCommandAndReplyMap(){
|
||||
this->insertInCommandAndReplyMap(GOMSPACE::PARAM_GET, 3);
|
||||
this->insertInCommandAndReplyMap(GOMSPACE::REQUEST_HK_TABLE, 3);
|
||||
this->insertInCommandMap(GOMSPACE::GNDWDT_RESET);
|
||||
this->insertInCommandMap(GOMSPACE::PRINT_OUT_ENB_STATUS);
|
||||
}
|
||||
|
||||
ReturnValue_t GomspaceDeviceHandler::scanForReply(const uint8_t *start,
|
||||
@ -396,3 +401,8 @@ LocalPoolDataSetBase* GomspaceDeviceHandler::getDataSetHandle(sid_t sid) {
|
||||
void GomspaceDeviceHandler::setModeNormal() {
|
||||
mode = MODE_NORMAL;
|
||||
}
|
||||
|
||||
ReturnValue_t GomspaceDeviceHandler::printStatus(DeviceCommandId_t cmd) {
|
||||
sif::info << "No printHkTable implementation given.." << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
@ -88,6 +88,13 @@ protected:
|
||||
*/
|
||||
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
|
||||
* given to the child class.
|
||||
|
@ -73,6 +73,7 @@ ReturnValue_t GyroADIS16507Handler::buildTransitionDeviceCommand(DeviceCommandId
|
||||
break;
|
||||
}
|
||||
case(InternalState::STARTUP): {
|
||||
return NOTHING_TO_SEND;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
@ -1,11 +1,12 @@
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include "PDU1Handler.h"
|
||||
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
|
||||
#include <OBSWConfig.h>
|
||||
|
||||
PDU1Handler::PDU1Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
|
||||
GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
|
||||
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu1HkTableDataset), pdu1HkTableDataset(
|
||||
this) {
|
||||
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu1HkTableDataset),
|
||||
pdu1HkTableDataset(this) {
|
||||
}
|
||||
|
||||
PDU1Handler::~PDU1Handler() {
|
||||
@ -55,25 +56,9 @@ void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
|
||||
<< std::endl;
|
||||
sif::info << "PDU1 channel 8 current: " << pdu1HkTableDataset.currentOutChannel8
|
||||
<< std::endl;
|
||||
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;
|
||||
sif::info << "PDU1 battery mode: " << static_cast<unsigned int>(pdu1HkTableDataset.battMode.value) << std::endl;
|
||||
printOutputSwitchStates();
|
||||
sif::info << "PDU1 battery mode: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.battMode.value) << std::endl;
|
||||
sif::info << "PDU1 VCC: " << pdu1HkTableDataset.vcc << " mV" << std::endl;
|
||||
float vbat = pdu1HkTableDataset.vbat.value * 0.001;
|
||||
sif::info << "PDU1 VBAT: " << vbat << "V" << std::endl;
|
||||
@ -87,9 +72,35 @@ void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
|
||||
#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) {
|
||||
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
|
||||
* address. */
|
||||
dataOffset += 12;
|
||||
@ -249,8 +260,10 @@ void PDU1Handler::parseHkTableReply(const uint8_t *packet) {
|
||||
dataOffset += 3;
|
||||
pdu1HkTableDataset.csp2WatchdogPingsLeft = *(packet + dataOffset);
|
||||
|
||||
pdu1HkTableDataset.commit();
|
||||
pdu1HkTableDataset.setChanged(true);
|
||||
if(not pdu1HkTableDataset.isValid()) {
|
||||
pdu1HkTableDataset.setValidity(true, true);
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t PDU1Handler::initializeLocalDataPool(
|
||||
@ -341,3 +354,20 @@ ReturnValue_t PDU1Handler::initializeLocalDataPool(
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,11 +32,13 @@ protected:
|
||||
*/
|
||||
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override;
|
||||
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
||||
ReturnValue_t printStatus(DeviceCommandId_t cmd) override;
|
||||
|
||||
private:
|
||||
/** Dataset for the housekeeping table of the PDU1 */
|
||||
PDU1::PDU1HkTableDataset pdu1HkTableDataset;
|
||||
|
||||
void printOutputSwitchStates();
|
||||
void parseHkTableReply(const uint8_t *packet);
|
||||
};
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
#include "OBSWConfig.h"
|
||||
#include "PDU2Handler.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) :
|
||||
GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
|
||||
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu2HkTableDataset), pdu2HkTableDataset(
|
||||
this) {
|
||||
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu2HkTableDataset),
|
||||
pdu2HkTableDataset(this) {
|
||||
}
|
||||
|
||||
PDU2Handler::~PDU2Handler() {
|
||||
@ -34,23 +36,7 @@ void PDU2Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
|
||||
sif::info << "PDU2 VBAT: " << vbat << std::endl;
|
||||
float temperatureC = pdu2HkTableDataset.temperature.value * 0.1;
|
||||
sif::info << "PDU2 Temperature: " << temperatureC << " °C" << std::endl;
|
||||
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;
|
||||
printOutputSwitchStates();
|
||||
sif::info << "PDU2 uptime: " << pdu2HkTableDataset.uptime << " seconds" << std::endl;
|
||||
sif::info << "PDU2 battery mode: " << unsigned(pdu2HkTableDataset.battMode.value) << std::endl;
|
||||
sif::info << "PDU2 ground watchdog reboots: " << pdu2HkTableDataset.gndWdtReboots << std::endl;
|
||||
@ -323,3 +309,42 @@ ReturnValue_t PDU2Handler::initializeLocalDataPool(
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -32,12 +32,14 @@ protected:
|
||||
*/
|
||||
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override;
|
||||
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
||||
ReturnValue_t printStatus(DeviceCommandId_t cmd) override;
|
||||
|
||||
private:
|
||||
|
||||
/** Dataset for the housekeeping table of the PDU2 */
|
||||
PDU2::PDU2HkTableDataset pdu2HkTableDataset;
|
||||
|
||||
void printOutputSwitchStates();
|
||||
void parseHkTableReply(const uint8_t *packet);
|
||||
};
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
namespace GpsHyperion {
|
||||
|
||||
static constexpr DeviceCommandId_t GPS_REPLY = 0;
|
||||
static constexpr DeviceCommandId_t TRIGGER_RESET_PIN = 5;
|
||||
|
||||
static constexpr uint32_t DATASET_ID = 0;
|
||||
|
||||
|
@ -26,13 +26,15 @@ namespace GOMSPACE{
|
||||
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 = 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]
|
||||
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]
|
||||
|
||||
}
|
||||
|
||||
namespace P60System {
|
||||
|
2
thirdparty/arcsec_star_tracker
vendored
2
thirdparty/arcsec_star_tracker
vendored
@ -1 +1 @@
|
||||
Subproject commit 657c06e4a6e4c460e897c4a5b4eaefe7c6d1085e
|
||||
Subproject commit 2d10c6b85ea4cab4f4baf1918c51d54eee4202c2
|
2
thirdparty/lwgps
vendored
2
thirdparty/lwgps
vendored
@ -1 +1 @@
|
||||
Subproject commit 3dbfe390a6784ebc723d3907062cf883c8cf85cd
|
||||
Subproject commit 52999ddfe5177493b96b55871961a8a97131596d
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 9b176aebfaba51f4d045881a125d42b123f4eeb3
|
||||
Subproject commit 90f85b7dae63e93a3c5686fab9dd0d4a8147e96b
|
Loading…
Reference in New Issue
Block a user