Mercurial > public > ostc_companion
comparison Serial.cpp @ 2:177f640940f2
Update exception class and cleanup redifinitions
During firmware download and exception caused the application to stop.
Rootcause was the defference between QT5 and QT6 exception and string
handling which is updated now. In addition some old definitions were
removed to avoid compiler warnings.
| author | Ideenmodellierer |
|---|---|
| date | Fri, 28 Nov 2025 19:57:35 +0100 |
| parents | 0b3630a29ad8 |
| children |
comparison
equal
deleted
inserted
replaced
| 1:0b3630a29ad8 | 2:177f640940f2 |
|---|---|
| 229 | 229 |
| 230 unsigned char byte = 0; | 230 unsigned char byte = 0; |
| 231 S_LEN len = 0; | 231 S_LEN len = 0; |
| 232 S_READ(_hSerial, &byte, 1, len); | 232 S_READ(_hSerial, &byte, 1, len); |
| 233 if( len != 1 ) | 233 if( len != 1 ) |
| 234 // LOG_THROW_E(ReadTimeout, "< timeout" ); | 234 LOG_THROW_E(ReadTimeout, "< timeout" ); |
| 235 LOG_THROW("< timeout" ); | |
| 236 | 235 |
| 237 if( isprint(byte) ) | 236 if( isprint(byte) ) |
| 238 // LOG_DEBUG("< " << QString().sprintf("%02x '%c'", byte, byte) ); | |
| 239 LOG_DEBUG("< " << QString::asprintf("%02x '%c'", byte, byte)); | 237 LOG_DEBUG("< " << QString::asprintf("%02x '%c'", byte, byte)); |
| 240 else | 238 else |
| 241 LOG_DEBUG("< " << QString::asprintf("%02x", byte) ); | 239 LOG_DEBUG("< " << QString::asprintf("%02x", byte) ); |
| 242 | 240 |
| 243 return byte; | 241 return byte; |
