/** * Initializes the LibDS system and instructs the class to close the LibDS * before the Qt application is closed. */ void DriverStation::start() { if (!DS_Initialized()) { DS_Init(); processEvents(); updateElapsedTime(); emit statusChanged (generalStatus()); connect (qApp, SIGNAL (aboutToQuit()), this, SLOT (quitDS())); } }
void DoWork() { //LCD_Clear_Display(); if (iterations%500!=0) { iterations++; //_delay_ms(1); return; } //LCD_Clear_Display(); //LCD_printStr("Waiting..."); //return ; //DS_Init(DSBIT1); DS_Init(DSBIT1); DS_Init(DSBIT2); DS_Init(DSBIT3); temp[0] = DS_getFloatTemperature(DSBIT1); //DS_Init(DSBIT2); temp[1] = DS_getFloatTemperature(DSBIT2); //DS_Init(DSBIT3); temp[2] = DS_getFloatTemperature(DSBIT3); HandleRelay(all_settings, temp, RELAY1); HandleRelay(all_settings, temp, RELAY2); HandleRelay(all_settings, temp, RELAY3); HandleRelay(all_settings, temp, RELAY4); LCD_2buffer_begin(); //LCD_Clear_Display(); LCD_2buffer_Move_Cursor(0); LCD_2buffer_Show_FloatTemperature1(temp[0]); LCD_2buffer_Move_Cursor(8); LCD_2buffer_Show_FloatTemperature1(temp[1]); LCD_2buffer_Move_Cursor(16); LCD_2buffer_Show_FloatTemperature1(temp[2]); LCD_2buffer_Move_Cursor(24); LCD_2buffer_Print_Number(pwmParts); LCD_2buffer_Move_Cursor(31); char pwmSignalChar[2]; pwmSignalChar[1] = '\0'; if (readPWMSignal()) pwmSignalChar[0] = '+'; else pwmSignalChar[0] = '-'; LCD_2buffer_printStr(pwmSignalChar); /*LCD_2buffer_Move_Cursor(24); uint8_t i; for (i=0; i<3; i++) { if (RELAY_PIN & (1<<i)) LCD_2buffer_printStr("1"); else LCD_2buffer_printStr("0"); }*/ LCD_2buffer_end(); iterations = 1; _delay_us(100); }