Skip to content

Commit

Permalink
Merge branch '92-docs-data-collection' of https://github.com/UCSD-E4E…
Browse files Browse the repository at this point in the history
…/smartfin-fw3 into 92-docs-data-collection
  • Loading branch information
ihagad committed Dec 19, 2024
2 parents db88da8 + 1094d57 commit b2b99ab
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 15 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
2 changes: 1 addition & 1 deletion src/cellular/dataCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,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;
Expand Down
42 changes: 38 additions & 4 deletions src/cellular/dataUpload.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions src/cellular/ensembleTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/cli/conio.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __CONIO_HPP__
#define __CONIO_HPP__

#include <cstdarg>
#include <stdint.h>

/**
Expand Down Expand Up @@ -53,4 +54,4 @@ extern "C"
}
#endif

#endif
#endif
5 changes: 2 additions & 3 deletions src/cli/menuItems/debugCommands.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
/**
Expand Down
4 changes: 2 additions & 2 deletions src/fileCLI/fileCLI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include "Particle.h"

#include <stddef.h>
#include <dirent.h>
#include <sys/syslimits.h>
#include <limits.h>
#include <stddef.h>

#define FILE_CLI_INPUT_BUFFER_LEN 80
#define FILE_CLI_MAX_DIR_DEPTH 4
Expand Down
4 changes: 2 additions & 2 deletions src/smartfin-fw3.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -163,4 +163,4 @@ static void printState(STATES_e state)
}
pStateName = STATES_NAME_TAB[state];
SF_OSAL_printf("%s" __NL__, pStateName);
}
}
4 changes: 2 additions & 2 deletions src/vers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b2b99ab

Please sign in to comment.