mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
zapit/src/frontend.cpp: fix slave flag in CFrontend::sendEN50494TuningCommand
This commit is contained in:
@@ -1054,8 +1054,6 @@ void CFrontend::setInput(t_satellite_position satellitePosition, uint32_t freque
|
|||||||
uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int high_band,
|
uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int high_band,
|
||||||
const int horizontal, const int bank)
|
const int horizontal, const int bank)
|
||||||
{
|
{
|
||||||
if (slave || info.type != FE_QPSK)
|
|
||||||
return;
|
|
||||||
uint32_t uni_qrgs[] = { 1284, 1400, 1516, 1632, 1748, 1864, 1980, 2096 };
|
uint32_t uni_qrgs[] = { 1284, 1400, 1516, 1632, 1748, 1864, 1980, 2096 };
|
||||||
uint32_t bpf;
|
uint32_t bpf;
|
||||||
if (config.uni_qrg == 0)
|
if (config.uni_qrg == 0)
|
||||||
@@ -1069,17 +1067,19 @@ uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int
|
|||||||
unsigned int t = (frequency / 1000 + bpf + 2) / 4 - 350;
|
unsigned int t = (frequency / 1000 + bpf + 2) / 4 - 350;
|
||||||
if (t < 1024 && config.uni_scr >= 0 && config.uni_scr < 8)
|
if (t < 1024 && config.uni_scr >= 0 && config.uni_scr < 8)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "VOLT18=%d TONE_ON=%d, freq=%d bpf=%d ret=%d\n", currentVoltage == SEC_VOLTAGE_18, currentToneMode == SEC_TONE_ON, frequency, bpf, (t + 350) * 4000 - frequency);
|
INFO("VOLT18=%d TONE_ON=%d, freq=%d bpf=%d ret=%d", currentVoltage == SEC_VOLTAGE_18, currentToneMode == SEC_TONE_ON, frequency, bpf, (t + 350) * 4000 - frequency);
|
||||||
cmd.msg[3] = (t >> 8) | /* highest 3 bits of t */
|
if (!slave && info.type == FE_QPSK) {
|
||||||
(config.uni_scr << 5) | /* adress */
|
cmd.msg[3] = (t >> 8) | /* highest 3 bits of t */
|
||||||
(bank << 4) | /* not implemented yet */
|
(config.uni_scr << 5) | /* adress */
|
||||||
(horizontal << 3) | /* horizontal == 0x08 */
|
(bank << 4) | /* not implemented yet */
|
||||||
(high_band) << 2; /* high_band == 0x04 */
|
(horizontal << 3) | /* horizontal == 0x08 */
|
||||||
cmd.msg[4] = t & 0xFF;
|
(high_band) << 2; /* high_band == 0x04 */
|
||||||
fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_18);
|
cmd.msg[4] = t & 0xFF;
|
||||||
usleep(15 * 1000); /* en50494 says: >4ms and < 22 ms */
|
fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_18);
|
||||||
sendDiseqcCommand(&cmd, 50); /* en50494 says: >2ms and < 60 ms */
|
usleep(15 * 1000); /* en50494 says: >4ms and < 22 ms */
|
||||||
fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_13);
|
sendDiseqcCommand(&cmd, 50); /* en50494 says: >2ms and < 60 ms */
|
||||||
|
fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_13);
|
||||||
|
}
|
||||||
return (t + 350) * 4000 - frequency;
|
return (t + 350) * 4000 - frequency;
|
||||||
}
|
}
|
||||||
WARN("ooops. t > 1024? (%d) or uni_scr out of range? (%d)", t, config.uni_scr);
|
WARN("ooops. t > 1024? (%d) or uni_scr out of range? (%d)", t, config.uni_scr);
|
||||||
|
Reference in New Issue
Block a user