@@ -77,16 +77,17 @@ void RefrigeratorUI::DrawUI(GLIB_Context_t * glibContext)
77
77
#endif // SL_LCDCTRL_MUX
78
78
}
79
79
80
- void ThermostatUI ::SetCurrentTemp (int8_t temp)
80
+ void RefrigeratorUI ::SetCurrentTemp (int8_t temp)
81
81
{
82
82
mCurrentTempCelsius = temp;
83
83
}
84
- void ThermostatUI::SetMode (uint8_t mode)
84
+
85
+ void RefrigeratorUI::SetMode (uint8_t mode)
85
86
{
86
87
mMode = mode;
87
88
}
88
89
89
- void ThermostatUI ::DrawHeader (GLIB_Context_t * glibContext)
90
+ void RefrigeratorUI ::DrawHeader (GLIB_Context_t * glibContext)
90
91
{
91
92
// Draw Silabs Corner icon
92
93
GLIB_drawBitmap (glibContext, SILABS_ICON_POSITION_X, STATUS_ICON_LINE, SILABS_LOGO_WIDTH, SILABS_LOGO_HEIGHT, silabsLogo);
@@ -106,26 +107,26 @@ void ThermostatUI::DrawHeader(GLIB_Context_t * glibContext)
106
107
#endif // SL_LCDCTRL_MUX
107
108
}
108
109
109
- void ThermostatUI ::DrawFooter (GLIB_Context_t * glibContext, bool autoMode)
110
+ void RefrigeratorUI ::DrawFooter (GLIB_Context_t * glibContext, bool autoMode)
110
111
{
111
112
switch (static_cast <RefrigeratorUI::SUPPORTED_MODES>(mMode ))
112
113
{
113
- case HVACMode ::RAPID_COOL:
114
+ case SUPPORTED_MODES ::RAPID_COOL:
114
115
GLIB_drawStringOnLine (glibContext, " Mode : Rapid Cool" , 11 , GLIB_ALIGN_LEFT, 0 , 0 , true );
115
116
GLIB_drawBitmap (glibContext, HEATING_COOLING_X, HEATING_COOLING_Y, COOLING_WIDTH, COOLING_HEIGHT, heating_bits);
116
117
DrawSetPoint (glibContext, mCurrentTempCelsius , false );
117
118
break ;
118
- case HVACMode ::RAPID_FREEZE:
119
+ case SUPPORTED_MODES ::RAPID_FREEZE:
119
120
GLIB_drawStringOnLine (glibContext, " Mode : Rapid Freeze" , 11 , GLIB_ALIGN_LEFT, 0 , 0 , true );
120
121
GLIB_drawBitmap (glibContext, HEATING_COOLING_X, HEATING_COOLING_Y, COOLING_WIDTH, COOLING_HEIGHT, cooling_bits);
121
122
DrawSetPoint (glibContext, mCurrentTempCelsius , false );
122
123
break ;
123
- case HVACMode ::NORMAL:
124
+ case SUPPORTED_MODES ::NORMAL:
124
125
GLIB_drawStringOnLine (glibContext, " Mode : Normal" , 11 , GLIB_ALIGN_LEFT, 0 , 0 , true );
125
126
GLIB_drawBitmap (glibContext, HEATING_COOLING_X, HEATING_COOLING_Y, COOLING_WIDTH, COOLING_HEIGHT, heating_cooling_bits);
126
127
DrawSetPoint (glibContext, mCurrentTempCelsius , false );
127
128
break ;
128
- case HVACMode ::ENERGY_SAVE:
129
+ case SUPPORTED_MODES ::ENERGY_SAVE:
129
130
DrawSetPoint (glibContext, 0 , false );
130
131
GLIB_drawStringOnLine (glibContext, " Mode : Energy save" , 11 , GLIB_ALIGN_LEFT, 0 , 0 , true );
131
132
DrawSetPoint (glibContext, mCurrentTempCelsius , false );
@@ -150,7 +151,7 @@ void ThermostatUI::DrawFooter(GLIB_Context_t * glibContext, bool autoMode)
150
151
* @param int8_t setPoint in Celsius
151
152
* @param bool isCelsius By default set to True. For future development
152
153
*/
153
- void ThermostatUI ::DrawCurrentTemp (GLIB_Context_t * glibContext, int8_t temp, bool isCelsius)
154
+ void RefrigeratorUI ::DrawCurrentTemp (GLIB_Context_t * glibContext, int8_t temp, bool isCelsius)
154
155
{
155
156
uint8_t tempArray[2 ];
156
157
uint8_t position_x = 10 ;
@@ -203,7 +204,7 @@ void ThermostatUI::DrawCurrentTemp(GLIB_Context_t * glibContext, int8_t temp, bo
203
204
}
204
205
}
205
206
206
- void ThermostatUI ::DrawFont (GLIB_Context_t * glibContext, uint8_t initial_x, uint8_t initial_y, uint8_t width, uint8_t * data,
207
+ void RefrigeratorUI ::DrawFont (GLIB_Context_t * glibContext, uint8_t initial_x, uint8_t initial_y, uint8_t width, uint8_t * data,
207
208
uint32_t size)
208
209
{
209
210
uint8_t x = initial_x, y = initial_y;
@@ -231,7 +232,7 @@ void ThermostatUI::DrawFont(GLIB_Context_t * glibContext, uint8_t initial_x, uin
231
232
}
232
233
}
233
234
234
- void ThermostatUI ::DrawSetPoint (GLIB_Context_t * glibContext, int8_t setPoint, bool secondLine)
235
+ void RefrigeratorUI ::DrawSetPoint (GLIB_Context_t * glibContext, int8_t setPoint, bool secondLine)
235
236
{
236
237
char setPointLine[] = { ' -' , ' X' , ' X' , ' \0 ' };
237
238
@@ -241,7 +242,7 @@ void ThermostatUI::DrawSetPoint(GLIB_Context_t * glibContext, int8_t setPoint, b
241
242
}
242
243
243
244
// Update SetPoint string
244
- if (static_cast <ThermostatUI::HVACMode >(mMode ) == ThermostatUI::HVACMode::MODE_OFF )
245
+ if (static_cast <RefrigeratorUI::SUPPORTED_MODES >(mMode ) == RefrigeratorUI::SUPPORTED_MODES::ENERGY_SAVE )
245
246
{
246
247
setPointLine[0 ] = ' -' ;
247
248
setPointLine[1 ] = ' -' ;
0 commit comments