| 1212 | bool universe2_complete = false; |
| 1213 | |
| 1214 | void DisplayManager_::tick() |
| 1215 | { |
| 1216 | if (GAME_ACTIVE) |
| 1217 | { |
| 1218 | GameManager.tick(); |
| 1219 | matrix->show(); |
| 1220 | memcpy(ledsCopy, leds, sizeof(leds)); |
| 1221 | } |
| 1222 | else if (AP_MODE) |
| 1223 | { |
| 1224 | HSVtext(2, 6, "AP MODE", true, 1); |
| 1225 | } |
| 1226 | else if (ARTNET_MODE) |
| 1227 | { |
| 1228 | // handled by the DMXFrame callback |
| 1229 | } |
| 1230 | else if (MOODLIGHT_MODE) |
| 1231 | { |
| 1232 | // handled by the moodlight function |
| 1233 | } |
| 1234 | else |
| 1235 | { |
| 1236 | ui->update(); |
| 1237 | if (ui->getUiState()->appState == IN_TRANSITION && !appIsSwitching) |
| 1238 | { |
| 1239 | appIsSwitching = true; |
| 1240 | } |
| 1241 | else if (ui->getUiState()->appState == FIXED && appIsSwitching) |
| 1242 | { |
| 1243 | |
| 1244 | appIsSwitching = false; |
| 1245 | MQTTManager.setCurrentApp(CURRENT_APP); |
| 1246 | setAppTime(TIME_PER_APP); |
| 1247 | checkLifetime(ui->getnextAppNumber()); |
| 1248 | ResetCustomApps(); |
| 1249 | } |
| 1250 | } |
| 1251 | |
| 1252 | if (!AP_MODE) |
| 1253 | { |
| 1254 | uint16_t ArtnetStatus = artnet.read(); |
| 1255 | if (ArtnetStatus > 0) |
| 1256 | { |
| 1257 | lastArtnetStatusTime = millis(); |
| 1258 | ARTNET_MODE = true; |
| 1259 | } |
| 1260 | else if (millis() - lastArtnetStatusTime > 1000) |
| 1261 | { |
| 1262 | ARTNET_MODE = false; |
| 1263 | } |
| 1264 | } |
| 1265 | |
| 1266 | if (NEWYEAR) |
| 1267 | DisplayManager.checkNewYear(); |
| 1268 | } |
| 1269 | |
| 1270 | bool newYearEventTriggered = false; |
| 1271 |
nothing calls this directly
no test coverage detected