qv4l2: don't show afc if signal strength == 0.
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 10 Jun 2012 11:41:51 +0000 (13:41 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Sun, 10 Jun 2012 11:41:51 +0000 (13:41 +0200)
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/qv4l2/general-tab.cpp

index 346a1ee..d0a8c17 100644 (file)
@@ -477,10 +477,8 @@ void GeneralTab::detectSubchansClicked()
        if (m_tuner.rxsubchans & V4L2_TUNER_SUB_RDS)
                chans += "RDS ";
        chans += "(" + QString::number((int)(m_tuner.signal / 655.35 + 0.5)) + "%";
-       if (m_tuner.afc < 0)
-               chans += " too low";
-       else if (m_tuner.afc > 0)
-               chans += " too high";
+       if (m_tuner.signal && m_tuner.afc)
+               chans += m_tuner.afc < 0 ? " too low" : " too high";
        chans += ")";
        m_subchannels->setText(chans);
 }