Beispiel #1
0
void Codri::Controller::_onInitializationSuccess() {
    mLogger->info() << "Initialisation completed successfully, all functionality should be operational";

    // STATE EVENTS //

    // Kiosk
    connect(MainApplication::instance()->kiosk(), SIGNAL(onPowerChanged(Kiosk::Power)), mPlatformInterface, SLOT(setPower(Kiosk::Power)));

    // Configuration
    connect(MainApplication::instance()->configuration(), SIGNAL(onVolumeChanged(uint8_t)), mPlatformInterface, SLOT(setVolume(uint8_t)));

    // Presentation
    connect(MainApplication::instance()->presentation(), SIGNAL(onPathChanged(const QString&)), mRepositoryInterface, SLOT(check(const QString&)));


    // SUBSYSTEM EVENTS //

    // Repository interface
    connect(mRepositoryInterface, SIGNAL(changing()), mUserInterface, SLOT(showInit()));
    connect(mRepositoryInterface, SIGNAL(ready(QDir)), mUserInterface, SLOT(showPresentation(QDir)));
    connect(mRepositoryInterface, SIGNAL(runtimeFailure()), mUserInterface, SLOT(showError()));

    // User interface
    // connect(mRepositoryInterface, SIGNAL(runtimeFailure()), ..., SLOT(...));


    // SUBSYSTEM START //

    mUserInterface->start();
    mPlatformInterface->start();
    mRepositoryInterface->start();
    mNetworkInterface->start();
}
Beispiel #2
0
Codri::UserInterface::UserInterface(QObject *iParent) throw(QException)
    : QObject(iParent) {
    // Load settings
    mSettings = new QSettings(this);
    mSettings->beginGroup(metaObject()->className());

    // Setup logging
    mLogger =  Log4Qt::Logger::logger(metaObject()->className());

    // Use data directory
    mUserData = QDir(mSettings->value("datadir", "/tmp/chromium").toString());
    if (!mUserData.exists())
        mUserData.mkpath(mUserData.absolutePath());

    // Configure the instance
    mApplication = 0;
    mLogger->info() << "Displaying initialization page";
    showInit();
}
Beispiel #3
0
void testLCD()
{
	utPtn("init dis\n");
	VSTM0802AInit();

	#if 0	//先写后读测试,读出的应该和写入的一样,否则就有问题
	SetCursorPos(0,0);
	ramptc (0xff);
	utPrt("\nget = %x\n\n",ReadData (0, 0));
	#endif

	
	utPtn("init dis ok\n");
	utDelay1ms (200);
	//showTest();

	showInit();
	utDelay1s(2);
	while(1);

	#if 0
	showHeating();
	utDelay1s(2);

	showCheckHome();
	utDelay1s(2);

	showMain();
	utDelay1s(2);

	showDAOut();
	utDelay1s(2);

	showWaveCal();
	utDelay1s(2);
	#endif
}