Ejemplo n.º 1
0
int CFrontend::setFrontend(const FrontendParameters *feparams, bool nowait)
{
	struct dtv_property cmdargs[FE_COMMON_PROPS + FE_DVBT_PROPS]; // WARNING: increase when needed more space
	struct dtv_properties cmdseq;
#ifdef PEDANTIC_VALGRIND_SETUP
	memset(&cmdargs, 0, sizeof(cmdargs));
	memset(&cmdseq, 0, sizeof(cmdseq));
#endif

	cmdseq.num	= FE_COMMON_PROPS;
	cmdseq.props	= cmdargs;

	tuned = false;

	struct dvb_frontend_event ev;
	{
		// Erase previous events
		while (1) {
			if (ioctl(fd, FE_GET_EVENT, &ev) < 0)
				break;
			//printf("[fe%d] DEMOD: event status %d\n", fenumber, ev.status);
		}
	}

	if (!buildProperties(feparams, cmdseq))
		return 0;

	{
		//FE_TIMER_INIT();
		//FE_TIMER_START();
		if ((ioctl(fd, FE_SET_PROPERTY, &cmdseq)) < 0) {
			ERROR("FE_SET_PROPERTY");
			return false;
		}
		//FE_TIMER_STOP("FE_SET_PROPERTY took");
	}
	if (nowait)
		return 0;
	{
		FE_TIMER_INIT();
		FE_TIMER_START();

		struct dvb_frontend_event event;
		event = getEvent();

		if(tuned) {
			FE_TIMER_STOP("tuning took");
		}
	}

	return tuned;
}
Ejemplo n.º 2
0
CRunnerInterface::CRunnerInterface(QStringList parameter, QString text, int number):CGroupInterface(parameter, text, number)
{
  buildProperties();
  
  buildUncrewedStation();
}