Files
bobbycar-boardcomputer-firm…/main/guihelpers/bobbyerrorhandler.cpp
T

20 lines
586 B
C++
Raw Normal View History

2022-12-25 03:22:28 +01:00
#include "bobbyerrorhandler.h"
// 3rdparty lib includes
#include <screenmanager.h>
#include <tftinterface.h>
// local includes
#include "guihelpers/bobbypopupdisplay.h"
namespace bobby {
void BobbyErrorHandler::errorOccurred(std::string &&error)
{
espgui::changeScreenCallback = [error_ = std::move(error)](espgui::TftInterface &tft){
auto newDisplay = std::make_unique<BobbyPopupDisplay>(std::string{error_}, std::move(espgui::currentDisplay));
newDisplay->initOverlay(tft);
espgui::currentDisplay = std::move(newDisplay);
};
}
} // namespace bobby