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
@@ -4,21 +4,21 @@
|
||||
|
||||
#ifdef CONFIG_ESP_WIFI_ENABLED
|
||||
|
||||
#include "Tactility/service/espnow/EspNow.h"
|
||||
#include "Tactility/service/espnow/EspNowService.h"
|
||||
#include <Tactility/service/espnow/EspNow.h>
|
||||
#include <Tactility/service/espnow/EspNowService.h>
|
||||
|
||||
#include <Tactility/Log.h>
|
||||
#include <Tactility/Logger.h>
|
||||
|
||||
namespace tt::service::espnow {
|
||||
|
||||
constexpr const char* TAG = "EspNow";
|
||||
static const auto LOGGER = Logger("EspNow");
|
||||
|
||||
void enable(const EspNowConfig& config) {
|
||||
auto service = findService();
|
||||
if (service != nullptr) {
|
||||
service->enable(config);
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Service not found");
|
||||
LOGGER.error("Service not found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ void disable() {
|
||||
if (service != nullptr) {
|
||||
service->disable();
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Service not found");
|
||||
LOGGER.error("Service not found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ bool addPeer(const esp_now_peer_info_t& peer) {
|
||||
if (service != nullptr) {
|
||||
return service->addPeer(peer);
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Service not found");
|
||||
LOGGER.error("Service not found");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ bool send(const uint8_t* address, const uint8_t* buffer, size_t bufferLength) {
|
||||
if (service != nullptr) {
|
||||
return service->send(address, buffer, bufferLength);
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Service not found");
|
||||
LOGGER.error("Service not found");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ ReceiverSubscription subscribeReceiver(std::function<void(const esp_now_recv_inf
|
||||
if (service != nullptr) {
|
||||
return service->subscribeReceiver(onReceive);
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Service not found");
|
||||
LOGGER.error("Service not found");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ void unsubscribeReceiver(ReceiverSubscription subscription) {
|
||||
if (service != nullptr) {
|
||||
service->unsubscribeReceiver(subscription);
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Service not found");
|
||||
LOGGER.error("Service not found");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user