MCPcopy Create free account
hub / github.com/Blueforcer/awtrix3 / tick

Method tick

src/DisplayManager.cpp:1214–1268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1212bool universe2_complete = false;
1213
1214void 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
1270bool newYearEventTriggered = false;
1271

Callers

nothing calls this directly

Calls 9

checkLifetimeFunction · 0.85
ResetCustomAppsFunction · 0.85
showMethod · 0.80
updateMethod · 0.80
getUiStateMethod · 0.80
setCurrentAppMethod · 0.80
getnextAppNumberMethod · 0.80
readMethod · 0.80
checkNewYearMethod · 0.80

Tested by

no test coverage detected