Fixed spelling
This commit is contained in:
@@ -16,7 +16,7 @@ public:
|
|||||||
void triggered() override
|
void triggered() override
|
||||||
{
|
{
|
||||||
if (auto result = configs.write_config(configs.ledstrip.animationType, type); !result)
|
if (auto result = configs.write_config(configs.ledstrip.animationType, type); !result)
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// local includes
|
// local includes
|
||||||
#include "displays/bobbypopupdisplay.h"
|
#include "displays/bobbypopupdisplay.h"
|
||||||
|
|
||||||
void BobbyErrorHandler::errorOccured(std::string &&error)
|
void BobbyErrorHandler::errorOccurred(std::string &&error)
|
||||||
{
|
{
|
||||||
auto newDisplay = std::make_unique<BobbyPopupDisplay>(std::move(error), std::move(espgui::currentDisplay));
|
auto newDisplay = std::make_unique<BobbyPopupDisplay>(std::move(error), std::move(espgui::currentDisplay));
|
||||||
newDisplay->initOverlay();
|
newDisplay->initOverlay();
|
||||||
|
@@ -5,5 +5,5 @@
|
|||||||
|
|
||||||
struct BobbyErrorHandler : public virtual espgui::ErrorHandlerInterface
|
struct BobbyErrorHandler : public virtual espgui::ErrorHandlerInterface
|
||||||
{
|
{
|
||||||
void errorOccured(std::string &&error) override;
|
void errorOccurred(std::string &&error) override;
|
||||||
};
|
};
|
||||||
|
@@ -56,7 +56,7 @@ void ButtonCalibrateDisplay::update()
|
|||||||
|
|
||||||
if (auto result = configs.write_config(configs.dpadMappingLeft, m_leftButton); !result)
|
if (auto result = configs.write_config(configs.dpadMappingLeft, m_leftButton); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -66,7 +66,7 @@ void ButtonCalibrateDisplay::update()
|
|||||||
|
|
||||||
if (auto result = configs.write_config(configs.dpadMappingRight, m_rightButton); !result)
|
if (auto result = configs.write_config(configs.dpadMappingRight, m_rightButton); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -75,7 +75,7 @@ void ButtonCalibrateDisplay::update()
|
|||||||
}
|
}
|
||||||
if (auto result = configs.write_config(configs.dpadMappingUp, m_upButton); !result)
|
if (auto result = configs.write_config(configs.dpadMappingUp, m_upButton); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -84,7 +84,7 @@ void ButtonCalibrateDisplay::update()
|
|||||||
}
|
}
|
||||||
if (auto result = configs.write_config(configs.dpadMappingDown, m_downButton); !result)
|
if (auto result = configs.write_config(configs.dpadMappingDown, m_downButton); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -182,7 +182,7 @@ public:
|
|||||||
{
|
{
|
||||||
const auto result = twai_initiate_recovery();
|
const auto result = twai_initiate_recovery();
|
||||||
ESP_LOGI(TAG, "twai_initiate_recovery() returned %s", esp_err_to_name(result));
|
ESP_LOGI(TAG, "twai_initiate_recovery() returned %s", esp_err_to_name(result));
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("twai_initiate_recovery() returned {}", esp_err_to_name(result)));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("twai_initiate_recovery() returned {}", esp_err_to_name(result)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ public:
|
|||||||
{
|
{
|
||||||
const auto result = twai_stop();
|
const auto result = twai_stop();
|
||||||
ESP_LOGI(TAG, "twai_stop() returned %s", esp_err_to_name(result));
|
ESP_LOGI(TAG, "twai_stop() returned %s", esp_err_to_name(result));
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("twai_stop() returned {}", esp_err_to_name(result)));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("twai_stop() returned {}", esp_err_to_name(result)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ public:
|
|||||||
{
|
{
|
||||||
const auto result = twai_start();
|
const auto result = twai_start();
|
||||||
ESP_LOGI(TAG, "twai_start() returned %s", esp_err_to_name(result));
|
ESP_LOGI(TAG, "twai_start() returned %s", esp_err_to_name(result));
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("twai_start() returned {}", esp_err_to_name(result)));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("twai_start() returned {}", esp_err_to_name(result)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ public:
|
|||||||
{
|
{
|
||||||
const auto result = twai_driver_uninstall();
|
const auto result = twai_driver_uninstall();
|
||||||
ESP_LOGI(TAG, "twai_driver_uninstall() returned %s", esp_err_to_name(result));
|
ESP_LOGI(TAG, "twai_driver_uninstall() returned %s", esp_err_to_name(result));
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("twai_driver_uninstall() returned {}", esp_err_to_name(result)));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("twai_driver_uninstall() returned {}", esp_err_to_name(result)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ public:
|
|||||||
|
|
||||||
const auto result = twai_driver_install(&g_config, &t_config, &f_config);
|
const auto result = twai_driver_install(&g_config, &t_config, &f_config);
|
||||||
ESP_LOGI(TAG, "twai_driver_install() returned %s", esp_err_to_name(result));
|
ESP_LOGI(TAG, "twai_driver_install() returned %s", esp_err_to_name(result));
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("twai_driver_install() returned {}", esp_err_to_name(result)));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("twai_driver_install() returned {}", esp_err_to_name(result)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@@ -101,7 +101,7 @@ class OpenPopupAction : public virtual espgui::ActionInterface
|
|||||||
public:
|
public:
|
||||||
void triggered() override
|
void triggered() override
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured("Das\nist\nein sehr langer text, der nicht in eine zeile passt");
|
BobbyErrorHandler{}.errorOccurred("Das\nist\nein sehr langer text, der nicht in eine zeile passt");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@@ -129,84 +129,84 @@ void ExtraButtonCalibrateMenu::rawButtonPressed(uint8_t button)
|
|||||||
case WaitingUp2:
|
case WaitingUp2:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingUp2, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingUp2, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingDown2:
|
case WaitingDown2:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingDown2, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingDown2, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingLeft2:
|
case WaitingLeft2:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingLeft2, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingLeft2, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingRight2:
|
case WaitingRight2:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingRight2, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingRight2, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingProfile0:
|
case WaitingProfile0:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingProfile0, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingProfile0, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingProfile1:
|
case WaitingProfile1:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingProfile1, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingProfile1, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingProfile2:
|
case WaitingProfile2:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingProfile2, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingProfile2, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingProfile3:
|
case WaitingProfile3:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingProfile3, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingProfile3, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingExtra1:
|
case WaitingExtra1:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingExtra1, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingExtra1, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingExtra2:
|
case WaitingExtra2:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingExtra2, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingExtra2, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingExtra3:
|
case WaitingExtra3:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingExtra3, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingExtra3, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WaitingExtra4:
|
case WaitingExtra4:
|
||||||
if (auto result = configs.write_config(configs.dpadMappingExtra4, button); !result)
|
if (auto result = configs.write_config(configs.dpadMappingExtra4, button); !result)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -29,7 +29,7 @@ void exitFeatureFlagsMenu()
|
|||||||
espgui::popScreen();
|
espgui::popScreen();
|
||||||
if (isDirty)
|
if (isDirty)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(TEXT_POPUP);
|
BobbyErrorHandler{}.errorOccurred(TEXT_POPUP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ public:
|
|||||||
void triggered() override
|
void triggered() override
|
||||||
{
|
{
|
||||||
if (auto result = m_flag.isEnabled.write(configs.nvs_handle_user, !m_flag.isEnabled.value()); !result)
|
if (auto result = m_flag.isEnabled.write(configs.nvs_handle_user, !m_flag.isEnabled.value()); !result)
|
||||||
errorOccured(std::move(result).error());
|
errorOccurred(std::move(result).error());
|
||||||
else
|
else
|
||||||
isDirty = true;
|
isDirty = true;
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@ namespace {
|
|||||||
public:
|
public:
|
||||||
void triggered() override
|
void triggered() override
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(TEXT_GIT_MESSAGE);
|
BobbyErrorHandler{}.errorOccurred(TEXT_GIT_MESSAGE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
|
|
||||||
if (!settingsPersister.openProfile(m_profileIndex)) // just switch nvs namespace
|
if (!settingsPersister.openProfile(m_profileIndex)) // just switch nvs namespace
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("openProfile({}) failed", m_profileIndex));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("openProfile({}) failed", m_profileIndex));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
saveProfileSettings();
|
saveProfileSettings();
|
||||||
@@ -60,7 +60,9 @@ public:
|
|||||||
}
|
}
|
||||||
else if (m_menu.m_firstIndex != -1 && m_menu.m_firstIndex != m_profileIndex)
|
else if (m_menu.m_firstIndex != -1 && m_menu.m_firstIndex != m_profileIndex)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("Press CONFIRM to COPY from Profile {} to Profile {}", m_menu.m_firstIndex, m_profileIndex));
|
BobbyErrorHandler{}.errorOccurred(
|
||||||
|
fmt::format("Press CONFIRM to COPY from Profile {} to Profile {}", m_menu.m_firstIndex,
|
||||||
|
m_profileIndex));
|
||||||
m_mode = CONFIRM_COPY;
|
m_mode = CONFIRM_COPY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,7 +102,9 @@ public:
|
|||||||
}
|
}
|
||||||
else if (m_menu.m_firstIndex != -1 && m_menu.m_firstIndex != m_profileIndex)
|
else if (m_menu.m_firstIndex != -1 && m_menu.m_firstIndex != m_profileIndex)
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("Press CONFIRM to SWAP Profile {} with Profile {}", m_menu.m_firstIndex, m_profileIndex));
|
BobbyErrorHandler{}.errorOccurred(
|
||||||
|
fmt::format("Press CONFIRM to SWAP Profile {} with Profile {}", m_menu.m_firstIndex,
|
||||||
|
m_profileIndex));
|
||||||
m_mode = CONFIRM_SWAP;
|
m_mode = CONFIRM_SWAP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,7 +129,7 @@ public:
|
|||||||
{
|
{
|
||||||
m_menu.lock();
|
m_menu.lock();
|
||||||
m_mode = CONFIRM_CLEAR;
|
m_mode = CONFIRM_CLEAR;
|
||||||
BobbyErrorHandler{}.errorOccured("Press CONFIRM to reset Profile or BACK to cancel.");
|
BobbyErrorHandler{}.errorOccurred("Press CONFIRM to reset Profile or BACK to cancel.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -128,7 +128,7 @@ void SelectBuildserverBranchMenu::update()
|
|||||||
check_descriptor_request();
|
check_descriptor_request();
|
||||||
if (!request_failed.empty())
|
if (!request_failed.empty())
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("Error: {}", request_failed));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("Error: {}", request_failed));
|
||||||
request_failed = {};
|
request_failed = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -111,7 +111,7 @@ void SelectBuildMenu::update()
|
|||||||
check_descriptor_request();
|
check_descriptor_request();
|
||||||
if (!request_failed.empty())
|
if (!request_failed.empty())
|
||||||
{
|
{
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("Error: {}", request_failed));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("Error: {}", request_failed));
|
||||||
request_failed = {};
|
request_failed = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
void triggered() override
|
void triggered() override
|
||||||
{
|
{
|
||||||
if (auto result = m_config->write(configs.nvs_handle_user, m_value); !result)
|
if (auto result = m_config->write(configs.nvs_handle_user, m_value); !result)
|
||||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
BobbyErrorHandler{}.errorOccurred(std::move(result).error());
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
const TEnum m_value;
|
const TEnum m_value;
|
||||||
|
@@ -81,7 +81,7 @@ public:
|
|||||||
else if (!m_result && !m_result.error().empty())
|
else if (!m_result && !m_result.error().empty())
|
||||||
{
|
{
|
||||||
tft.setTextColor(TFT_RED, TFT_BLACK);
|
tft.setTextColor(TFT_RED, TFT_BLACK);
|
||||||
BobbyErrorHandler{}.errorOccured(fmt::format("Error: {}", m_result.error()));
|
BobbyErrorHandler{}.errorOccurred(fmt::format("Error: {}", m_result.error()));
|
||||||
m_result.error().clear();
|
m_result.error().clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user