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); } }
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); } }
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(); }
void Broadcast::load( ) { connect(System::instance (),SIGNAL(messageRecieved(Message)), s_brdcst,SLOT(readSignal(Message))); start(); qDebug() << "(ntwk) [Broadcast] Loaded."; }
Broadcast::~Broadcast() { System::instance()->disconnect(s_brdcst,SLOT(readSignal(Message))); }