Пример #1
0
void tst_QRadioTuner::testBand()
{
    QVERIFY(radio->isBandSupported(QRadioTuner::FM));
    QVERIFY(!radio->isBandSupported(QRadioTuner::SW));

    if(radio->isBandSupported(QRadioTuner::AM)) {
        QSignalSpy readSignal(radio, SIGNAL(bandChanged(QRadioTuner::Band)));
        radio->setBand(QRadioTuner::AM);
        QTestEventLoop::instance().enterLoop(1);
        QVERIFY(radio->band() == QRadioTuner::AM);
        QVERIFY(readSignal.count() == 1);
    }
}
Пример #2
0
void tst_QXARadio_xa::testBand()
{
    qRegisterMetaType<QRadioTuner::Band>("QRadioTuner::Band");

    QVERIFY(radio->isBandSupported(QRadioTuner::FM));
    QVERIFY(!radio->isBandSupported(QRadioTuner::SW));
    radio->setBand(QRadioTuner::FM);
    QVERIFY(radio->band() == QRadioTuner::FM);
    if(radio->isBandSupported(QRadioTuner::AM)) {
        QSignalSpy readSignal(radio, SIGNAL(bandChanged(QRadioTuner::Band)));
        radio->setBand(QRadioTuner::AM);
        QTRY_COMPARE(readSignal.count(), 1); // wait for callbacks to complete in symbian API
        QVERIFY(radio->band() == QRadioTuner::AM);
    }
}
Пример #3
0
void Channel::configChannel() {
    //initial value
	initialsignal = pulseIn(channelpin, HIGH);
    
	delay(2000);
    
    //Import first
	int i;
	for (i = 0; i < 100; i++) {
		readSignal();
		detectVersus();
        
		ChannelStatistic.add(signal);
	}
    
	mininitialsignal = ChannelStatistic.minimum();
	maxinitialsignal = ChannelStatistic.maximum();
    
}
Пример #4
0
 void Broadcast::load( ) {
     connect(System::instance (),SIGNAL(messageRecieved(Message)), s_brdcst,SLOT(readSignal(Message)));
     start();
     qDebug() << "(ntwk) [Broadcast] Loaded.";
 }
Пример #5
0
 Broadcast::~Broadcast() {
     System::instance()->disconnect(s_brdcst,SLOT(readSignal(Message)));
 }