summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mts/MTS_IO_QuectelRadio.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h
index 41c89dc..58e3d25 100644
--- a/include/mts/MTS_IO_QuectelRadio.h
+++ b/include/mts/MTS_IO_QuectelRadio.h
@@ -82,8 +82,18 @@ namespace MTS {
static uint16_t getQuectelChecksum(const void* data, size_t nBytes);
static inline void updateQuectelChecksum(uint16_t& iChecksum, uint16_t iNewFragment);
static inline uint16_t bytesToUint16(uint8_t high, uint8_t low);
+
CODE fumoWaitUpgradeFinished(UpdateCb& stepCb);
CODE fumoWaitNewFirmware(UpdateCb& stepCb);
+
+ /// Get value from container by its index, use default value if not found. Non-template version.
+ const std::string& getByIndex(const std::vector<std::string>& vector, size_t index, const std::string& defaultValue) {
+ if (index >= vector.size()) {
+ return defaultValue;
+ } else {
+ return vector[index];
+ }
+ }
};
}
}