Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BPanther committed Jan 1, 2024
1 parent d121f5a commit 4dc76b2
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/zapit/src/frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ static fe_sec_voltage_t unicable_lowvolt = SEC_VOLTAGE_13;
#define TIME_STEP 200
#define TIMEOUT_MAX_MS (feTimeout*100)

#if BOXMODEL_E4HDULTRA
#define CMDTIMING 120
#else
#define CMDTIMING 80
#endif

/*********************************************************************************************************/

CFrontend::CFrontend(int Number, int Adapter)
Expand Down Expand Up @@ -1884,20 +1890,16 @@ uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int
adapter, fenumber, horizontal, high_band, frequency, bpf, config.uni_scr, bank, pin, ret);
if (!slave && info.type == FE_QPSK) {
cmd.msg[3] = (config.uni_scr << 5); /* adress */
if (bank < 2) { /* bank = 0/1 => tune, bank = 2 => standby */
if (bank < 2) { /* bank = 0/1 => tune, bank = 2 => standby */
cmd.msg[3] |= (t >> 8) | /* highest 2 bits of t */
(bank << 4) | /* input 0/1 */
(horizontal << 3) | /* horizontal == 0x08 */
(high_band) << 2; /* high_band == 0x04 */
cmd.msg[4] = t & 0xFF;
}
fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_18);
usleep(20 * 1000); /* en50494 says: >4ms and < 22 ms */
#if BOXMODEL_E4HDULTRA
sendDiseqcCommand(&cmd, 120);
#else
sendDiseqcCommand(&cmd, 80); /* en50494 says: >2ms and < 60 ms -- it seems we must add the lengthe of telegramm itself (~65ms)*/
#endif
usleep(20 * 1000); /* en50494 says: >4ms and < 22 ms */
sendDiseqcCommand(&cmd, CMDTIMING); /* en50494 says: >2ms and < 60 ms -- it seems we must add the length of telegramm itself (~65ms)*/
fop(ioctl, FE_SET_VOLTAGE, unicable_lowvolt);
}
return ret;
Expand Down Expand Up @@ -1934,11 +1936,7 @@ uint32_t CFrontend::sendEN50607TuningCommand(const uint32_t frequency, const int
high_band; /* high_band == 0x01 */
fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_18);
usleep(20 * 1000); /* en50494 says: >4ms and < 22 ms */
#if BOXMODEL_E4HDULTRA
sendDiseqcCommand(&cmd, 120);
#else
sendDiseqcCommand(&cmd, 80); /* en50494 says: >2ms and < 60 ms -- it seems we must add the lengthe of telegramm itself (~65ms)*/
#endif
sendDiseqcCommand(&cmd, CMDTIMING); /* en50494 says: >2ms and < 60 ms -- it seems we must add the length of telegramm itself (~65ms)*/
fop(ioctl, FE_SET_VOLTAGE, unicable_lowvolt);
}
return ret;
Expand Down

0 comments on commit 4dc76b2

Please sign in to comment.