Add APP_VERSION_AT_LEAST() macro for cleaner GFE version checks

This commit is contained in:
Cameron Gutman
2021-04-09 07:26:24 -05:00
parent b528867466
commit a51cc972d3
3 changed files with 10 additions and 9 deletions

View File

@@ -208,9 +208,7 @@ int initializeControlStream(void) {
intervalStartTimeMs = 0;
lastIntervalLossPercentage = 0;
lastConnectionStatusUpdate = CONN_STATUS_OKAY;
usePeriodicPing = (AppVersionQuad[0] > 7) ||
(AppVersionQuad[0] == 7 && AppVersionQuad[1] > 1) ||
(AppVersionQuad[0] == 7 && AppVersionQuad[1] == 1 && AppVersionQuad[2] >= 415);
usePeriodicPing = APP_VERSION_AT_LEAST(7, 1, 415);
return 0;
}