MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / tmate2WriteMainDisplayText

Function tmate2WriteMainDisplayText

src/core/HidEncoderManager.cpp:314–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314static 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.
329static void tmate2WriteSmallDisplay(uint8_t* v, uint32_t val)

Callers 1

Calls 1

tmate2MainGlyphFunction · 0.85

Tested by

no test coverage detected