New logging and more (#446)
- `TT_LOG_*` macros are replaced by `Logger` via `#include<Tactility/Logger.h>` - Changed default timezone to Europe/Amsterdam - Fix for logic bug in unPhone hardware - Fix for init/deinit in DRV2605 driver - Other fixes - Removed optimization that broke unPhone (disabled the moving of heap-related functions to flash)
This commit is contained in:
committed by
GitHub
parent
719f7bcece
commit
f620255c41
@@ -6,15 +6,16 @@
|
||||
#include <Tactility/app/AppContext.h>
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/app/alertdialog/AlertDialog.h>
|
||||
#include <Tactility/Logger.h>
|
||||
#include <Tactility/LogMessages.h>
|
||||
#include <Tactility/lvgl/Style.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/TactilityCore.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
namespace tt::app::wifiapsettings {
|
||||
|
||||
constexpr auto* TAG = "WifiApSettings";
|
||||
static const auto LOGGER = Logger("WifiApSettings");
|
||||
|
||||
extern const AppManifest manifest;
|
||||
|
||||
@@ -50,10 +51,10 @@ class WifiApSettings : public App {
|
||||
if (service::wifi::settings::load(self->ssid.c_str(), settings)) {
|
||||
settings.autoConnect = is_on;
|
||||
if (!service::wifi::settings::save(settings)) {
|
||||
TT_LOG_E(TAG, "Failed to save settings");
|
||||
LOGGER.error("Failed to save settings");
|
||||
}
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Failed to load settings");
|
||||
LOGGER.error("Failed to load settings");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +90,7 @@ class WifiApSettings : public App {
|
||||
updateViews();
|
||||
lvgl::unlock();
|
||||
} else {
|
||||
TT_LOG_E(TAG, LOG_MESSAGE_MUTEX_LOCK_FAILED_FMT, "LVGL");
|
||||
LOGGER.error(LOG_MESSAGE_MUTEX_LOCK_FAILED_FMT, "LVGL");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,7 +193,7 @@ public:
|
||||
lv_obj_remove_state(auto_connect_switch, LV_STATE_CHECKED);
|
||||
}
|
||||
} else {
|
||||
TT_LOG_W(TAG, "No settings found");
|
||||
LOGGER.warn("No settings found");
|
||||
lv_obj_add_flag(forget_button, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(auto_connect_wrapper, LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
@@ -223,11 +224,11 @@ public:
|
||||
|
||||
std::string ssid = parameters->getString("ssid");
|
||||
if (!service::wifi::settings::remove(ssid.c_str())) {
|
||||
TT_LOG_E(TAG, "Failed to remove SSID");
|
||||
LOGGER.error("Failed to remove SSID");
|
||||
return;
|
||||
}
|
||||
|
||||
TT_LOG_I(TAG, "Removed SSID");
|
||||
LOGGER.info("Removed SSID");
|
||||
if (
|
||||
service::wifi::getRadioState() == service::wifi::RadioState::ConnectionActive &&
|
||||
service::wifi::getConnectionTarget() == ssid
|
||||
|
||||
Reference in New Issue
Block a user