예제 #1
0
// the loop routine runs over and over again forever:
void loop() {
//digitalClockDisplay(hour(), minute());
	time_2 = millis();
	last_st = key_state;
	read_state();
	st = key_state;

	if (st != last_st) {
		process_state();
		process_display();
		time_1 = millis();
	} else if (menu_state == Menu0_MainMenu) {
		process_display(); // If Menu0, update display event without key_State
	}

	time = time_2 - time_1;
	time = time / 1000;
	if (time >= 10) {
		turnOffDisplay();
		resetKeyState();

		//pinMode(LCDBacklight_pin, OUTPUT);
		//DisplayLCD_State = false;
	} else {
		turnOnDisplay();
		//pinMode(LCDBacklight_pin, INPUT);
		//DisplayLCD_State = true;
	}

	Alarm.delay(90); // wait one second between clock display
}
예제 #2
0
short Mode::process(SqlciEnv * sqlci_env)
{
  short retcode = 1;
  switch (type)
  {
// 64-bit: report writer are no longer supported
/*
//    case REPORT_:
//      retcode = process_report(sqlci_env);
//      break;
*/
    case SQL_:
      retcode = process_sql(sqlci_env);
      break;
    case DISPLAY_:
      retcode = process_display(sqlci_env);
      break;
    //Neo 2.0: MODE MXCS should be disabled in Neo Soln 10-061220-1308.
    /*case MXCS_:
      retcode = process_mxcs(sqlci_env);
      break; */
    default: 
      SqlciError(SQLCI_INVALID_MODE 
			,(ErrorParam *) 0 );
      break;
  }
  return retcode;
}