| 249 | } |
| 250 | |
| 251 | static void applyModeSegs(uint8_t* lcd, const QString& mode) |
| 252 | { |
| 253 | tmate2Seg(lcd, kSeg_USB, false); |
| 254 | tmate2Seg(lcd, kSeg_LSB, false); |
| 255 | tmate2Seg(lcd, kSeg_AM, false); |
| 256 | tmate2Seg(lcd, kSeg_SAM, false); |
| 257 | tmate2Seg(lcd, kSeg_DSB, false); |
| 258 | tmate2Seg(lcd, kSeg_FM, false); |
| 259 | tmate2Seg(lcd, kSeg_CW, false); |
| 260 | tmate2Seg(lcd, kSeg_DIG, false); |
| 261 | tmate2Seg(lcd, kSeg_DIG_PLUS, false); |
| 262 | tmate2Seg(lcd, kSeg_DIG_MINUS, false); |
| 263 | |
| 264 | if (mode == "USB") tmate2Seg(lcd, kSeg_USB, true); |
| 265 | else if (mode == "LSB") tmate2Seg(lcd, kSeg_LSB, true); |
| 266 | else if (mode == "AM") tmate2Seg(lcd, kSeg_AM, true); |
| 267 | else if (mode == "SAM") tmate2Seg(lcd, kSeg_SAM, true); |
| 268 | else if (mode == "DSB") tmate2Seg(lcd, kSeg_DSB, true); |
| 269 | else if (mode == "FM" || mode == "DFM") tmate2Seg(lcd, kSeg_FM, true); |
| 270 | else if (mode == "CW" || mode == "CWL" || mode == "CWU") tmate2Seg(lcd, kSeg_CW, true); |
| 271 | else if (mode == "DIGU") { |
| 272 | tmate2Seg(lcd, kSeg_DIG, true); |
| 273 | tmate2Seg(lcd, kSeg_DIG_PLUS, true); |
| 274 | } else if (mode == "DIGL") { |
| 275 | tmate2Seg(lcd, kSeg_DIG, true); |
| 276 | tmate2Seg(lcd, kSeg_DIG_MINUS, true); |
| 277 | } else if (mode == "RTTY" || mode.startsWith("DIG")) { |
| 278 | tmate2Seg(lcd, kSeg_DIG, true); |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | // LCDVector byte offsets (matches OpenTMate2Lib and Delphi LCD_SEGMENT_DEF) |
| 283 | static constexpr int kTM2_LED = 32; |
no test coverage detected