summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arduino/OpenPCR/display.h3
-rw-r--r--arduino/OpenPCR/serialcontrol.cpp1
-rw-r--r--arduino/OpenPCR/thermocycler.cpp2
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;