| 312 | } |
| 313 | |
| 314 | static void tmate2WriteMainDisplayText(uint8_t* v, const QString& text) |
| 315 | { |
| 316 | const QString clean = text.left(9).rightJustified(9, QLatin1Char(' ')); |
| 317 | for (int d = 1; d <= 9; ++d) { |
| 318 | uint8_t hi = static_cast<uint8_t>(22 - 2 * d); |
| 319 | uint8_t lo = static_cast<uint8_t>(21 - 2 * d); |
| 320 | const MainGlyph glyph = tmate2MainGlyph(clean.at(9 - d)); |
| 321 | v[hi] &= 0xF8u; |
| 322 | v[lo] &= 0xF0u; |
| 323 | v[hi] |= glyph.high; |
| 324 | v[lo] |= glyph.low; |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | // Write a value (mod 1000) to bytes 23..28 of the LCDVector. |
| 329 | static void tmate2WriteSmallDisplay(uint8_t* v, uint32_t val) |
no test coverage detected