Write frequency (Hz) to bytes 3..20 of the LCDVector. Only the seven A-G segment bits per digit are touched; indicator bits that share those bytes (underlines, DRV, NR2, …) are preserved.
| 297 | // Only the seven A-G segment bits per digit are touched; indicator bits that |
| 298 | // share those bytes (underlines, DRV, NR2, …) are preserved. |
| 299 | static void tmate2WriteMainDisplay(uint8_t* v, uint32_t hz) |
| 300 | { |
| 301 | if (hz > 999999999u) hz = 999999999u; |
| 302 | for (int d = 1; d <= 9; ++d) { |
| 303 | uint8_t hi = static_cast<uint8_t>(22 - 2 * d); |
| 304 | uint8_t lo = static_cast<uint8_t>(21 - 2 * d); |
| 305 | v[hi] &= 0xF8u; |
| 306 | v[lo] &= 0xF0u; |
| 307 | if (hz == 0u && d > 1) continue; |
| 308 | v[hi] |= kMainHigh[hz % 10u]; |
| 309 | v[lo] |= kMainLow [hz % 10u]; |
| 310 | hz /= 10u; |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | static void tmate2WriteMainDisplayText(uint8_t* v, const QString& text) |
| 315 | { |
no outgoing calls
no test coverage detected