Exemplo n.º 1
0
void Display::Update() {
  Thermocycler::ProgramState state = GetThermocycler().GetProgramState();
  if (iLastState != state)
    iLcd.clear();
  iLastState = state;
  
  // check for reset
  if (millis() - iLastReset > RESET_INTERVAL) {  
    iLcd.begin(20, 4);
    iLastReset = millis();
  }
  
  switch (state) {
  case Thermocycler::ERunning:
  case Thermocycler::EComplete:
  case Thermocycler::ELidWait:
  case Thermocycler::EStopped:
    iLcd.setCursor(0, 1);
 #ifdef DEBUG_DISPLAY
    iLcd.print(iszDebugMsg);
 #else
    iLcd.print(GetThermocycler().GetProgName());
 #endif
           
    DisplayLidTemp();
    DisplayBlockTemp();
    DisplayState();

    if (state == Thermocycler::ERunning && !GetThermocycler().GetCurrentStep()->IsFinal()) {
      DisplayCycle();
      DisplayEta();
    } else if (state == Thermocycler::EComplete) {
      iLcd.setCursor(0, 3);
      iLcd.print(rps(RUN_COMPLETE_STR));
    }
    break;
  
  case Thermocycler::EOff:
  case Thermocycler::EStartup:
    iLcd.setCursor(6, 1);
    iLcd.print(rps(OPENPCR_STR));

    if (state == Thermocycler::EOff) {
      iLcd.setCursor(4, 2);
      iLcd.print(rps(POWERED_OFF_STR));
    } else {
      iLcd.setCursor(3, 2);
      iLcd.print(rps(VERSION_STR));
    }
    break;
  }
}
Exemplo n.º 2
0
int main(int argc, char** argv) {
  srand(time(NULL));
  ros::init(argc, argv, "get_robot_pose_node");

  RobotPoseServer rps("slam/get_robot_pose");
  ros::spin();

  return 0;
  
}
Exemplo n.º 3
0
void Display::DisplayState() {
  char buf[32];
  char* stateStr;
  
  switch (GetThermocycler().GetProgramState()) {
  case Thermocycler::ELidWait:
    stateStr = rps(LIDWAIT_STR);
    break;
    
  case Thermocycler::ERunning:
  case Thermocycler::EComplete:
    switch (GetThermocycler().GetThermalState()) {
    case Thermocycler::EHeating:
      stateStr = rps(HEATING_STR);
      break;
    case Thermocycler::ECooling:
      stateStr = rps(COOLING_STR);
      break;
    case Thermocycler::EHolding:
      stateStr = GetThermocycler().GetCurrentStep()->GetName();
      break;
    case Thermocycler::EIdle:
      stateStr = rps(STOPPED_STR);
      break;
    }
    break;
    
  case Thermocycler::EStopped:
    stateStr = rps(STOPPED_STR);
    break;
  }
  
  iLcd.setCursor(0, 0);
  sprintf_P(buf, STATE_FORM_STR, stateStr);
  iLcd.print(buf);
}