diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-05-02 11:57:01 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-05-02 11:57:01 +0000 |
| commit | 7a6b5e730bb33b3ea9a1c693ee434e99d389f583 (patch) | |
| tree | 41d0914a6ff3bacfeb07d9e4a7041e2a8a920d63 /lib/dvb/frontend.cpp | |
| parent | a6c228f84d0f5363445d5340b381057bd7bb7b98 (diff) | |
| download | enigma2-7a6b5e730bb33b3ea9a1c693ee434e99d389f583.tar.gz enigma2-7a6b5e730bb33b3ea9a1c693ee434e99d389f583.zip | |
add satconfig part
Diffstat (limited to 'lib/dvb/frontend.cpp')
| -rw-r--r-- | lib/dvb/frontend.cpp | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index 00886ee4..6e8bcaa7 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -613,20 +613,26 @@ RESULT eDVBFrontend::sendDiseqc(const eDVBDiseqcCommand &diseqc) secCmdSequence seq; secCommand cmd; - cmd.type = SEC_CMDTYPE_DISEQC_RAW; - cmd.u.diseqc.cmdtype = diseqc.data[0]; - eDebug("cmdtype is %02x", diseqc.data[0]); - cmd.u.diseqc.addr = diseqc.data[1]; - eDebug("cmdaddr is %02x", diseqc.data[1]); - cmd.u.diseqc.cmd = diseqc.data[2]; - eDebug("cmd is %02x", diseqc.data[2]); - cmd.u.diseqc.numParams = diseqc.len-3; - eDebug("numparams %d", diseqc.len-3); - - memcpy(cmd.u.diseqc.params, diseqc.data+3, diseqc.len-3); - for (int i=0; i < diseqc.len-3; ++i ) - eDebugNoNewLine("%02x ", diseqc.data[3+i]); - eDebug(""); + if ( len > 3 ) + { + seq.numCommands=1; + cmd.type = SEC_CMDTYPE_DISEQC_RAW; + cmd.u.diseqc.cmdtype = diseqc.data[0]; + eDebug("cmdtype is %02x", diseqc.data[0]); + cmd.u.diseqc.addr = diseqc.data[1]; + eDebug("cmdaddr is %02x", diseqc.data[1]); + cmd.u.diseqc.cmd = diseqc.data[2]; + eDebug("cmd is %02x", diseqc.data[2]); + cmd.u.diseqc.numParams = diseqc.len-3; + eDebug("numparams %d", diseqc.len-3); + + memcpy(cmd.u.diseqc.params, diseqc.data+3, diseqc.len-3); + for (int i=0; i < diseqc.len-3; ++i ) + eDebugNoNewLine("%02x ", diseqc.data[3+i]); + eDebug(""); + } + else + seq.numCommands=0; seq.continuousTone = diseqc.tone == toneOn ? SEC_TONE_ON : SEC_TONE_OFF; switch ( diseqc.voltage ) @@ -643,7 +649,6 @@ RESULT eDVBFrontend::sendDiseqc(const eDVBDiseqcCommand &diseqc) } seq.miniCommand = SEC_MINI_NONE; seq.commands=&cmd; - seq.numCommands=1; if ( ioctl(m_secfd, SEC_SEND_SEQUENCE, &seq) < 0 ) { @@ -652,6 +657,8 @@ RESULT eDVBFrontend::sendDiseqc(const eDVBDiseqcCommand &diseqc) } return 0; #else + if ( !diseqc.len ) + return 0; struct dvb_diseqc_master_cmd cmd; if (::ioctl(m_fd, FE_SET_TONE, SEC_TONE_OFF)) return -EINVAL; |
