done and bugfree
This commit is contained in:
parent
6be54a9485
commit
feb59d321c
@ -1,6 +1,7 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
|
||||||
#include <fsfw/subsystem/Subsystem.h>
|
#include <fsfw/subsystem/Subsystem.h>
|
||||||
|
#include <linux/devices/RwPollingTask.h>
|
||||||
#include <mission/system/objects/CamSwitcher.h>
|
#include <mission/system/objects/CamSwitcher.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
@ -150,9 +151,8 @@ void ObjectFactory::createTmpComponents() {
|
|||||||
|
|
||||||
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF,
|
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF,
|
||||||
SerialComIF** uartComIF, SpiComIF** spiMainComIF,
|
SerialComIF** uartComIF, SpiComIF** spiMainComIF,
|
||||||
I2cComIF** i2cComIF, SpiComIF** spiRWComIF) {
|
I2cComIF** i2cComIF) {
|
||||||
if (gpioComIF == nullptr or uartComIF == nullptr or spiMainComIF == nullptr or
|
if (gpioComIF == nullptr or uartComIF == nullptr or spiMainComIF == nullptr) {
|
||||||
spiRWComIF == nullptr) {
|
|
||||||
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
|
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF,
|
|||||||
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
|
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
|
||||||
*uartComIF = new SerialComIF(objects::UART_COM_IF);
|
*uartComIF = new SerialComIF(objects::UART_COM_IF);
|
||||||
*spiMainComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, q7s::SPI_DEFAULT_DEV, **gpioComIF);
|
*spiMainComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, q7s::SPI_DEFAULT_DEV, **gpioComIF);
|
||||||
*spiRWComIF = new SpiComIF(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, **gpioComIF);
|
//*spiRWComIF = new SpiComIF(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, **gpioComIF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) {
|
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) {
|
||||||
@ -678,10 +678,10 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
|
|||||||
std::array<gpioId_t, 4> rwGpioIds = {gpioIds::EN_RW1, gpioIds::EN_RW2, gpioIds::EN_RW3,
|
std::array<gpioId_t, 4> rwGpioIds = {gpioIds::EN_RW1, gpioIds::EN_RW2, gpioIds::EN_RW3,
|
||||||
gpioIds::EN_RW4};
|
gpioIds::EN_RW4};
|
||||||
std::array<DeviceHandlerBase*, 4> rws = {};
|
std::array<DeviceHandlerBase*, 4> rws = {};
|
||||||
|
new RwPollingTask(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, *gpioComIF);
|
||||||
for (uint8_t idx = 0; idx < rwCookies.size(); idx++) {
|
for (uint8_t idx = 0; idx < rwCookies.size(); idx++) {
|
||||||
rwCookies[idx] =
|
rwCookies[idx] = new SpiCookie(rwCookieParams[idx].first, rwCookieParams[idx].second,
|
||||||
new SpiCookie(rwCookieParams[idx].first, rwCookieParams[idx].second, rws::MAX_REPLY_SIZE,
|
rws::MAX_REPLY_SIZE, spi::RW_MODE, spi::RW_SPEED);
|
||||||
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
|
|
||||||
auto* rwHandler = new RwHandler(rwIds[idx], objects::SPI_RW_COM_IF, rwCookies[idx], gpioComIF,
|
auto* rwHandler = new RwHandler(rwIds[idx], objects::SPI_RW_COM_IF, rwCookies[idx], gpioComIF,
|
||||||
rwGpioIds[idx], idx);
|
rwGpioIds[idx], idx);
|
||||||
rwCookies[idx]->setCallbackArgs(rwHandler);
|
rwCookies[idx]->setCallbackArgs(rwHandler);
|
||||||
|
@ -25,8 +25,7 @@ void setStatics();
|
|||||||
void produce(void* args);
|
void produce(void* args);
|
||||||
|
|
||||||
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, SerialComIF** uartComIF,
|
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, SerialComIF** uartComIF,
|
||||||
SpiComIF** spiMainComIF, I2cComIF** i2cComIF,
|
SpiComIF** spiMainComIF, I2cComIF** i2cComIF);
|
||||||
SpiComIF** spiRwComIF);
|
|
||||||
void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher);
|
void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher);
|
||||||
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||||
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
||||||
|
@ -196,6 +196,15 @@ void scheduling::initTasks() {
|
|||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_GPS_CTRL */
|
#endif /* OBSW_ADD_GPS_CTRL */
|
||||||
|
|
||||||
|
#if OBSW_ADD_RW == 1
|
||||||
|
PeriodicTaskIF* rwPolling = factory->createPeriodicTask(
|
||||||
|
"RW_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
|
result = rwPolling->addComponent(objects::SPI_RW_COM_IF);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("RW_POLLING_TASK", objects::SPI_RW_COM_IF);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
|
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
|
||||||
"ACS_SYS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
"ACS_SYS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
static_cast<void>(acsSysTask);
|
static_cast<void>(acsSysTask);
|
||||||
@ -355,6 +364,9 @@ void scheduling::initTasks() {
|
|||||||
strHelperTask->startTask();
|
strHelperTask->startTask();
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_RW == 1
|
||||||
|
rwPolling->startTask();
|
||||||
|
#endif
|
||||||
#if OBSW_ADD_GPS_CTRL == 1
|
#if OBSW_ADD_GPS_CTRL == 1
|
||||||
gpsTask->startTask();
|
gpsTask->startTask();
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,8 +25,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
SpiComIF* spiMainComIF = nullptr;
|
SpiComIF* spiMainComIF = nullptr;
|
||||||
I2cComIF* i2cComIF = nullptr;
|
I2cComIF* i2cComIF = nullptr;
|
||||||
PowerSwitchIF* pwrSwitcher = nullptr;
|
PowerSwitchIF* pwrSwitcher = nullptr;
|
||||||
SpiComIF* spiRwComIF = nullptr;
|
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF);
|
||||||
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
|
|
||||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||||
|
@ -61,6 +61,7 @@ static constexpr uint32_t SCHED_BLOCK_1_SUS_READ_MS = 15;
|
|||||||
static constexpr uint32_t SCHED_BLOCK_2_SENSOR_READ_MS = 30;
|
static constexpr uint32_t SCHED_BLOCK_2_SENSOR_READ_MS = 30;
|
||||||
static constexpr uint32_t SCHED_BLOCK_3_ACS_CTRL_MS = 45;
|
static constexpr uint32_t SCHED_BLOCK_3_ACS_CTRL_MS = 45;
|
||||||
static constexpr uint32_t SCHED_BLOCK_4_ACTUATOR_MS = 50;
|
static constexpr uint32_t SCHED_BLOCK_4_ACTUATOR_MS = 50;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_5_RW_READ_MS = 300;
|
||||||
|
|
||||||
// 15 ms for FM
|
// 15 ms for FM
|
||||||
static constexpr float SCHED_BLOCK_1_PERIOD = static_cast<float>(SCHED_BLOCK_1_SUS_READ_MS) / 400.0;
|
static constexpr float SCHED_BLOCK_1_PERIOD = static_cast<float>(SCHED_BLOCK_1_SUS_READ_MS) / 400.0;
|
||||||
@ -68,6 +69,7 @@ static constexpr float SCHED_BLOCK_2_PERIOD =
|
|||||||
static_cast<float>(SCHED_BLOCK_2_SENSOR_READ_MS) / 400.0;
|
static_cast<float>(SCHED_BLOCK_2_SENSOR_READ_MS) / 400.0;
|
||||||
static constexpr float SCHED_BLOCK_3_PERIOD = static_cast<float>(SCHED_BLOCK_3_ACS_CTRL_MS) / 400.0;
|
static constexpr float SCHED_BLOCK_3_PERIOD = static_cast<float>(SCHED_BLOCK_3_ACS_CTRL_MS) / 400.0;
|
||||||
static constexpr float SCHED_BLOCK_4_PERIOD = static_cast<float>(SCHED_BLOCK_4_ACTUATOR_MS) / 400.0;
|
static constexpr float SCHED_BLOCK_4_PERIOD = static_cast<float>(SCHED_BLOCK_4_ACTUATOR_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_5_PERIOD = static_cast<float>(SCHED_BLOCK_5_RW_READ_MS) / 400.0;
|
||||||
|
|
||||||
} // namespace acs
|
} // namespace acs
|
||||||
|
|
||||||
|
@ -5,18 +5,19 @@
|
|||||||
#include <fsfw/tasks/SemaphoreFactory.h>
|
#include <fsfw/tasks/SemaphoreFactory.h>
|
||||||
#include <fsfw/tasks/TaskFactory.h>
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
#include <fsfw_hal/common/spi/spiCommon.h>
|
#include <fsfw_hal/common/spi/spiCommon.h>
|
||||||
|
#include <fsfw_hal/linux/utility.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "devConf.h"
|
#include "devConf.h"
|
||||||
#include "mission/devices/devicedefinitions/rwHelpers.h"
|
#include "mission/devices/devicedefinitions/rwHelpers.h"
|
||||||
|
|
||||||
RwPollingTask::RwPollingTask(object_id_t objectId, SpiComIF* spiIF)
|
RwPollingTask::RwPollingTask(object_id_t objectId, const char* spiDev, GpioIF& gpioIF)
|
||||||
: SystemObject(objectId), spiIF(spiIF) {
|
: SystemObject(objectId), spiDev(spiDev), gpioIF(gpioIF) {
|
||||||
semaphore = SemaphoreFactory::instance()->createBinarySemaphore();
|
semaphore = SemaphoreFactory::instance()->createBinarySemaphore();
|
||||||
semaphore->acquire();
|
semaphore->acquire();
|
||||||
ipcLock = MutexFactory::instance()->createMutex();
|
ipcLock = MutexFactory::instance()->createMutex();
|
||||||
spiLock = spiIF->getCsMutex();
|
spiLock = MutexFactory::instance()->createMutex();
|
||||||
spiDev = spiIF->getSpiDev().c_str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t RwPollingTask::performOperation(uint8_t operationCode) {
|
ReturnValue_t RwPollingTask::performOperation(uint8_t operationCode) {
|
||||||
@ -79,13 +80,7 @@ ReturnValue_t RwPollingTask::performOperation(uint8_t operationCode) {
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t RwPollingTask::initialize() {
|
ReturnValue_t RwPollingTask::initialize() { return returnvalue::OK; }
|
||||||
if (spiDev == nullptr) {
|
|
||||||
sif::error << "SPI device is invalid" << std::endl;
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t RwPollingTask::initializeInterface(CookieIF* cookie) {
|
ReturnValue_t RwPollingTask::initializeInterface(CookieIF* cookie) {
|
||||||
// We don't need to set the speed because a SPI core is used, but the mode has to be set once
|
// We don't need to set the speed because a SPI core is used, but the mode has to be set once
|
||||||
@ -96,7 +91,16 @@ ReturnValue_t RwPollingTask::initializeInterface(CookieIF* cookie) {
|
|||||||
sif::error << "could not open RW SPI bus" << std::endl;
|
sif::error << "could not open RW SPI bus" << std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
spiIF->setSpiSpeedAndMode(fd, spi::RW_MODE, spi::RW_SPEED);
|
spi::SpiModes mode = spi::RW_MODE;
|
||||||
|
int retval = ioctl(fd, SPI_IOC_WR_MODE, reinterpret_cast<uint8_t*>(&mode));
|
||||||
|
if (retval != 0) {
|
||||||
|
utility::handleIoctlError("SpiComIF::setSpiSpeedAndMode: Setting SPI mode failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
retval = ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &spi::RW_SPEED);
|
||||||
|
if (retval != 0) {
|
||||||
|
utility::handleIoctlError("SpiComIF::setSpiSpeedAndMode: Setting SPI speed failed");
|
||||||
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
modeAndSpeedWasSet = true;
|
modeAndSpeedWasSet = true;
|
||||||
}
|
}
|
||||||
@ -201,7 +205,6 @@ ReturnValue_t RwPollingTask::readNextReply(RwCookie& rwCookie, uint8_t* replyBuf
|
|||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
int fd = 0;
|
int fd = 0;
|
||||||
gpioId_t gpioId = rwCookie.getChipSelectPin();
|
gpioId_t gpioId = rwCookie.getChipSelectPin();
|
||||||
GpioIF& gpioIF = spiIF->getGpioInterface();
|
|
||||||
pullCsLow(gpioId, spiLock, gpioIF);
|
pullCsLow(gpioId, spiLock, gpioIF);
|
||||||
uint8_t byteRead = 0;
|
uint8_t byteRead = 0;
|
||||||
for (unsigned idx = 0; idx < MAX_RETRIES_REPLY; idx++) {
|
for (unsigned idx = 0; idx < MAX_RETRIES_REPLY; idx++) {
|
||||||
@ -439,7 +442,6 @@ void RwPollingTask::closeSpi(int fd) {
|
|||||||
|
|
||||||
ReturnValue_t RwPollingTask::sendOneMessage(int fd, RwCookie& rwCookie) {
|
ReturnValue_t RwPollingTask::sendOneMessage(int fd, RwCookie& rwCookie) {
|
||||||
gpioId_t gpioId = rwCookie.getChipSelectPin();
|
gpioId_t gpioId = rwCookie.getChipSelectPin();
|
||||||
GpioIF& gpioIF = spiIF->getGpioInterface();
|
|
||||||
if (spiLock == nullptr) {
|
if (spiLock == nullptr) {
|
||||||
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
|
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||||
#include <fsfw/tasks/SemaphoreIF.h>
|
#include <fsfw/tasks/SemaphoreIF.h>
|
||||||
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||||
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ class RwCookie : public SpiCookie {
|
|||||||
|
|
||||||
class RwPollingTask : public SystemObject, public ExecutableObjectIF, public DeviceCommunicationIF {
|
class RwPollingTask : public SystemObject, public ExecutableObjectIF, public DeviceCommunicationIF {
|
||||||
public:
|
public:
|
||||||
RwPollingTask(object_id_t objectId, SpiComIF* spiIF);
|
RwPollingTask(object_id_t objectId, const char* spiDev, GpioIF& gpioIF);
|
||||||
|
|
||||||
ReturnValue_t performOperation(uint8_t operationCode) override;
|
ReturnValue_t performOperation(uint8_t operationCode) override;
|
||||||
ReturnValue_t initialize() override;
|
ReturnValue_t initialize() override;
|
||||||
@ -43,7 +44,7 @@ class RwPollingTask : public SystemObject, public ExecutableObjectIF, public Dev
|
|||||||
MutexIF* ipcLock;
|
MutexIF* ipcLock;
|
||||||
MutexIF* spiLock;
|
MutexIF* spiLock;
|
||||||
const char* spiDev;
|
const char* spiDev;
|
||||||
SpiComIF* spiIF;
|
GpioIF& gpioIF;
|
||||||
std::array<bool, 4> skipCommandingForRw;
|
std::array<bool, 4> skipCommandingForRw;
|
||||||
std::array<DeviceCommandId_t, 4> specialRequestIds;
|
std::array<DeviceCommandId_t, 4> specialRequestIds;
|
||||||
std::array<RwCookie*, 4> rwCookies;
|
std::array<RwCookie*, 4> rwCookies;
|
||||||
|
@ -632,83 +632,6 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
|
|||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.scheduleRws) {
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
//
|
|
||||||
// thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
// thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cfg.scheduleRws) {
|
if (cfg.scheduleRws) {
|
||||||
// this is the torquing cycle
|
// this is the torquing cycle
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
||||||
@ -738,67 +661,22 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
|
|||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_4_PERIOD,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user