From 5af13a3510af60be78e8fb7e95a0becda455662a Mon Sep 17 00:00:00 2001 From: BPanther Date: Tue, 2 Jan 2024 00:43:08 +0100 Subject: [PATCH] small fix Origin commit data ------------------ Commit: https://github.com/Duckbox-Developers/neutrino-ddt/commit/4dc76b288ea6680723b6b4ed0ecf45c67273f0cd Author: BPanther Date: 2024-01-01 (Mon, 01 Jan 2024) --- src/zapit/src/frontend.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 685565956..9f8be619b 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -121,6 +121,8 @@ static fe_sec_voltage_t unicable_lowvolt = SEC_VOLTAGE_13; #define TIME_STEP 200 #define TIMEOUT_MAX_MS (feTimeout*100) +#define CMDTIMING 120 + /*********************************************************************************************************/ CFrontend::CFrontend(int Number, int Adapter) @@ -1889,7 +1891,7 @@ 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 */ @@ -1897,8 +1899,8 @@ uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int cmd.msg[4] = t & 0xFF; } fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_18); - usleep(20 * 1000); /* en50494 says: >4ms and < 22 ms */ - sendDiseqcCommand(&cmd, 120); /* en50494 says: >2ms and < 60 ms -- it seems we must add the lengthe of telegramm itself (~65ms)*/ + 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; @@ -1935,7 +1937,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 */ - sendDiseqcCommand(&cmd, 120); /* en50494 says: >2ms and < 60 ms -- it seems we must add the lengthe of telegramm itself (~65ms)*/ + 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;