| 3448 | // TU with the rest of the model→UI wiring. |
| 3449 | |
| 3450 | void MainWindow::wireMeters() |
| 3451 | { |
| 3452 | // ── S-Meter: MeterModel → SMeterWidget (active slice only) ───────────── |
| 3453 | connect(&m_radioModel.meterModel(), &MeterModel::sLevelChanged, |
| 3454 | this, [this](int sliceIndex, float dbm) { |
| 3455 | if (sliceIndex == m_activeSliceId |
| 3456 | && (!m_kiwiSdrManager |
| 3457 | || m_kiwiSdrManager |
| 3458 | ->assignedProfileForSlice(sliceIndex).isEmpty())) { |
| 3459 | deferReceivePresentation( |
| 3460 | ReceivePresentationSource::Flex, |
| 3461 | ReceivePresentationSurface::Meter, |
| 3462 | [this, sliceIndex, dbm]() { |
| 3463 | if (!m_appletPanel |
| 3464 | || sliceIndex != m_activeSliceId |
| 3465 | || (m_kiwiSdrManager |
| 3466 | && !m_kiwiSdrManager |
| 3467 | ->assignedProfileForSlice(sliceIndex) |
| 3468 | .isEmpty())) { |
| 3469 | return; |
| 3470 | } |
| 3471 | m_appletPanel->sMeterWidget()->setLevel(dbm); |
| 3472 | #ifdef HAVE_HIDAPI |
| 3473 | m_tmate2SmeterDbm = dbm; |
| 3474 | updateTMate2Display(); |
| 3475 | updateTMate2Indicators(); |
| 3476 | #endif |
| 3477 | }, |
| 3478 | QString::number(sliceIndex)); |
| 3479 | } |
| 3480 | }); |
| 3481 | // Symmetric with the amp-side guard at line ~3654 and the PGXL TCP path |
| 3482 | // at line ~3525: in OPERATE the amp owns the analog S-Meter, so drop the |
| 3483 | // exciter sample here to stop the alternating-writer pulse where exciter |
| 3484 | // (~100 W) and amp (~1500 W) values race into the same widget. (#2927) |
| 3485 | connect(&m_radioModel.meterModel(), &MeterModel::txMetersChanged, |
| 3486 | this, [this](float fwd, float swr) { |
| 3487 | if (m_radioModel.hasAmplifier() && m_radioModel.ampOperate()) |
| 3488 | return; |
| 3489 | m_appletPanel->sMeterWidget()->setTxMeters(fwd, swr); |
| 3490 | #ifdef HAVE_HIDAPI |
| 3491 | m_tmate2TxWatts = fwd; |
| 3492 | if (m_radioModel.transmitModel().isTransmitting()) { |
| 3493 | updateTMate2Display(); |
| 3494 | updateTMate2Indicators(); |
| 3495 | } |
| 3496 | #endif |
| 3497 | }); |
| 3498 | connect(&m_radioModel.meterModel(), &MeterModel::micMetersChanged, |
| 3499 | m_appletPanel->sMeterWidget(), &SMeterWidget::setMicMeters); |
| 3500 | connect(&m_radioModel.transmitModel(), &TransmitModel::moxChanged, |
| 3501 | m_appletPanel->sMeterWidget(), &SMeterWidget::setTransmitting); |
| 3502 | |
| 3503 | // ── Tuner: MeterModel TX meters → TunerApplet gauges ──────────────── |
| 3504 | // Use TGXL-specific meters when available (disambiguated from PGXL by handle) |
| 3505 | connect(&m_radioModel.meterModel(), &MeterModel::tgxlMetersChanged, |
| 3506 | m_appletPanel->tunerApplet(), &TunerApplet::updateMeters); |
| 3507 | // Note: txMetersChanged NOT connected to TunerApplet — exciter power |
nothing calls this directly
no test coverage detected