Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix cycle count display when having an initial step
  • Loading branch information
jperfetto committed Dec 17, 2011
1 parent 66ab1c0 commit 82acdc9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arduino/OpenPCR/display.cpp
Expand Up @@ -32,7 +32,7 @@ const char STOPPED_STR[] PROGMEM = "Ready";
const char RUN_COMPLETE_STR[] PROGMEM = "*** Run Complete ***";
const char OPENPCR_STR[] PROGMEM = "OpenPCR";
const char POWERED_OFF_STR[] PROGMEM = "Powered Off";
const char VERSION_STR[] PROGMEM = "Firmware v1.0";
const char VERSION_STR[] PROGMEM = "Firmware v1.0.1";
const char ETA_OVER_10H_STR[] PROGMEM = "ETA: >10h";

const char LID_FORM_STR[] PROGMEM = "Lid: %3d C";
Expand Down
8 changes: 6 additions & 2 deletions arduino/OpenPCR/thermocycler.cpp
Expand Up @@ -547,12 +547,16 @@ void Thermocycler::ProcessCommand(SCommand& command) {
//find display cycle
Cycle* pProgram = command.pProgram;
Cycle* pDisplayCycle = pProgram;
int largestCycleCount = 0;

for (int i = 0; i < pProgram->GetNumComponents(); i++) {
ProgramComponent* pComp = pProgram->GetComponent(i);
if (pComp->GetType() == ProgramComponent::ECycle) {
pDisplayCycle = (Cycle*)pComp;
break;
Cycle* pCycle = (Cycle*)pComp;
if (pCycle->GetNumCycles() > largestCycleCount) {
largestCycleCount = pCycle->GetNumCycles();
pDisplayCycle = pCycle;
}
}
}

Expand Down

0 comments on commit 82acdc9

Please sign in to comment.