Commit dd21c33e authored by Markéta Jedličková's avatar Markéta Jedličková
Browse files

Improvment of init and transition state for showing temp and pressure

parent 49aa4e8b
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
OcsStorage::OcsStorage(OcsGraphics& ocsDesignIn) OcsStorage::OcsStorage(OcsGraphics& ocsDesignIn)
: isInitalize(false), : isInitalize(false),
isTransition(false),
ocsDesign(ocsDesignIn) ocsDesign(ocsDesignIn)
{ {
} }
...@@ -39,6 +40,16 @@ void OcsStorage::Update(message income, uint8_t screenNum) ...@@ -39,6 +40,16 @@ void OcsStorage::Update(message income, uint8_t screenNum)
maxData.pressure = income.pressure; maxData.pressure = income.pressure;
isInitalize = true; isInitalize = true;
} }
else if(this->isTransition == true)
{
ocsDesign.drawTemp(income.temperature);
ocsDesign.drawMinTemp(minData.temperature);
ocsDesign.drawMaxTemp(maxData.temperature);
ocsDesign.drawPress(income.pressure);
ocsDesign.drawMinPress(minData.pressure);
ocsDesign.drawMaxPress(maxData.pressure);
isTransition = false;
}
checkTemperature(income.temperature); checkTemperature(income.temperature);
checkPressure(income.pressure); checkPressure(income.pressure);
...@@ -85,12 +96,12 @@ void OcsStorage::Update(message income, uint8_t screenNum) ...@@ -85,12 +96,12 @@ void OcsStorage::Update(message income, uint8_t screenNum)
ocsDesign.drawPower(power); ocsDesign.drawPower(power);
this->isInitalize = true; this->isTransition = true;
} }
else if(screenNum == 2) else if(screenNum == 2)
{ {
this->isInitalize = true; this->isTransition = true;
} }
} }
......
...@@ -43,6 +43,7 @@ class OcsStorage ...@@ -43,6 +43,7 @@ class OcsStorage
private: private:
bool isInitalize; bool isInitalize;
bool isTransition;
OcsGraphics ocsDesign; OcsGraphics ocsDesign;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment