Skip to content

Commit

Permalink
Improve crash/restart detection, works more reliably and auto-run now…
Browse files Browse the repository at this point in the history
… works on fast power cycles
  • Loading branch information
jperfetto committed Jun 26, 2011
1 parent 2b1d924 commit ff29874
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arduino/OpenPCR/openpcr.pde
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void setup() {
else
strcpy(gszRestartDetect, RESTART_DETECTION_STRING);

gpThermocycler = new Thermocycler(restarted);
gpThermocycler = new Thermocycler(!(MCUSR & 1));
}

void loop() {
Expand Down
6 changes: 3 additions & 3 deletions arduino/OpenPCR/thermocycler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ PROGMEM const unsigned int LID_RESISTANCE_TABLE[] = {
#define PLATE_PID_INC_D 250

#define PLATE_PID_INC_LOW_THRESHOLD 40
#define PLATE_PID_INC_LOW_P 2000
#define PLATE_PID_INC_LOW_I 1000
#define PLATE_PID_INC_LOW_D 800
#define PLATE_PID_INC_LOW_P 600
#define PLATE_PID_INC_LOW_I 200
#define PLATE_PID_INC_LOW_D 400

#define PLATE_PID_DEC_HIGH_THRESHOLD 70
#define PLATE_PID_DEC_HIGH_P 800
Expand Down
4 changes: 2 additions & 2 deletions arduino/OpenPCR/thermocycler.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Thermocycler {
const char* GetProgName() { return iszProgName; }
Display* GetDisplay() { return ipDisplay; }
ProgramComponentPool<Cycle, 4>& GetCyclePool() { return iCyclePool; }
ProgramComponentPool<Step, 30>& GetStepPool() { return iStepPool; }
ProgramComponentPool<Step, 25>& GetStepPool() { return iStepPool; }

boolean Ramping() { return iRamping; }
int GetPeltierPwm() { return iPeltierPwm; }
Expand Down Expand Up @@ -107,7 +107,7 @@ class Thermocycler {
Display* ipDisplay;
SerialControl* ipSerialControl;
ProgramComponentPool<Cycle, 4> iCyclePool;
ProgramComponentPool<Step, 30> iStepPool;
ProgramComponentPool<Step, 25> iStepPool;

// state
ProgramState iProgramState;
Expand Down

0 comments on commit ff29874

Please sign in to comment.