diff --git a/src/config/Config.cpp b/src/config/Config.cpp index d15dc6ad..019e5768 100644 --- a/src/config/Config.cpp +++ b/src/config/Config.cpp @@ -411,7 +411,7 @@ bool Config::SetEStopConfigGpioPin(gpio_num_t gpioPin) { CONFIG_LOCK_WRITE(false); if (!OpenShock::IsValidInputPin(gpioPin)) { - ESP_LOGE(TAG, "Invalid EStop GPIO Pin: %d", gpioPin); + OS_LOGE(TAG, "Invalid EStop GPIO Pin: %d", gpioPin); return false; } diff --git a/src/config/EStopConfig.cpp b/src/config/EStopConfig.cpp index 37b8a6cc..76eba833 100644 --- a/src/config/EStopConfig.cpp +++ b/src/config/EStopConfig.cpp @@ -20,7 +20,7 @@ void EStopConfig::ToDefault() { bool EStopConfig::FromFlatbuffers(const Serialization::Configuration::EStopConfig* config) { if (config == nullptr) { - ESP_LOGE(TAG, "config is null"); + OS_LOGE(TAG, "config is null"); return false; } @@ -29,7 +29,7 @@ bool EStopConfig::FromFlatbuffers(const Serialization::Configuration::EStopConfi uint8_t val = config->gpio_pin(); if (!OpenShock::IsValidInputPin(val)) { - ESP_LOGE(TAG, "Invalid EStop pin: %d", val); + OS_LOGE(TAG, "Invalid EStop pin: %d", val); return false; } @@ -44,28 +44,28 @@ flatbuffers::Offset EStopC bool EStopConfig::FromJSON(const cJSON* json) { if (json == nullptr) { - ESP_LOGE(TAG, "json is null"); + OS_LOGE(TAG, "json is null"); return false; } if (cJSON_IsObject(json) == 0) { - ESP_LOGE(TAG, "json is not an object"); + OS_LOGE(TAG, "json is not an object"); return false; } if (!Internal::Utils::FromJsonBool(enabled, json, "enabled", false)) { - ESP_LOGE(TAG, "Failed to parse enabled"); + OS_LOGE(TAG, "Failed to parse enabled"); return false; } uint8_t val; if (!Internal::Utils::FromJsonU8(val, json, "gpioPin", OPENSHOCK_ESTOP_PIN)) { - ESP_LOGE(TAG, "Failed to parse gpioPin"); + OS_LOGE(TAG, "Failed to parse gpioPin"); return false; } if (!OpenShock::IsValidInputPin(val)) { - ESP_LOGE(TAG, "Invalid EStop pin: %d", val); + OS_LOGE(TAG, "Invalid EStop pin: %d", val); return false; } diff --git a/src/config/RootConfig.cpp b/src/config/RootConfig.cpp index bdf30b25..bfabdd29 100644 --- a/src/config/RootConfig.cpp +++ b/src/config/RootConfig.cpp @@ -28,7 +28,7 @@ bool RootConfig::FromFlatbuffers(const Serialization::Configuration::HubConfig* } if (!estop.FromFlatbuffers(config->estop())) { - ESP_LOGE(TAG, "Unable to load estop config"); + OS_LOGE(TAG, "Unable to load estop config"); return false; } @@ -89,7 +89,7 @@ bool RootConfig::FromJSON(const cJSON* json) { } if (!estop.FromJSON(cJSON_GetObjectItemCaseSensitive(json, "estop"))) { - ESP_LOGE(TAG, "Unable to load estop config"); + OS_LOGE(TAG, "Unable to load estop config"); return false; } diff --git a/src/event_handlers/websocket/local/SetEStopPinCommand.cpp b/src/event_handlers/websocket/local/SetEStopPinCommand.cpp index 95180e22..e364ff19 100644 --- a/src/event_handlers/websocket/local/SetEStopPinCommand.cpp +++ b/src/event_handlers/websocket/local/SetEStopPinCommand.cpp @@ -29,7 +29,7 @@ using namespace OpenShock::MessageHandlers::Local; void _Private::HandleSetEstopPinCommand(uint8_t socketId, const OpenShock::Serialization::Local::LocalToHubMessage* root) { auto msg = root->payload_as_SetEstopPinCommand(); if (msg == nullptr) { - ESP_LOGE(TAG, "Payload cannot be parsed as SetEstopPinCommand"); + OS_LOGE(TAG, "Payload cannot be parsed as SetEstopPinCommand"); return; }