From 59e00e879c583e17f32afae55cc92340053e1c9f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Jul 2024 16:38:37 +0700 Subject: [PATCH] Add support more Arduino boards for OTA firmware update --- src/core/Updater/UpdaterArduino.cpp | 4 +++- src/core/Updater/UpdaterArduino.h | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/Updater/UpdaterArduino.cpp b/src/core/Updater/UpdaterArduino.cpp index c828590..8d48645 100644 --- a/src/core/Updater/UpdaterArduino.cpp +++ b/src/core/Updater/UpdaterArduino.cpp @@ -1,6 +1,6 @@ /** * Created July 1, 2024 - * + * * The MIT License (MIT) * Copyright (c) 2024 K. Suwatchai (Mobizt) * @@ -77,6 +77,8 @@ void UpdaterArduino::apply() #endif } +#if defined(FIREBASE_UPDATER_INTERNAL_STORAGE) UpdaterArduino Update; +#endif #endif \ No newline at end of file diff --git a/src/core/Updater/UpdaterArduino.h b/src/core/Updater/UpdaterArduino.h index 30e64d8..079dd0e 100644 --- a/src/core/Updater/UpdaterArduino.h +++ b/src/core/Updater/UpdaterArduino.h @@ -1,6 +1,6 @@ /** * Created July 1, 2024 - * + * * The MIT License (MIT) * Copyright (c) 2024 K. Suwatchai (Mobizt) * @@ -29,7 +29,6 @@ #include #include "./Config.h" - class UpdaterArduino { @@ -41,12 +40,13 @@ class UpdaterArduino size_t write(uint8_t *data, size_t len); private: - size_t write(uint8_t b); void close(); void apply(); }; +#if defined(FIREBASE_UPDATER_INTERNAL_STORAGE) extern UpdaterArduino Update; +#endif #endif \ No newline at end of file