Ticket #1945: bandstacked-lnb.patch

File bandstacked-lnb.patch, 4.3 KB (added by yeasah@…, 19 years ago)

initial bandstacked patch

  • diseqc.cpp

     
    382382    }
    383383
    384384    // update capture card to point to tree, or 0 if there is no tree
    385     VERBOSE(VB_IMPORTANT, "diseqcid: "<<devid);
     385    //VERBOSE(VB_IMPORTANT, "diseqcid: "<<devid);
    386386    query0.prepare(
    387387        "UPDATE capturecard "
    388388        "SET diseqcid = :DEVID "
     
    18091809 *  \brief LNB Class.
    18101810 */
    18111811
    1812 const TypeTable DiSEqCDevLNB::LNBTypeTable[4] =
     1812const TypeTable DiSEqCDevLNB::LNBTypeTable[5] =
    18131813{
    18141814    { "fixed",        kTypeFixed                 },
    18151815    { "voltage",      kTypeVoltageControl        },
    18161816    { "voltage_tone", kTypeVoltageAndToneControl },
     1817    { "bandstacked",  kTypeBandstacked           },
    18171818    { QString::null,  kTypeVoltageAndToneControl },
    18181819};
    18191820
     
    19431944{
    19441945    (void) tuning;
    19451946#ifdef USING_DVB
    1946     if (kTypeVoltageAndToneControl == m_type)
    1947         return (tuning.params.frequency > m_lof_switch);
     1947    switch (m_type)
     1948    {
     1949        case kTypeVoltageAndToneControl:
     1950            return (tuning.params.frequency > m_lof_switch);
     1951        case kTypeBandstacked:
     1952            return IsHorizontal(tuning);
     1953        default:
     1954            return false;
     1955    }
    19481956#endif // USING_DVB
    19491957
    19501958    return false;
  • diseqc.h

     
    343343        kTypeFixed                 = 0,
    344344        kTypeVoltageControl        = 1,
    345345        kTypeVoltageAndToneControl = 2,
     346        kTypeBandstacked           = 3,
    346347    };
    347348    void SetType(dvbdev_lnb_t type)       { m_type       = type;       }
    348349    void SetLOFSwitch(uint lof_switch)    { m_lof_switch = lof_switch; }
     
    373374    uint         m_lof_hi;
    374375    uint         m_lof_lo;
    375376
    376     static const TypeTable LNBTypeTable[4];
     377    static const TypeTable LNBTypeTable[5];
    377378};
    378379
    379380#endif // _DISEQC_H_
  • diseqcsettings.cpp

     
    472472      DiSEqCDevLNB::kTypeVoltageControl,               0, 10750000,        0 },
    473473    { DeviceTree::tr("C Band"),
    474474      DiSEqCDevLNB::kTypeVoltageControl,               0,  5150000,        0 },
     475    { DeviceTree::tr("DishPro Bandstacked"),
     476      DiSEqCDevLNB::kTypeBandstacked,                  0, 11250000, 14350000 },
    475477    { QString::null,
    476478      DiSEqCDevLNB::kTypeVoltageControl,               0,        0,        0 },
    477479};
     
    539541        addSelection(DeviceTree::tr("Universal (Voltage & Tone)"),
    540542                     QString::number((uint) DiSEqCDevLNB::
    541543                                     kTypeVoltageAndToneControl));
     544        addSelection(DeviceTree::tr("Bandstacked"),
     545                     QString::number((uint) DiSEqCDevLNB::
     546                                     kTypeBandstacked));
    542547    }
    543548
    544549    virtual void load(void)
     
    593598        setLabel(DeviceTree::tr("LNB LOF Low (MHz)"));
    594599        QString help = DeviceTree::tr(
    595600            "This defines the offset the frequency coming "
    596             "from the LNB will be in low setting.");
     601            "from the LNB will be in low setting. For bandstacked "
     602            "LNBs this is the vertical/right polarization band.");
    597603        setHelpText(help);
    598604    }
    599605
     
    621627        setLabel(DeviceTree::tr("LNB LOF High (MHz)"));
    622628        QString help = DeviceTree::tr(
    623629            "This defines the offset the frequency coming from "
    624             "the LNB will be in high setting.");
     630            "the LNB will be in high setting. For bandstacked "
     631            "LNBs this is the horizontal/left polarization band.");
    625632        setHelpText(help);
    626633    }
    627634
     
    709716            m_lof_hi->setEnabled(true);
    710717            m_lof_lo->setEnabled(true);
    711718            break;
     719        case DiSEqCDevLNB::kTypeBandstacked:
     720            m_lof_switch->setEnabled(false);
     721            m_lof_hi->setEnabled(true);
     722            m_lof_lo->setEnabled(true);
     723            break;
    712724    }
    713725}
    714726
    715727//////////////////////////////////////// DeviceTree
    716728
    717 
    718729DeviceTree::DeviceTree(DiSEqCDevTree &tree) : m_tree(tree)
    719730{
    720731    connect(this, SIGNAL(editButtonPressed(int)),   SLOT(edit(void)));