Skip to content

Commit 42f0f2f

Browse files
authored
Remove property OTA_STORAGE_TYPE since it's non-relevant for the cloud to know the underlying storage type (#154)
1 parent cdf9714 commit 42f0f2f

File tree

5 files changed

+0
-14
lines changed

5 files changed

+0
-14
lines changed

Diff for: src/ArduinoIoTCloudTCP.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ ArduinoIoTCloudTCP::ArduinoIoTCloudTCP()
8181
, _dataTopicIn("")
8282
, _ota_topic_in{""}
8383
#if OTA_ENABLED
84-
, _ota_storage_type{static_cast<int>(OTAStorage::Type::NotAvailable)}
8584
, _ota_error{static_cast<int>(OTAError::None)}
8685
#endif /* OTA_ENABLED */
8786
{
@@ -203,8 +202,6 @@ void ArduinoIoTCloudTCP::printDebugInfo()
203202
#if OTA_ENABLED
204203
void ArduinoIoTCloudTCP::setOTAStorage(OTAStorage & ota_storage)
205204
{
206-
_ota_storage_type = static_cast<int>(ota_storage.type());
207-
addPropertyReal(_ota_storage_type, "OTA_STORAGE_TYPE", Permission::Read);
208205
addPropertyReal(_ota_error, "OTA_ERROR", Permission::Read);
209206
_ota_logic.setOTAStorage(ota_storage);
210207
}

Diff for: src/ArduinoIoTCloudTCP.h

-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
129129

130130
#if OTA_ENABLED
131131
OTALogic _ota_logic;
132-
int _ota_storage_type;
133132
int _ota_error;
134133
#endif /* OTA_ENABLED */
135134

Diff for: src/utility/ota/OTAStorage.h

-8
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ class OTAStorage
3737
virtual ~OTAStorage() { }
3838

3939

40-
enum class Type : int
41-
{
42-
NotAvailable = -1,
43-
MKRMEM = 0,
44-
MKRGSMFile = 2,
45-
};
46-
47-
virtual Type type () = 0;
4840
virtual bool init () = 0;
4941
virtual bool open (char const * file_name) = 0;
5042
virtual size_t write (uint8_t const * const buf, size_t const num_bytes) = 0;

Diff for: src/utility/ota/OTAStorage_MKRGSM.h

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class OTAStorage_MKRGSM : public OTAStorage
4040
virtual ~OTAStorage_MKRGSM() { }
4141

4242

43-
virtual Type type () override { return Type::MKRGSMFile; }
4443
virtual bool init () override;
4544
virtual bool open (char const * file_name) override;
4645
virtual size_t write (uint8_t const * const buf, size_t const num_bytes) override;

Diff for: src/utility/ota/OTAStorage_MKRMEM.h

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class OTAStorage_MKRMEM : public OTAStorage
4141
virtual ~OTAStorage_MKRMEM() { }
4242

4343

44-
virtual Type type () override { return Type::MKRMEM; }
4544
virtual bool init () override;
4645
virtual bool open (char const * file_name) override;
4746
virtual size_t write (uint8_t const * const buf, size_t const num_bytes) override;

0 commit comments

Comments
 (0)