* Get display state. * * @param[in] topic Topic * @param[out] value Value * * @return If successful, it will return true otherwise false. */
| 287 | * @return If successful, it will return true otherwise false. |
| 288 | */ |
| 289 | static bool getDisplayState(const String& topic, JsonObject& value) |
| 290 | { |
| 291 | DisplayMgr& displayMgr = DisplayMgr::getInstance(); |
| 292 | bool isDisplayOn = displayMgr.isDisplayOn(); |
| 293 | |
| 294 | UTIL_NOT_USED(topic); |
| 295 | |
| 296 | if (false == isDisplayOn) |
| 297 | { |
| 298 | value["state"] = "off"; |
| 299 | } |
| 300 | else |
| 301 | { |
| 302 | value["state"] = "on"; |
| 303 | } |
| 304 | |
| 305 | return true; |
| 306 | } |
| 307 | |
| 308 | /** |
| 309 | * Has the display state changed? |
nothing calls this directly
no test coverage detected