From cc0b47d51d730785b2e9f9907c2b45a62dc36b69 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Wed, 13 Nov 2024 11:38:43 -0800 Subject: [PATCH 01/13] Update smartfin-fw3.ino --- src/smartfin-fw3.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smartfin-fw3.ino b/src/smartfin-fw3.ino index 79e53729..8577d007 100644 --- a/src/smartfin-fw3.ino +++ b/src/smartfin-fw3.ino @@ -56,7 +56,7 @@ static STATES_e currentState; static StateMachine_t* findState(STATES_e state); static void initalizeTaskObjects(void); void mainThread(void* args); -void printState(STATES_e state); +static void printState(STATES_e state); // setup() runs once, when the device is first turned on. void setup() { @@ -163,4 +163,4 @@ static void printState(STATES_e state) } pStateName = STATES_NAME_TAB[state]; SF_OSAL_printf("%s" __NL__, pStateName); -} \ No newline at end of file +} From 1ea0cc8a4fb4795d1d6840bc629c41659805b8cc Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Wed, 13 Nov 2024 12:06:06 -0800 Subject: [PATCH 02/13] fix: Adds cstdarg include --- src/cli/conio.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli/conio.hpp b/src/cli/conio.hpp index aae5f026..8bfc24fa 100644 --- a/src/cli/conio.hpp +++ b/src/cli/conio.hpp @@ -1,6 +1,7 @@ #ifndef __CONIO_HPP__ #define __CONIO_HPP__ +#include #include #define SF_OSAL_PRINTF_BUFLEN 1536 @@ -48,4 +49,4 @@ extern "C" } #endif -#endif \ No newline at end of file +#endif From d7cc478ce3d8346f8462ec7f65fdfcbd686303ea Mon Sep 17 00:00:00 2001 From: Iha Date: Wed, 13 Nov 2024 19:54:52 -0800 Subject: [PATCH 03/13] docs: added and fixed method and variable docs --- src/cli/conio.cpp | 2 +- src/cli/conio.hpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli/conio.cpp b/src/cli/conio.cpp index 2c94d2b9..92e009f1 100644 --- a/src/cli/conio.cpp +++ b/src/cli/conio.cpp @@ -2,7 +2,7 @@ * Project smartfin-fw3 * @file conio.hpp * Description: Particle serial input and output for command line use -* @author @emilybthorpe +* @author \@emilybthorpe * @date Jul 20 2023 */ diff --git a/src/cli/conio.hpp b/src/cli/conio.hpp index aae5f026..35c9033f 100644 --- a/src/cli/conio.hpp +++ b/src/cli/conio.hpp @@ -3,6 +3,10 @@ #include +/** + * @brief int length of character array SF_OSAL_printfBuffer + * + */ #define SF_OSAL_PRINTF_BUFLEN 1536 #ifdef __cplusplus @@ -41,6 +45,7 @@ extern "C" * @brief Gets user input lin * @param buffer buffer to write too * @param buflen length of buffer + * @return int value of user inputs in the buffer array excluding '\b' */ int getline(char* buffer, int buflen); From ab4b2fca37616703eba014c9d034c61051f35102 Mon Sep 17 00:00:00 2001 From: Iha Date: Thu, 14 Nov 2024 13:03:23 -0800 Subject: [PATCH 04/13] docs: changes to variable documentation --- src/cli/conio.cpp | 13 ++++++------- src/cli/conio.hpp | 3 ++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cli/conio.cpp b/src/cli/conio.cpp index 92e009f1..f50b054c 100644 --- a/src/cli/conio.cpp +++ b/src/cli/conio.cpp @@ -1,11 +1,10 @@ /** -* Project smartfin-fw3 -* @file conio.hpp -* Description: Particle serial input and output for command line use -* @author \@emilybthorpe -* @date Jul 20 2023 -*/ - + * Project smartfin-fw3 + * @file conio.hpp + * Description: Particle serial input and output for command line use + * @author Emily B. Thorpe + * @date Jul 20 2023 + */ #include "conio.hpp" diff --git a/src/cli/conio.hpp b/src/cli/conio.hpp index 35c9033f..0c26ebd9 100644 --- a/src/cli/conio.hpp +++ b/src/cli/conio.hpp @@ -45,7 +45,8 @@ extern "C" * @brief Gets user input lin * @param buffer buffer to write too * @param buflen length of buffer - * @return int value of user inputs in the buffer array excluding '\b' + * @return int value of user inputs in the buffer array until + * backspace clicked('\\b') */ int getline(char* buffer, int buflen); From ee945662148bf821dabdfe3fc71311e718f389c7 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 14 Nov 2024 14:14:30 -0800 Subject: [PATCH 05/13] fix: Switches to limits.h --- src/fileCLI/fileCLI.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fileCLI/fileCLI.hpp b/src/fileCLI/fileCLI.hpp index e40852d6..97592cc4 100644 --- a/src/fileCLI/fileCLI.hpp +++ b/src/fileCLI/fileCLI.hpp @@ -3,9 +3,9 @@ #include "Particle.h" -#include #include -#include +#include +#include #define FILE_CLI_INPUT_BUFFER_LEN 80 #define FILE_CLI_MAX_DIR_DEPTH 4 From d9d72eb1feaca20e17d71278eda2e841ed19e9ef Mon Sep 17 00:00:00 2001 From: mariawaseem <97696497+mariawaseem@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:56:16 -0800 Subject: [PATCH 06/13] doc: Added doc for CLI_debugMenu[] --- src/cli/cliDebug.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cli/cliDebug.cpp b/src/cli/cliDebug.cpp index 1b78b7e1..b6293624 100644 --- a/src/cli/cliDebug.cpp +++ b/src/cli/cliDebug.cpp @@ -32,7 +32,9 @@ #include "Particle.h" - +/** + * @brief Command line debugging menu + */ const Menu_t CLI_debugMenu[] = { {1, "Display Fault Log", &CLI_displayFLOG, MENU_CMD}, From f1e3d7e6661d89e4fa4c0f8fd3b705e7b3cdd796 Mon Sep 17 00:00:00 2001 From: Charlie Kushelevsky Date: Fri, 15 Nov 2024 08:37:37 -0800 Subject: [PATCH 07/13] chore: added docs for dataUpload class --- src/cellular/dataUpload.hpp | 42 +++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/src/cellular/dataUpload.hpp b/src/cellular/dataUpload.hpp index dac4bafc..e8b0cfef 100644 --- a/src/cellular/dataUpload.hpp +++ b/src/cellular/dataUpload.hpp @@ -36,17 +36,51 @@ */ #define DU_UPLOAD_MAX_REATTEMPTS 5 - -class DataUpload : public Task{ - public: +/** + * @class DataUpload + * @brief Handles the data upload task. + * + * This class implements the task methods and internal states + * required for data uploading. + */ +class DataUpload : public Task +{ +public: + /** + * @brief Initializes the data upload task. + */ void init(void); + + /** + * @brief Executes the data upload task logic. + * + * @return The next state after executing the task. + */ STATES_e run(void); + + /** + * @brief Cleans up resources and exits the task. + */ void exit(void); - private: +private: + //! Flag to indicate successful initialization. int initSuccess; + //! Tracks the last connection attempt time. system_tick_t lastConnectTime; + + /** + * @brief State to transition to upon task exit. + * + * @return The exit state. + */ STATES_e exitState(void); + + /** + * @brief Checks if data can be uploaded. + * + * @return The current state indicating upload readiness. + */ STATES_e can_upload(void); }; #endif \ No newline at end of file From 87474cc9469b048769b74ce0f7bee3ab8fc0630a Mon Sep 17 00:00:00 2001 From: Iha Date: Fri, 15 Nov 2024 10:09:30 -0800 Subject: [PATCH 08/13] docs: fixed function return tag --- src/cli/conio.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cli/conio.hpp b/src/cli/conio.hpp index 0c26ebd9..e982340a 100644 --- a/src/cli/conio.hpp +++ b/src/cli/conio.hpp @@ -45,8 +45,7 @@ extern "C" * @brief Gets user input lin * @param buffer buffer to write too * @param buflen length of buffer - * @return int value of user inputs in the buffer array until - * backspace clicked('\\b') + * @return length of the user input line */ int getline(char* buffer, int buflen); From aa265e30f94501ab7ac7c7df05cdb897d6cd5acf Mon Sep 17 00:00:00 2001 From: mariawaseem <97696497+mariawaseem@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:57:21 -0800 Subject: [PATCH 09/13] docs: fixed CLI_monitorTempSensor(void) doc --- src/cli/menuItems/debugCommands.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cli/menuItems/debugCommands.hpp b/src/cli/menuItems/debugCommands.hpp index 8dbca3f3..27d4a4c8 100644 --- a/src/cli/menuItems/debugCommands.hpp +++ b/src/cli/menuItems/debugCommands.hpp @@ -36,9 +36,8 @@ void CLI_testHasData(void); * @brief Delete all files */ void CLI_wipeFileSystem(void); -/* - * @brief Monitors temperature sensor - * +/** + * @brief Monitor temperature sensor */ void CLI_monitorTempSensor(void); /** From 76e0d9ae916a42a5c9df9cfcf1881cc1094cc0d0 Mon Sep 17 00:00:00 2001 From: charliekush Date: Fri, 22 Nov 2024 09:59:04 -0800 Subject: [PATCH 10/13] chore: added docs to ensembleTypes.hpp --- src/cellular/ensembleTypes.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cellular/ensembleTypes.hpp b/src/cellular/ensembleTypes.hpp index 85baf9ca..d2f5ed48 100644 --- a/src/cellular/ensembleTypes.hpp +++ b/src/cellular/ensembleTypes.hpp @@ -26,6 +26,9 @@ typedef enum EnsembleID_ }EnsembleID_e; #pragma pack(push, 1) +/** + * @brief struct to contain header info for an ensemble + */ typedef struct EnsembleHeader_ { unsigned int ensembleType : 4; From 8474cc960de4cdb8e7848197b6e57e0830a534aa Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 22 Nov 2024 18:37:56 +0000 Subject: [PATCH 11/13] chore(release): 3.3.3 [skip ci] ## [3.3.3](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.2...v3.3.3) (2024-11-22) ### Bug Fixes * Adds cstdarg include ([1ea0cc8](https://github.com/UCSD-E4E/smartfin-fw3/commit/1ea0cc8a4fb4795d1d6840bc629c41659805b8cc)) * Adds cstdarg include ([#124](https://github.com/UCSD-E4E/smartfin-fw3/issues/124)) ([ffd41d7](https://github.com/UCSD-E4E/smartfin-fw3/commit/ffd41d7ec059ed799ddd2ff8d225641ae0b47a5c)) * Switches to limits.h ([ee94566](https://github.com/UCSD-E4E/smartfin-fw3/commit/ee945662148bf821dabdfe3fc71311e718f389c7)) * Switches to limits.h ([#129](https://github.com/UCSD-E4E/smartfin-fw3/issues/129)) ([379bcae](https://github.com/UCSD-E4E/smartfin-fw3/commit/379bcae1a4cb84f044ee2d4f2685df5f4ec72817)) --- CHANGELOG.md | 10 ++++++++++ src/vers.hpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd298f8c..f03fd7a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [3.3.3](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.2...v3.3.3) (2024-11-22) + + +### Bug Fixes + +* Adds cstdarg include ([1ea0cc8](https://github.com/UCSD-E4E/smartfin-fw3/commit/1ea0cc8a4fb4795d1d6840bc629c41659805b8cc)) +* Adds cstdarg include ([#124](https://github.com/UCSD-E4E/smartfin-fw3/issues/124)) ([ffd41d7](https://github.com/UCSD-E4E/smartfin-fw3/commit/ffd41d7ec059ed799ddd2ff8d225641ae0b47a5c)) +* Switches to limits.h ([ee94566](https://github.com/UCSD-E4E/smartfin-fw3/commit/ee945662148bf821dabdfe3fc71311e718f389c7)) +* Switches to limits.h ([#129](https://github.com/UCSD-E4E/smartfin-fw3/issues/129)) ([379bcae](https://github.com/UCSD-E4E/smartfin-fw3/commit/379bcae1a4cb84f044ee2d4f2685df5f4ec72817)) + ## [3.3.2](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.1...v3.3.2) (2024-11-12) diff --git a/src/vers.hpp b/src/vers.hpp index 39c30fe8..dc0976d2 100644 --- a/src/vers.hpp +++ b/src/vers.hpp @@ -12,7 +12,7 @@ #define FW_MAJOR_VERSION 3 #define FW_MINOR_VERSION 3 -#define FW_BUILD_NUM 2 +#define FW_BUILD_NUM 3 #define FW_BRANCH "" #if PRODUCT_VERSION_USE_HEX == 1 From 19bee5190dec2b74050a940a6e61bb2def8d7ca2 Mon Sep 17 00:00:00 2001 From: charliekush Date: Thu, 28 Nov 2024 18:39:47 -0800 Subject: [PATCH 12/13] feat: integrated water sensor into data collection --- src/cellular/dataCollection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cellular/dataCollection.cpp b/src/cellular/dataCollection.cpp index 814423ba..97dfd2a9 100644 --- a/src/cellular/dataCollection.cpp +++ b/src/cellular/dataCollection.cpp @@ -79,7 +79,7 @@ void SS_ensemble10Func() lng = pData->location[1]; } - water = 0; // TODO - waiting on water sensor integration + water = pSystemDesc->pWaterSensor->getCurrentReading(); // Accumulate measurements pData->temperature += temp; From 6e82ea3199264c48b94458eb0f360e56afafab85 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 6 Dec 2024 17:57:51 +0000 Subject: [PATCH 13/13] chore(release): 3.4.0 [skip ci] # [3.4.0](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.3...v3.4.0) (2024-12-06) ### Features * integrated water sensor into data collection ([19bee51](https://github.com/UCSD-E4E/smartfin-fw3/commit/19bee5190dec2b74050a940a6e61bb2def8d7ca2)) * integrated water sensor into data collection ([#146](https://github.com/UCSD-E4E/smartfin-fw3/issues/146)) ([5e3ad08](https://github.com/UCSD-E4E/smartfin-fw3/commit/5e3ad08988300a0d64b60a0f7ca46c31b25a7497)) --- CHANGELOG.md | 8 ++++++++ src/vers.hpp | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f03fd7a9..1ad14f0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# [3.4.0](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.3...v3.4.0) (2024-12-06) + + +### Features + +* integrated water sensor into data collection ([19bee51](https://github.com/UCSD-E4E/smartfin-fw3/commit/19bee5190dec2b74050a940a6e61bb2def8d7ca2)) +* integrated water sensor into data collection ([#146](https://github.com/UCSD-E4E/smartfin-fw3/issues/146)) ([5e3ad08](https://github.com/UCSD-E4E/smartfin-fw3/commit/5e3ad08988300a0d64b60a0f7ca46c31b25a7497)) + ## [3.3.3](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.2...v3.3.3) (2024-11-22) diff --git a/src/vers.hpp b/src/vers.hpp index dc0976d2..90267cd2 100644 --- a/src/vers.hpp +++ b/src/vers.hpp @@ -11,8 +11,8 @@ #include "product.hpp" #define FW_MAJOR_VERSION 3 -#define FW_MINOR_VERSION 3 -#define FW_BUILD_NUM 3 +#define FW_MINOR_VERSION 4 +#define FW_BUILD_NUM 0 #define FW_BRANCH "" #if PRODUCT_VERSION_USE_HEX == 1