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 @@
OcsStorage::OcsStorage(OcsGraphics& ocsDesignIn)
: isInitalize(false),
isTransition(false),
ocsDesign(ocsDesignIn)
{
}
......@@ -39,6 +40,16 @@ void OcsStorage::Update(message income, uint8_t screenNum)
maxData.pressure = income.pressure;
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);
checkPressure(income.pressure);
......@@ -85,12 +96,12 @@ void OcsStorage::Update(message income, uint8_t screenNum)
ocsDesign.drawPower(power);
this->isInitalize = true;
this->isTransition = true;
}
else if(screenNum == 2)
{
this->isInitalize = true;
this->isTransition = true;
}
}
......
......@@ -43,6 +43,7 @@ class OcsStorage
private:
bool isInitalize;
bool isTransition;
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