Skip to content

Commit

Permalink
Merge branch 'main' into 95-docs-sleep-task
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui authored Nov 12, 2024
2 parents ad25cd1 + 99e3141 commit e246362
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
21 changes: 20 additions & 1 deletion src/chargeTask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,32 @@ class ChargeTask : public Task{
void init(void);
/**
* @brief Charges the device, and exits to CLI on command
*/
*
* @return STATE_CLI when CLI pattern entered or
* STATE_DEEP_SLEEP when device not charging
*/
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 defines visual status of device's charging state
*/
LEDStatus ledStatus;
/**
* @brief Timestamp for tracking start of charging process
*
* startTime = 0 indicates the device charging since
* the powering on of the device
*/
system_tick_t startTime;
};
#endif
12 changes: 12 additions & 0 deletions src/fileCLI/fileCLI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,21 @@ 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.
*
*/
typedef struct menu_
{
/**
* A character representing a user command. Will trigger a specific function.
*/
const char 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;
static menu_t fsExplorerMenu[];
Expand Down
2 changes: 1 addition & 1 deletion src/vers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e246362

Please sign in to comment.