diff options
author | Josh Perfetto <josh@snowrise.com> | 2012-01-14 14:54:29 -0800 |
---|---|---|
committer | Josh Perfetto <josh@snowrise.com> | 2012-01-14 14:54:29 -0800 |
commit | 455bffbb6d79ebe73ab2a170c2a5328afff571dc (patch) | |
tree | c4dbcfc1e41389dc7277263f26a3b4258a086678 | |
parent | 21a91bed0e0ce3bb4686dec61dd0d0ff50a2d479 (diff) | |
download | openpcr-master.tar.gz openpcr-master.zip |
-rw-r--r-- | arduino/OpenPCR/display.h | 3 | ||||
-rw-r--r-- | arduino/OpenPCR/serialcontrol.cpp | 1 | ||||
-rw-r--r-- | arduino/OpenPCR/thermocycler.cpp | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/arduino/OpenPCR/display.h b/arduino/OpenPCR/display.h index 9d0f7ec..2b2fdcd 100644 --- a/arduino/OpenPCR/display.h +++ b/arduino/OpenPCR/display.h @@ -28,6 +28,9 @@ class Display { public: Display(); + //accessotrs + uint8_t GetContrast() { return iContrast; } + void SetContrast(uint8_t contrast); void Clear(); void SetDebugMsg(char* szDebugMsg); diff --git a/arduino/OpenPCR/serialcontrol.cpp b/arduino/OpenPCR/serialcontrol.cpp index 2019297..4618aea 100644 --- a/arduino/OpenPCR/serialcontrol.cpp +++ b/arduino/OpenPCR/serialcontrol.cpp @@ -168,6 +168,7 @@ void SerialControl::SendStatus() { statusPtr = AddParam(statusPtr, 'l', (int)tc.GetLidTemp()); statusPtr = AddParam(statusPtr, 'b', tc.GetPlateTemp(), 1, false); statusPtr = AddParam_P(statusPtr, 't', szThermState); + statusPtr = AddParam(statusPtr, 'o', GetThermocycler().GetDisplay()->GetContrast()); if (state == Thermocycler::ERunning || state == Thermocycler::EComplete) { statusPtr = AddParam(statusPtr, 'e', tc.GetElapsedTimeS()); diff --git a/arduino/OpenPCR/thermocycler.cpp b/arduino/OpenPCR/thermocycler.cpp index be46353..cb7be1c 100644 --- a/arduino/OpenPCR/thermocycler.cpp +++ b/arduino/OpenPCR/thermocycler.cpp @@ -542,8 +542,6 @@ void Thermocycler::SetPeltier(ThermalDirection dir, int pwm) { void Thermocycler::ProcessCommand(SCommand& command) { if (command.command == SCommand::EStart) { - ipDisplay->SetContrast(command.contrast); - //find display cycle Cycle* pProgram = command.pProgram; Cycle* pDisplayCycle = pProgram; |