Ticket #9726: 0037-mythtv-0.26-resend_disecq_cmds.patch

File 0037-mythtv-0.26-resend_disecq_cmds.patch, 2.2 KB (added by warpme@…, 13 years ago)

Add Disecq command resend

  • mythtv/libs/libmythtv/diseqc.cpp

    diff -Naur mythtv-master-20120823-g6566c3c-old/mythtv/libs/libmythtv/diseqc.cpp mythtv-master-20120823-g6566c3c-new/mythtv/libs/libmythtv/diseqc.cpp
    old new  
    667667        return false;
    668668    }
    669669
     670    bool resend_cmd = false;
     671
    670672#ifndef USING_DVB
    671673
    672674    (void) adr;
     
    693695
    694696    LOG(VB_CHANNEL, LOG_INFO, LOC + "Sending DiSEqC Command: " + cmdstr);
    695697
     698    if (repeats >= 10)
     699    {
     700        repeats = repeats - 10;
     701        resend_cmd = true;
     702    }
     703
    696704    // send the command
    697705    for (uint i = 0; i <= repeats; i++)
    698706    {
     
    702710            return false;
    703711        }
    704712
    705         mcmd.msg[0] |= DISEQC_FRM_REPEAT;
     713        if (!resend_cmd)
     714            mcmd.msg[0] |= DISEQC_FRM_REPEAT;
     715
    706716        usleep(DISEQC_SHORT_WAIT);
    707717    }
    708718
  • mythtv/libs/libmythtv/diseqcsettings.cpp

    diff -Naur mythtv-master-20120823-g6566c3c-old/mythtv/libs/libmythtv/diseqcsettings.cpp mythtv-master-20120823-g6566c3c-new/mythtv/libs/libmythtv/diseqcsettings.cpp
    old new  
    111111{
    112112  public:
    113113    DeviceRepeatSetting(DiSEqCDevDevice &device) :
    114         SpinBoxSetting(this, 0, 5, 1), m_device(device)
     114        SpinBoxSetting(this, 0, 15, 1), m_device(device)
    115115    {
    116116        setLabel(DeviceTree::tr("Repeat Count"));
    117117        QString help = DeviceTree::tr(
    118             "Number of times to repeat DiSEqC commands sent to this device. "
    119             "Larger values may help with less reliable devices.");
     118            "Number of repeat (command with repeat flag ON) or resend (the same command) DiSEqC commands."
     119            "If value is higher than 10, command will be resend N-10 times"
     120            "If value is lower than 10, command will be repeated N times"
     121            "Repeat useful for unreliable DiSEqC equipment; resend useful when unreliable DiSEq equipment has broken/unsuported repeat flag support.");
    120122        setHelpText(help);
    121123    }
    122124