diff --git a/CHANGELOG.md b/CHANGELOG.md index dd298f8c..1ad14f0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# [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) + + +### 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/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; 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 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; 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}, diff --git a/src/cli/conio.cpp b/src/cli/conio.cpp index 2c94d2b9..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 aae5f026..d0049e05 100644 --- a/src/cli/conio.hpp +++ b/src/cli/conio.hpp @@ -1,8 +1,13 @@ #ifndef __CONIO_HPP__ #define __CONIO_HPP__ +#include #include +/** + * @brief int length of character array SF_OSAL_printfBuffer + * + */ #define SF_OSAL_PRINTF_BUFLEN 1536 #ifdef __cplusplus @@ -41,6 +46,7 @@ extern "C" * @brief Gets user input lin * @param buffer buffer to write too * @param buflen length of buffer + * @return length of the user input line */ int getline(char* buffer, int buflen); @@ -48,4 +54,4 @@ extern "C" } #endif -#endif \ No newline at end of file +#endif 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); /** 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 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 +} diff --git a/src/vers.hpp b/src/vers.hpp index 39c30fe8..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 2 +#define FW_MINOR_VERSION 4 +#define FW_BUILD_NUM 0 #define FW_BRANCH "" #if PRODUCT_VERSION_USE_HEX == 1