From a967822c4c089ef3caf3735f9007dde9d21e50de Mon Sep 17 00:00:00 2001 From: Aman Palanati Date: Fri, 8 Nov 2024 09:34:20 -0800 Subject: [PATCH 1/2] 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 2/2] 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 *