aboutsummaryrefslogtreecommitdiffhomepage
path: root/source/Core/Threads/OperatingModes/utils/ShowWarning.cpp
blob: 3a33d4155982bd17f347431e131ca8705ad34021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "Buttons.hpp"
#include "OperatingModeUtilities.h"
#include "OperatingModes.h"
bool warnUser(const char *warning, const ButtonState buttons) {
  OLED::clearScreen();
  OLED::printWholeScreen(warning);
  // Also timeout after 5 seconds
  if ((xTaskGetTickCount() - lastButtonTime) > TICKS_SECOND * 5) {
    return true;
  }
  return buttons != BUTTON_NONE;
}