Ticket #2091: conexant_signal_strength.diff

File conexant_signal_strength.diff, 1.1 KB (added by bradley.kite@…, 14 years ago)

patch to fix problem of 0% signal strength being displayed on Conexant-based chips

  • libs/libmythtv/tv_play.cpp

     
    45014501
    45024502        infoMap[it->GetShortName()] = QString::number(it->GetValue());
    45034503        if ("signal" == it->GetShortName())
    4504             sig = it->GetNormalizedValue(0, 100);
     4504        {
     4505            /* Some drivers return signal strength as a percentage already *
     4506             * while others return a value between zero and 65535, while   *
     4507             * some others dont return a value at all                      */
     4508
     4509            if (it->GetValue() > 0 && (it->GetNormalizedValue(0, 100) == 0))
     4510                /* There is a value, but its so small that when normalised
     4511                   it becomes zero. More than likely its a percentage already */
     4512                sig = it->GetValue();
     4513            else
     4514                sig = it->GetNormalizedValue(0, 100);
     4515        }
    45054516        else if ("snr" == it->GetShortName())
    45064517            snr = it->GetValue();
    45074518        else if ("ber" == it->GetShortName())