From 3447aa31d687161387b5c8e324aecdd1d324b2df Mon Sep 17 00:00:00 2001 From: Iha Date: Thu, 17 Oct 2024 15:52:56 -0700 Subject: [PATCH 01/28] Commiting test --- src/chargeTask.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chargeTask.hpp b/src/chargeTask.hpp index 11cf1da8..d91fcc5a 100644 --- a/src/chargeTask.hpp +++ b/src/chargeTask.hpp @@ -21,7 +21,7 @@ class ChargeTask : public Task{ */ void init(void); /** - * @brief Charges the device, and exits to CLI on command + * @brief Charges the device, and exits to CLI on command. */ STATES_e run(void); void exit(void); From a666b89b31b7cf1cb6fb7eb40fbe0712963706ce Mon Sep 17 00:00:00 2001 From: Iha Date: Thu, 17 Oct 2024 15:57:18 -0700 Subject: [PATCH 02/28] docs: Charge Task Fixes #89 --- src/chargeTask.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chargeTask.hpp b/src/chargeTask.hpp index d91fcc5a..a00db0c0 100644 --- a/src/chargeTask.hpp +++ b/src/chargeTask.hpp @@ -21,8 +21,8 @@ class ChargeTask : public Task{ */ void init(void); /** - * @brief Charges the device, and exits to CLI on command. - */ + * @brief Charges the device, and exits to CLI on command.. + */ STATES_e run(void); void exit(void); From 8c9164677fa2ef5c80eb60cea1580656ceef141a Mon Sep 17 00:00:00 2001 From: William Date: Thu, 17 Oct 2024 19:43:17 -0700 Subject: [PATCH 03/28] docs: menu_ is now documented --- .vscode/settings.json | 5 ++--- src/fileCLI/fileCLI.hpp | 7 +++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 615c700f..c48243f0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -58,9 +58,8 @@ "semaphore": "cpp", "span": "cpp" }, - "particle.firmwareVersion": "5.3.0", - "particle.targetPlatform": "tracker", - "particle.targetDevice": "", + "particle.firmwareVersion": "5.3.1", + "particle.targetPlatform": "boron", "cmake.configureOnOpen": false, "C_Cpp.default.cppStandard": "c++11", "C_Cpp.default.cStandard": "c11", diff --git a/src/fileCLI/fileCLI.hpp b/src/fileCLI/fileCLI.hpp index 2603d1be..0e55c17a 100644 --- a/src/fileCLI/fileCLI.hpp +++ b/src/fileCLI/fileCLI.hpp @@ -93,6 +93,13 @@ class FileCLI{ DIR* dir_stack[FILE_CLI_MAX_DIR_DEPTH]; char path_stack[FILE_CLI_MAX_DIR_DEPTH][NAME_MAX]; int current_dir; + + /** + * @brief Structure representing a command menu entry for FileCLI. + * + * Associated specific user commands with specific actions. + * The findCommand function then finds the matching command in the menu. + */ typedef struct menu_ { const char cmd; From fd3ef27c16882a7c122ad6b22777aba013098a8a Mon Sep 17 00:00:00 2001 From: William Date: Thu, 17 Oct 2024 21:27:18 -0700 Subject: [PATCH 04/28] fix: fields inside menu_ documented. revert unintended changes --- .vscode/settings.json | 4 ++-- src/fileCLI/fileCLI.hpp | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c48243f0..50b98364 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -58,8 +58,8 @@ "semaphore": "cpp", "span": "cpp" }, - "particle.firmwareVersion": "5.3.1", - "particle.targetPlatform": "boron", + "particle.firmwareVersion": "5.3.0", + "particle.targetPlatform": "tracker", "cmake.configureOnOpen": false, "C_Cpp.default.cppStandard": "c++11", "C_Cpp.default.cStandard": "c11", diff --git a/src/fileCLI/fileCLI.hpp b/src/fileCLI/fileCLI.hpp index 0e55c17a..07b2c42e 100644 --- a/src/fileCLI/fileCLI.hpp +++ b/src/fileCLI/fileCLI.hpp @@ -97,13 +97,11 @@ class FileCLI{ /** * @brief Structure representing a command menu entry for FileCLI. * - * Associated specific user commands with specific actions. - * The findCommand function then finds the matching command in the menu. */ typedef struct menu_ { - const char cmd; - void (FileCLI::*fn)(void); + const char cmd; /**< A character representing a user command. */ + void (FileCLI::*fn)(void); /**< A pointer to a FileCLI member function. */ } menu_t; static menu_t fsExplorerMenu[]; /** From 7bf96648fc7af8330e4089b2409e3c23420b5ea8 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 24 Oct 2024 20:24:24 -0700 Subject: [PATCH 05/28] docs: menu_ now has more detailed documentation. revert unintended changes --- .vscode/settings.json | 1 + src/fileCLI/fileCLI.hpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 50b98364..615c700f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -60,6 +60,7 @@ }, "particle.firmwareVersion": "5.3.0", "particle.targetPlatform": "tracker", + "particle.targetDevice": "", "cmake.configureOnOpen": false, "C_Cpp.default.cppStandard": "c++11", "C_Cpp.default.cStandard": "c11", diff --git a/src/fileCLI/fileCLI.hpp b/src/fileCLI/fileCLI.hpp index 07b2c42e..df1e98b8 100644 --- a/src/fileCLI/fileCLI.hpp +++ b/src/fileCLI/fileCLI.hpp @@ -100,8 +100,10 @@ class FileCLI{ */ typedef struct menu_ { - const char cmd; /**< A character representing a user command. */ - void (FileCLI::*fn)(void); /**< A pointer to a FileCLI member function. */ + const char + cmd; /**< A character representing a user command. Will trigger a specific function. */ + void (FileCLI::*fn)( + void); /**< A pointer to a place in ram where a function with properties is held. */ } menu_t; static menu_t fsExplorerMenu[]; /** From 0da8c2cc2e3a33847b503ccdb7f550c4fd84b42e Mon Sep 17 00:00:00 2001 From: William Date: Thu, 31 Oct 2024 20:48:42 -0700 Subject: [PATCH 06/28] docs: change docstring format + more detailed documentation --- src/fileCLI/fileCLI.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/fileCLI/fileCLI.hpp b/src/fileCLI/fileCLI.hpp index df1e98b8..f7c2ee79 100644 --- a/src/fileCLI/fileCLI.hpp +++ b/src/fileCLI/fileCLI.hpp @@ -100,10 +100,15 @@ class FileCLI{ */ typedef struct menu_ { - const char - cmd; /**< A character representing a user command. Will trigger a specific function. */ - void (FileCLI::*fn)( - void); /**< A pointer to a place in ram where a function with properties is held. */ + /** + * A character representing a user command. Will trigger a specific function. + */ + const char cmd; + /** + * A pointer to a place in ram where a function with properties is held. Executes the + * command associated with cmd. + */ + void (FileCLI::*fn)(void); } menu_t; static menu_t fsExplorerMenu[]; /** From c7edd538debfbb904b5ac1ed5c5c86784a3a9cee Mon Sep 17 00:00:00 2001 From: Aman Palanati Date: Mon, 4 Nov 2024 23:18:11 -0800 Subject: [PATCH 07/28] Documented class, member variables, constructor, and destructor --- src/watersensor/waterSensor.hpp | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/watersensor/waterSensor.hpp b/src/watersensor/waterSensor.hpp index 80a549b0..3f6fc2eb 100644 --- a/src/watersensor/waterSensor.hpp +++ b/src/watersensor/waterSensor.hpp @@ -24,27 +24,72 @@ #define WATER_SENSOR_HIGH_STATE 1 #define WATER_SENSOR_LOW_STATE 0 +/** + * @brief Represents a sensor that detects water presence using a moving window of samples + */ class WaterSensor { private: // which pin is the water sensor on? + /** + * @brief Pin that enables the water detection sensor + */ uint8_t water_detect_en_pin; + /** + * @brief Pin that reads the water detection status + */ uint8_t water_detect_pin; + // how many samples to look at for the moving window + /** + * @brief Size of the moving sample window used for water detection + */ uint8_t moving_window_size; + /** + * @brief Minimum percentage of high state readings to trigger a change to "out of water" + */ uint8_t low_detect_percentage = DEFAULT_WATER_SENSOR_LOW_PERCENTAGE; + /** + * @brief Minimum percentage of high state readings to trigger a change to "in water" + */ uint8_t high_detect_percentage = DEFAULT_WATER_SENSOR_HIGH_PERCENTAGE; + // how many samples have been taken since a reset (signally a valid measurement) + /** + * @brief Number of samples taken since the last reset + */ uint8_t samples_taken_since_reset = 0; + // sum of the array, initially set to zero. + /** + * @brief Sum of the current samples in the window + */ uint8_t array_sum = 0; + // current location in the array + /** + * @brief Current position in the array of samples + */ uint8_t array_location = 0; + // the last water reading, for hystersis, starting with "out of the water" + /** + * @brief Previous water detection status used for hystersis + */ uint8_t last_water_detect = 0; public: + /** + * @brief Initializes the WaterSensor with specific pins and window size + * + * @param water_detect_en_pin Pin that enables the water sensor + * @param water_detect_pin_to_set Pin that reads the sensor value + * @param window_size Size of the moving sample window used for water detection + */ WaterSensor(uint8_t water_detect_en_pin, uint8_t water_detect_pin_to_set, uint8_t window_size); + /** + * @brief Destroys the WaterSensor instance + */ ~WaterSensor(); // resets the array to zero From e7db8afbe54c8fb6e6690affac1125bcbfdfabbe Mon Sep 17 00:00:00 2001 From: William Date: Thu, 7 Nov 2024 15:54:55 -0800 Subject: [PATCH 08/28] docs: correct menu_ documentation --- 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 f7c2ee79..e40852d6 100644 --- a/src/fileCLI/fileCLI.hpp +++ b/src/fileCLI/fileCLI.hpp @@ -105,8 +105,8 @@ class FileCLI{ */ const char cmd; /** - * A pointer to a place in ram where a function with properties is held. Executes the - * command associated with cmd. + * A pointer to a place in flash memory or RAM where a function with properties is held. + * Executes the command associated with cmd. */ void (FileCLI::*fn)(void); } menu_t; From a967822c4c089ef3caf3735f9007dde9d21e50de Mon Sep 17 00:00:00 2001 From: Aman Palanati Date: Fri, 8 Nov 2024 09:34:20 -0800 Subject: [PATCH 09/28] Documented Boot Behavior enumeration and its members --- src/sleepTask.hpp | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/src/sleepTask.hpp b/src/sleepTask.hpp index e577170d..1d2d9171 100644 --- a/src/sleepTask.hpp +++ b/src/sleepTask.hpp @@ -15,14 +15,38 @@ class SleepTask : public Task { STATES_e run(void); void exit(void); + /** + * @brief Defines possible boot behaviors + */ typedef enum BOOT_BEHAVIOR_ { + /** + * @brief Standard boot behavior + */ BOOT_BEHAVIOR_NORMAL=0, + /** + * @brief Initiate temporary calibration on startup + */ BOOT_BEHAVIOR_TMP_CAL_START=1, + /** + * @brief Continue temporary calibration sequence + */ BOOT_BEHAVIOR_TMP_CAL_CONTINUE=2, + /** + * @brief End temporary calibration + */ BOOT_BEHAVIOR_TMP_CAL_END=3, + /** + * @brief Reattempts data upload + */ BOOT_BEHAVIOR_UPLOAD_REATTEMPT=4, + /** + * @brief Boot behavior is not specified + */ BOOT_BEHAVIOR_NOT_SET=255 + /** + * @brief Type definition for Boot Behavior enum + */ } BOOT_BEHAVIOR_e; /** @@ -36,18 +60,28 @@ class SleepTask : public Task { static const char* strBootBehavior(BOOT_BEHAVIOR_e behavior); /** * @brief Updates boot behavior to NVRAM - */ + * + * @param BOOT_BEHAVIOR_e Boot Behavior to set + */ static void setBootBehavior(BOOT_BEHAVIOR_e); /** * @brief Get's current boot behavior from NVRAM - */ + * + * @return Current Boot Behavior + */ static BOOT_BEHAVIOR_e getBootBehavior(void); /** * @brief Load boot behavior onto board - */ + */ static void loadBootBehavior(void); private: + /** + * @brief Stores current Boot Behavior + */ static BOOT_BEHAVIOR_e bootBehavior; + /** + * @brief Manages LED status display settings + */ LEDStatus ledStatus; }; #endif From ad25cd1d8e029141930b3bc0c76ec576a4d1c783 Mon Sep 17 00:00:00 2001 From: Aman Palanati Date: Fri, 8 Nov 2024 18:23:16 -0800 Subject: [PATCH 10/28] Resolved docstring issues and added parameter name to setBootBehavior --- src/sleepTask.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/sleepTask.hpp b/src/sleepTask.hpp index 1d2d9171..9f810c83 100644 --- a/src/sleepTask.hpp +++ b/src/sleepTask.hpp @@ -25,15 +25,15 @@ class SleepTask : public Task { */ BOOT_BEHAVIOR_NORMAL=0, /** - * @brief Initiate temporary calibration on startup + * @brief Initiate temperature calibration on startup */ BOOT_BEHAVIOR_TMP_CAL_START=1, /** - * @brief Continue temporary calibration sequence + * @brief Continue temperature calibration sequence */ BOOT_BEHAVIOR_TMP_CAL_CONTINUE=2, /** - * @brief End temporary calibration + * @brief End temperature calibration */ BOOT_BEHAVIOR_TMP_CAL_END=3, /** @@ -44,9 +44,6 @@ class SleepTask : public Task { * @brief Boot behavior is not specified */ BOOT_BEHAVIOR_NOT_SET=255 - /** - * @brief Type definition for Boot Behavior enum - */ } BOOT_BEHAVIOR_e; /** @@ -61,9 +58,9 @@ class SleepTask : public Task { /** * @brief Updates boot behavior to NVRAM * - * @param BOOT_BEHAVIOR_e Boot Behavior to set + * @param behavior Boot Behavior to set */ - static void setBootBehavior(BOOT_BEHAVIOR_e); + static void setBootBehavior(BOOT_BEHAVIOR_e behavior); /** * @brief Get's current boot behavior from NVRAM * From a3be6c1639ad8b0d3022cd796bf22c3fce399268 Mon Sep 17 00:00:00 2001 From: Iha Date: Thu, 17 Oct 2024 17:15:56 -0700 Subject: [PATCH 11/28] docs: Add variable and function documentation --- src/chargeTask.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/chargeTask.hpp b/src/chargeTask.hpp index a00db0c0..d8d5c510 100644 --- a/src/chargeTask.hpp +++ b/src/chargeTask.hpp @@ -21,14 +21,29 @@ class ChargeTask : public Task{ */ void init(void); /** - * @brief Charges the device, and exits to CLI on command.. + * @brief Charges the device, and exits to CLI on command + * + * @return Current status of charge task */ STATES_e run(void); void exit(void); private: + /** + * @brief Buffer for storing command-line input + * + * Character array holds input from CLI with a maxiumum size of 'CLI_BUFFER_LEN' + */ char inputBuffer[CLI_BUFFER_LEN]; + /** + * @brief LED status indicator for charging task + * + * Object provides visual status of device's charging state + */ LEDStatus ledStatus; + /** + * @brief Timestamp for tracking start of charging process + */ system_tick_t startTime; }; #endif From 58ddc9a535a09d1c37c4213d2655cb02195363cd Mon Sep 17 00:00:00 2001 From: Iha Date: Mon, 21 Oct 2024 13:37:00 -0700 Subject: [PATCH 12/28] docs: Adds variable specifics --- src/chargeTask.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/chargeTask.hpp b/src/chargeTask.hpp index d8d5c510..f28553ea 100644 --- a/src/chargeTask.hpp +++ b/src/chargeTask.hpp @@ -23,7 +23,7 @@ class ChargeTask : public Task{ /** * @brief Charges the device, and exits to CLI on command * - * @return Current status of charge task + * @return State of device: STATE_CLI or STATE_DEEP_SLEEP */ STATES_e run(void); void exit(void); @@ -38,11 +38,13 @@ class ChargeTask : public Task{ /** * @brief LED status indicator for charging task * - * Object provides visual status of device's charging state + * Object defines visual status of device's charging state */ LEDStatus ledStatus; /** * @brief Timestamp for tracking start of charging process + * + * startTime = 0 indicates the device charging for 0 milliseconds */ system_tick_t startTime; }; From d84d407187f41494d152eb871623da7a2e2e48bc Mon Sep 17 00:00:00 2001 From: Iha Date: Fri, 8 Nov 2024 09:41:40 -0800 Subject: [PATCH 13/28] docs: function and variable doc changed --- src/chargeTask.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/chargeTask.hpp b/src/chargeTask.hpp index f28553ea..b67bd5ca 100644 --- a/src/chargeTask.hpp +++ b/src/chargeTask.hpp @@ -23,7 +23,8 @@ class ChargeTask : public Task{ /** * @brief Charges the device, and exits to CLI on command * - * @return State of device: STATE_CLI or STATE_DEEP_SLEEP + * @return STATE_CLI when CLI pattern entered or + * STATE_DEEP_SLEEP when device not charging */ STATES_e run(void); void exit(void); @@ -44,7 +45,8 @@ class ChargeTask : public Task{ /** * @brief Timestamp for tracking start of charging process * - * startTime = 0 indicates the device charging for 0 milliseconds + * startTime = 0 indicates the device charging since + * the powering on of the device */ system_tick_t startTime; }; From 99e314198be3ca826f26abc06beb261171e6d2a5 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 12 Nov 2024 02:10:50 +0000 Subject: [PATCH 14/28] chore(release): 3.3.2 [skip ci] ## [3.3.2](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.1...v3.3.2) (2024-11-12) ### Bug Fixes * fields inside menu_ documented. revert unintended changes ([fd3ef27](https://github.com/UCSD-E4E/smartfin-fw3/commit/fd3ef27c16882a7c122ad6b22777aba013098a8a)) --- CHANGELOG.md | 7 +++++++ src/vers.hpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1f110d3..dd298f8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [3.3.2](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.1...v3.3.2) (2024-11-12) + + +### Bug Fixes + +* fields inside menu_ documented. revert unintended changes ([fd3ef27](https://github.com/UCSD-E4E/smartfin-fw3/commit/fd3ef27c16882a7c122ad6b22777aba013098a8a)) + ## [3.3.1](https://github.com/UCSD-E4E/smartfin-fw3/compare/v3.3.0...v3.3.1) (2024-11-07) diff --git a/src/vers.hpp b/src/vers.hpp index 6f0b4050..39c30fe8 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 1 +#define FW_BUILD_NUM 2 #define FW_BRANCH "" #if PRODUCT_VERSION_USE_HEX == 1 From 8a331255a3dde3a4f93f6b561baba9509106a34a Mon Sep 17 00:00:00 2001 From: Aman Palanati Date: Mon, 11 Nov 2024 22:06:23 -0800 Subject: [PATCH 15/28] Deleted extraneous/redundant comments --- src/watersensor/waterSensor.hpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/watersensor/waterSensor.hpp b/src/watersensor/waterSensor.hpp index 3f6fc2eb..48de91d1 100644 --- a/src/watersensor/waterSensor.hpp +++ b/src/watersensor/waterSensor.hpp @@ -30,7 +30,6 @@ class WaterSensor { private: - // which pin is the water sensor on? /** * @brief Pin that enables the water detection sensor */ @@ -39,8 +38,6 @@ class WaterSensor * @brief Pin that reads the water detection status */ uint8_t water_detect_pin; - - // how many samples to look at for the moving window /** * @brief Size of the moving sample window used for water detection */ @@ -53,26 +50,18 @@ class WaterSensor * @brief Minimum percentage of high state readings to trigger a change to "in water" */ uint8_t high_detect_percentage = DEFAULT_WATER_SENSOR_HIGH_PERCENTAGE; - - // how many samples have been taken since a reset (signally a valid measurement) /** * @brief Number of samples taken since the last reset */ uint8_t samples_taken_since_reset = 0; - - // sum of the array, initially set to zero. /** * @brief Sum of the current samples in the window */ uint8_t array_sum = 0; - - // current location in the array /** * @brief Current position in the array of samples */ uint8_t array_location = 0; - - // the last water reading, for hystersis, starting with "out of the water" /** * @brief Previous water detection status used for hystersis */ From cc0b47d51d730785b2e9f9907c2b45a62dc36b69 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Wed, 13 Nov 2024 11:38:43 -0800 Subject: [PATCH 16/28] 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 17/28] 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 18/28] 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 19/28] 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 20/28] 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 21/28] 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 22/28] 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 23/28] 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 24/28] 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 25/28] 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 26/28] 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 27/28] 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 28/28] 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