this seems to work
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-10-06 11:15:55 +02:00
parent adbece25aa
commit 0341865e98
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
5 changed files with 22 additions and 32 deletions

2
fsfw

@ -1 +1 @@
Subproject commit d1630cdc4c3fc801934f1e394efa80e898f8031b
Subproject commit 8195587604c5f14f04bf25b16a514cf3c771284b

View File

@ -52,6 +52,9 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
}
size_t bytesRead = 0;
ReturnValue_t result = returnvalue::OK;
// Can be used to read frame, parity and overrun errors
// serial_icounter_struct icounter{};
// uart::readCountersAndErrors(serialPort, icounter);
while (result != DleParser::NO_PACKET_FOUND) {
result = dleParser.parseRingBuf(bytesRead);
if (result == returnvalue::OK) {
@ -68,18 +71,6 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
dleParser.confirmBytesRead(bytesRead);
}
}
// TODO: Move this to some FSFW helper function
/*
serial_icounter_struct uartErrors{};
int ioctlres = ioctl(serialPort, TIOCGICOUNT, &uartErrors);
if (uartErrors.parity > 0) {
sif::warning << "Parity error. Current count: " << uartErrors.parity << std::endl;
}
if (uartErrors.overrun > 0) {
sif::warning << "Overrun error. Current count: " << uartErrors.overrun << std::endl;
}
*/
TaskFactory::delayTask(400);
} else if (bytesRead < 0) {
sif::warning << "ScexUartReader::performOperation: read call failed with error [" << errno

View File

@ -5,10 +5,10 @@
#include <algorithm>
#include <ctime>
#include <iostream>
#include <fstream>
#include <random>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <random>
#include "fsfw/globalfunctions/CRC.h"
#include "mission/devices/devicedefinitions/ScexDefinitions.h"
@ -348,11 +348,9 @@ void ScexDeviceHandler::modeChanged() {}
void ScexDeviceHandler::setPowerSwitcher(PowerSwitchIF& powerSwitcher, power::Switch_t switchId) {
DeviceHandlerBase::setPowerSwitcher(&powerSwitcher);
this->switchId = switchId;
}
ReturnValue_t ScexDeviceHandler::initializeAfterTaskCreation() {
auto mntPrefix = sdcMan.getCurrentMountPrefix();
std::filesystem::path fullFilePath = mntPrefix;
fullFilePath /= "scex";

View File

@ -1,14 +1,15 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_
#include "eive/objects.h"
#include "eive/eventSubsystemIds.h"
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <fsfw/events/Event.h>
#include <cstdint>
#include <vector>
#include "eive/eventSubsystemIds.h"
#include "eive/objects.h"
// Definitions for the Solar Cell Experiment
namespace scex {