two stop bits and even parity helps
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
c5e5df03d9
commit
9e81384c5e
@ -326,9 +326,9 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher,
|
||||
SdCardMountedIF& mountedIF, bool onImmediately,
|
||||
std::optional<power::Switch_t> switchId) {
|
||||
// objekte anlegen
|
||||
auto* cookie = new UartCookie(objects::SCEX, uartDev, uart::SCEX_BAUD, 4096);
|
||||
|
||||
cookie->setTwoStopBits();
|
||||
cookie->setParityEven();
|
||||
auto scexUartReader = new ScexUartReader(objects::SCEX_UART_READER);
|
||||
auto scexHandler = new ScexDeviceHandler(objects::SCEX, *scexUartReader, cookie, mountedIF);
|
||||
if (onImmediately) {
|
||||
|
@ -35,7 +35,7 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
|
||||
while (true) {
|
||||
semaphore->acquire();
|
||||
int bytesRead = 0;
|
||||
debugMode = true;
|
||||
// debugMode = true;
|
||||
while (true) {
|
||||
bytesRead = read(serialPort, reinterpret_cast<void *>(recBuf.data()),
|
||||
static_cast<unsigned int>(recBuf.size()));
|
||||
@ -55,7 +55,7 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
|
||||
while (result != DleParser::NO_PACKET_FOUND) {
|
||||
result = dleParser.parseRingBuf(bytesRead);
|
||||
if (result == returnvalue::OK) {
|
||||
sif::info << "FOund dle packet, read " << bytesRead << " bytes" << std::endl;
|
||||
// sif::info << "Found dle packet, read " << bytesRead << " bytes" << std::endl;
|
||||
// Packet found, advance read pointer.
|
||||
auto& decodedPacket = dleParser.getContext().decodedPacket;
|
||||
handleFoundDlePacket(decodedPacket.first, decodedPacket.second);
|
||||
@ -127,8 +127,7 @@ ReturnValue_t ScexUartReader::initializeInterface(CookieIF *cookie) {
|
||||
tty.c_cc[VTIME] = 0;
|
||||
tty.c_cc[VMIN] = 0;
|
||||
|
||||
// The SCEX experiment has a fixed baud rate. For other linux systems, set baud rate here.
|
||||
//#if !defined(XIPHOS_Q7S)
|
||||
// The SCEX experiment has a fixed baud rate.
|
||||
if (cfsetispeed(&tty, B38400) != 0) {
|
||||
sif::warning << "ScexUartReader::initializeInterface: Setting baud rate failed" << std::endl;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user