scex reader task started
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
15d1da8199
commit
df712c7100
@ -228,7 +228,15 @@ void initmission::createTestTasks(TaskFactory& factory,
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
|
||||
}
|
||||
PeriodicTaskIF* scexReaderTask = factory.createPeriodicTask(
|
||||
"SCEX_UART_READER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||
result = scexReaderTask->addComponent(objects::SCEX_UART_READER);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("SCEX_UART_READER", objects::SCEX_UART_READER);
|
||||
}
|
||||
|
||||
#endif /* RPI_ADD_GPIO_TEST == 1 */
|
||||
taskVec.push_back(scexReaderTask);
|
||||
taskVec.push_back(testTask);
|
||||
|
||||
bool startTestPst = true;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <linux/devices/ScexUartReader.h>
|
||||
#include "ObjectFactory.h"
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
@ -182,6 +183,7 @@ void ObjectFactory::createTestTasks() {
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_UART_TEST_CODE == 1
|
||||
new ScexUartReader(objects::SCEX_UART_READER);
|
||||
new UartTestClass(objects::UART_TEST);
|
||||
#else
|
||||
new UartComIF(objects::UART_COM_IF);
|
||||
|
@ -197,6 +197,7 @@ void UartTestClass::scexPeriodic() {
|
||||
sif::info << "Received " << bytesRead
|
||||
<< " bytes from the Solar Cell Experiment:" << std::endl;
|
||||
arrayprinter::print(recBuf.data(), bytesRead, OutputType::HEX, false);
|
||||
break;
|
||||
}
|
||||
} while (bytesRead > 0);
|
||||
}
|
||||
|
@ -4,4 +4,7 @@ if(EIVE_BUILD_GPSD_GPS_HANDLER)
|
||||
)
|
||||
endif()
|
||||
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
ScexUartReader.cpp
|
||||
)
|
||||
add_subdirectory(startracker)
|
||||
|
18
linux/devices/ScexUartReader.cpp
Normal file
18
linux/devices/ScexUartReader.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "ScexUartReader.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
ScexUartReader::ScexUartReader(object_id_t objectId):SystemObject(objectId) {
|
||||
}
|
||||
|
||||
void ScexUartRead::start() {
|
||||
semaphore->give();
|
||||
}
|
||||
ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
|
||||
std::cout<<"hallo welt"<<std::endl;
|
||||
semaphore->take();
|
||||
while(true) {
|
||||
semaphore->take();
|
||||
}
|
||||
return RETURN_OK;
|
||||
}
|
18
linux/devices/ScexUartReader.h
Normal file
18
linux/devices/ScexUartReader.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef LINUX_DEVICES_SCEXUARTREADER_H_
|
||||
#define LINUX_DEVICES_SCEXUARTREADER_H_
|
||||
#include <fsfw/objectmanager/SystemObject.h>
|
||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||
|
||||
|
||||
class ScexUartReader: public SystemObject, //strg+shift+n
|
||||
public ExecutableObjectIF,
|
||||
public HasReturnvaluesIF {
|
||||
public:
|
||||
ScexUartReader(object_id_t objectId);
|
||||
private:
|
||||
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* LINUX_DEVICES_SCEXUARTREADER_H_ */
|
@ -49,6 +49,7 @@ enum sourceObjects : uint32_t {
|
||||
UART_COM_IF = 0x49030003,
|
||||
SPI_COM_IF = 0x49020004,
|
||||
GPIO_IF = 0x49010005,
|
||||
SCEX_UART_READER = 0x49010006,
|
||||
|
||||
/* Custom device handler */
|
||||
PCDU_HANDLER = 0x442000A1,
|
||||
@ -57,6 +58,7 @@ enum sourceObjects : uint32_t {
|
||||
HEATER_HANDLER = 0x444100A4,
|
||||
RAD_SENSOR = 0x443200A5,
|
||||
|
||||
|
||||
/* 0x54 ('T') for test handlers */
|
||||
TEST_TASK = 0x54694269,
|
||||
LIBGPIOD_TEST = 0x54123456,
|
||||
|
Loading…
Reference in New Issue
Block a user