/* Get the right error page to display. 
Error has precedence over dump.  */
static ScreenFactory::Creator get_error_screen()
/* Get the right error page to display. 
Error has precedence over dump.  */
static ScreenFactory::Creator get_error_screen()
{
        return ScreenFactory::Screen<ScreenErrorQR>;
    }
    if (crash_dump::dump_is_valid() && !crash_dump::dump_is_displayed()) {
        if (crash_dump::message_is_displayed()) {
            return ScreenFactory::Screen<ScreenHardfault>;
        }
        switch (crash_dump::message_get_type()) {
        case crash_dump::MsgType::IWDGW:
            return ScreenFactory::Screen<ScreenWatchdog>;
        case crash_dump::MsgType::BSOD:
            return ScreenFactory::Screen<ScreenBsod>;
        case crash_dump::MsgType::STACK_OVF:
            return ScreenFactory::Screen<ScreenStackOverflow>;
        default:
            break;
        }
    }
    return ScreenFactory::Screen<ScreenBlueError>;
}