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

Function tmate2WriteSmallDisplay

src/core/HidEncoderManager.cpp:329–342  ·  view source on GitHub ↗

Write a value (mod 1000) to bytes 23..28 of the LCDVector.

Source from the content-addressed store, hash-verified

327
328// Write a value (mod 1000) to bytes 23..28 of the LCDVector.
329static void tmate2WriteSmallDisplay(uint8_t* v, uint32_t val)
330{
331 val %= 1000u;
332 for (int d = 1; d <= 3; ++d) {
333 uint8_t hi = static_cast<uint8_t>(21 + 2 * d);
334 uint8_t lo = static_cast<uint8_t>(22 + 2 * d);
335 v[hi] &= 0x0Fu;
336 v[lo] &= 0x1Fu;
337 if (val == 0u && d > 1) continue;
338 v[hi] |= kSmallHigh[val % 10u];
339 v[lo] |= kSmallLow [val % 10u];
340 val /= 10u;
341 }
342}
343
344static void tmate2WriteSmallDisplayText(uint8_t* v, const QString& text)
345{

Callers 1

setTMate2DisplayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected