Ejemplo n.º 1
0
void CFrontend::setDiseqcType(const diseqc_t newDiseqcType, bool force)
{
	switch (newDiseqcType) {
	case NO_DISEQC:
		INFO("fe%d: NO_DISEQC", fenumber);
		break;
	case MINI_DISEQC:
		INFO("fe%d: MINI_DISEQC", fenumber);
		break;
	case SMATV_REMOTE_TUNING:
		INFO("fe%d: SMATV_REMOTE_TUNING", fenumber);
		break;
	case DISEQC_1_0:
		INFO("fe%d: DISEQC_1_0", fenumber);
		break;
	case DISEQC_1_1:
		INFO("fe%d: DISEQC_1_1", fenumber);
		break;
	case DISEQC_1_2:
		INFO("fe%d: DISEQC_1_2", fenumber);
		break;
	case DISEQC_ADVANCED:
		INFO("fe%d: DISEQC_ADVANCED", fenumber);
		break;
	case DISEQC_UNICABLE:
		INFO("fe%d: DISEQC_UNICABLE", fenumber);
		break;
#if 0
	case DISEQC_2_0:
		INFO("DISEQC_2_0");
		break;
	case DISEQC_2_1:
		INFO("DISEQC_2_1");
		break;
	case DISEQC_2_2:
		INFO("DISEQC_2_2");
		break;
#endif
	default:
		WARN("Invalid DiSEqC type");
		return;
	}

	if (newDiseqcType == DISEQC_UNICABLE) {
		secSetTone(SEC_TONE_OFF, 0);
		secSetVoltage(SEC_VOLTAGE_13, 0);
	}
	else if ((force && (newDiseqcType != NO_DISEQC)) ||
		 ((config.diseqcType <= MINI_DISEQC) && (newDiseqcType > MINI_DISEQC))) {
		secSetTone(SEC_TONE_OFF, 15);
		sendDiseqcReset();
		sendDiseqcPowerOn();
		secSetTone(SEC_TONE_ON, 50);
	}

	config.diseqcType = newDiseqcType;
}
Ejemplo n.º 2
0
void CFrontend::setDiseqcType(const diseqc_t newDiseqcType)
{
    switch (newDiseqcType) {
    case NO_DISEQC:
        INFO("NO_DISEQC");
        break;
    case MINI_DISEQC:
        INFO("MINI_DISEQC");
        break;
    case SMATV_REMOTE_TUNING:
        INFO("SMATV_REMOTE_TUNING");
        break;
    case DISEQC_1_0:
        INFO("DISEQC_1_0");
        break;
    case DISEQC_1_1:
        INFO("DISEQC_1_1");
        break;
    case DISEQC_1_2:
        INFO("DISEQC_1_2");
        break;
#if HAVE_DVB_API_VERSION >= 3
    case DISEQC_2_0:
        INFO("DISEQC_2_0");
        break;
    case DISEQC_2_1:
        INFO("DISEQC_2_1");
        break;
    case DISEQC_2_2:
        INFO("DISEQC_2_2");
        break;
#endif
    default:
        WARN("Invalid DiSEqC type");
        return;
    }

    if (diseqcType != newDiseqcType)
    {
        /* make sure that the switch gets reset, so that he will
           accept the new mode */
        sendDiseqcReset();
        sendDiseqcPowerOn();
    }

    diseqcType = newDiseqcType;
}
Ejemplo n.º 3
0
void CFrontend::setDiseqcType(const diseqc_t newDiseqcType)
{
	switch (newDiseqcType) {
	case NO_DISEQC:
		INFO("NO_DISEQC");
		break;
	case MINI_DISEQC:
		INFO("MINI_DISEQC");
		break;
	case SMATV_REMOTE_TUNING:
		INFO("SMATV_REMOTE_TUNING");
		break;
	case DISEQC_1_0:
		INFO("DISEQC_1_0");
		break;
	case DISEQC_1_1:
		INFO("DISEQC_1_1");
		break;
	case DISEQC_1_2:
		INFO("DISEQC_1_2");
		break;
#if HAVE_DVB_API_VERSION >= 3
	case DISEQC_2_0:
		INFO("DISEQC_2_0");
		break;
	case DISEQC_2_1:
		INFO("DISEQC_2_1");
		break;
	case DISEQC_2_2:
		INFO("DISEQC_2_2");
		break;
#endif
	default:
		WARN("Invalid DiSEqC type");
		return;
	}

	if ((diseqcType <= MINI_DISEQC) && (newDiseqcType > MINI_DISEQC)) {
		sendDiseqcPowerOn();
		sendDiseqcReset();
	}

	diseqcType = newDiseqcType;
}