WIP: SCEX Init #272
@ -29,6 +29,7 @@ UartTestClass::UartTestClass(object_id_t objectId, ScexUartReader* reader)
|
|||||||
: TestTask(objectId), reader(reader) {
|
: TestTask(objectId), reader(reader) {
|
||||||
mode = TestModes::SCEX;
|
mode = TestModes::SCEX;
|
||||||
scexMode = ScexModes::READER_TASK;
|
scexMode = ScexModes::READER_TASK;
|
||||||
|
// No one-cell and all-cell support implemented yet
|
||||||
currCmd = scex::Cmds::FRAM;
|
currCmd = scex::Cmds::FRAM;
|
||||||
if (scexMode == ScexModes::SIMPLE) {
|
if (scexMode == ScexModes::SIMPLE) {
|
||||||
auto encodingBuf = new std::array<uint8_t, 4096>;
|
auto encodingBuf = new std::array<uint8_t, 4096>;
|
||||||
@ -213,7 +214,7 @@ void UartTestClass::scexPeriodic() {
|
|||||||
out << helper;
|
out << helper;
|
||||||
}
|
}
|
||||||
// fram
|
// fram
|
||||||
// packetcounter eins höher, wenn mehr packet verloren -> merkt sich welches packet fehlt
|
// packetcounter eins h<EFBFBD>her, wenn mehr packet verloren -> merkt sich welches packet fehlt
|
||||||
// was wenn erstes packet fehlt; mit boolean var (firstpacketarrived=false) die immer mit
|
// was wenn erstes packet fehlt; mit boolean var (firstpacketarrived=false) die immer mit
|
||||||
// finish false wird?
|
// finish false wird?
|
||||||
// countdown (max 2min), wenn nicht if (helper.getPacketCounter() ==
|
// countdown (max 2min), wenn nicht if (helper.getPacketCounter() ==
|
||||||
|
@ -133,6 +133,7 @@ ReturnValue_t ScexUartReader::sendMessage(CookieIF *cookie, const uint8_t *sendD
|
|||||||
sif::warning << "ScexUartReader::sendMessage: Encoding failed" << std::endl;
|
sif::warning << "ScexUartReader::sendMessage: Encoding failed" << std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
arrayprinter::print(cmdbuf.data(), encodedLen);
|
||||||
size_t bytesWritten = write(serialPort, cmdbuf.data(), encodedLen);
|
size_t bytesWritten = write(serialPort, cmdbuf.data(), encodedLen);
|
||||||
if (bytesWritten != encodedLen) {
|
if (bytesWritten != encodedLen) {
|
||||||
sif::warning << "ScexUartReader::sendMessage: Sending ping command to solar experiment failed"
|
sif::warning << "ScexUartReader::sendMessage: Sending ping command to solar experiment failed"
|
||||||
|
Loading…
Reference in New Issue
Block a user