From 9ec8d56e2b3d848d55b510e2d3efdb6c2ae24fe1 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Thu, 15 Sep 2022 14:56:17 -0400 Subject: [PATCH] port.h: remove duplicate, GetConfiguratiuonSize() returns size_t (#152) Co-authored-by: Andrey Gusakov --- firmware/boards/f1_dual/port.cpp | 2 +- firmware/boards/f1_rev2/port.cpp | 2 +- firmware/boards/f1_rev3/port.cpp | 2 +- firmware/boards/port.h | 6 ++---- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/firmware/boards/f1_dual/port.cpp b/firmware/boards/f1_dual/port.cpp index b03df49..1857eaa 100644 --- a/firmware/boards/f1_dual/port.cpp +++ b/firmware/boards/f1_dual/port.cpp @@ -138,7 +138,7 @@ uint8_t *GetConfiguratiuonPtr() return (uint8_t *)&config; } -int GetConfiguratiuonSize() +size_t GetConfiguratiuonSize() { return sizeof(config); } diff --git a/firmware/boards/f1_rev2/port.cpp b/firmware/boards/f1_rev2/port.cpp index a1ae882..d5fd4a9 100644 --- a/firmware/boards/f1_rev2/port.cpp +++ b/firmware/boards/f1_rev2/port.cpp @@ -102,7 +102,7 @@ uint8_t *GetConfiguratiuonPtr() return (uint8_t *)&config; } -int GetConfiguratiuonSize() +size_t GetConfiguratiuonSize() { return sizeof(config); } diff --git a/firmware/boards/f1_rev3/port.cpp b/firmware/boards/f1_rev3/port.cpp index c47c7fc..a3f47e3 100644 --- a/firmware/boards/f1_rev3/port.cpp +++ b/firmware/boards/f1_rev3/port.cpp @@ -129,7 +129,7 @@ uint8_t *GetConfiguratiuonPtr() return (uint8_t *)&config; } -int GetConfiguratiuonSize() +size_t GetConfiguratiuonSize() { return sizeof(config); } diff --git a/firmware/boards/port.h b/firmware/boards/port.h index afcbdec..05f2069 100644 --- a/firmware/boards/port.h +++ b/firmware/boards/port.h @@ -39,12 +39,10 @@ public: }; Configuration GetConfiguration(); -uint8_t *GetConfiguratiuonPtr(); -int GetConfiguratiuonSize(); void SetConfiguration(const Configuration& newConfig); /* TS stuff */ -void SaveConfiguration(); uint8_t *GetConfiguratiuonPtr(); -int GetConfiguratiuonSize(); +size_t GetConfiguratiuonSize(); +void SaveConfiguration(); const char *getTsSignature();