Exemplo n.º 1
0
void main(void) //using 0
{			   
	EA = 0;
	
	
	PLLCON&=PLLCON_VAL;//настройка частоты процессора
	
	RestoreCalibrate();
	RestoreSettings();
//	ChannelsInit();//инициализация настроек каналов
	Protocol_Init();	
	Timer1_Initialize(); //таймер шедулера 200Гц	
	ADC_Initialize();
	UART_Init();


	WDT_Init(WDT_2000);//включить сторожевой таймер

	PT_INIT(&pt_sort);

	startMenu();
	EA=1;


	while(1)
	{		
		ulongsort_process(&pt_sort);
		DisplayProcess(&pt_display);  
		WDT_Process(&pt_wdt);
		KeyboardProcess(&pt_keyboard);	    
	}
}
Exemplo n.º 2
0
MainWindow::MainWindow(Model* _model)
{
  this->window = new QMainWindow(NULL, Qt::Window | Qt::WindowMinimizeButtonHint | Qt::WindowTitleHint);
  this->ui.setupUi(this->window);

  this->ui.procListWidget->setMouseTracking(true);
  QValidator* validator = new QIntValidator(0, 99999, this->window);
  this->ui.procIdText->setValidator(validator);

  QObject::connect(this->ui.addButton, SIGNAL(released())
      , this, SLOT(AddButtonPressed()));
  QObject::connect(this->ui.remButton, SIGNAL(released())
      , this, SLOT(RemoveButtonPressed()));
  QObject::connect(this->ui.procListWidget, SIGNAL(itemSelectionChanged())
      , this, SLOT(DisplayProcess()));

  this->model = _model;
  this->model->attachView(this);
}