Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cellular and Data storage #24

Merged
merged 92 commits into from
Feb 9, 2024
Merged
Changes from 1 commit
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
112698c
Import SpiffsParticleRK and data upload
emilybthorpe Aug 1, 2023
a0fb493
Fix particle connect
emilybthorpe Aug 1, 2023
aad1114
cellular work
emilybthorpe Aug 4, 2023
18a1137
Merge branch 'chargetask' into cellular
emilybthorpe Aug 4, 2023
21ad015
Fix imports
emilybthorpe Aug 4, 2023
5d3579f
Basic cellular working
emilybthorpe Aug 4, 2023
16c89ad
Porting ensembleTypes from v2
emilybthorpe Aug 5, 2023
2d367ac
Clean up ensemble header with comments
emilybthorpe Aug 5, 2023
253136e
more cellular work
emilybthorpe Aug 5, 2023
8106ccb
port over deploy and prereqs from fw2
emilybthorpe Aug 7, 2023
7135d91
port over code for basic data upload/encode
emilybthorpe Aug 7, 2023
12130f5
cellular debugging
emilybthorpe Aug 7, 2023
bfef833
Testing littlefs
emilybthorpe Aug 7, 2023
ae3ce50
implement tests for hasdata and createFile
emilybthorpe Aug 7, 2023
0530b4b
implement getNumFiles
emilybthorpe Aug 7, 2023
1933d3c
remove spiff-fs and replace with particle little-fs
emilybthorpe Aug 8, 2023
f41ae8e
more cellular work
emilybthorpe Aug 8, 2023
de0e6e2
Deploy debugging
emilybthorpe Aug 9, 2023
f366142
Fix recorder attempting to get data from empty file
emilybthorpe Aug 10, 2023
09bebee
Add doxygen
emilybthorpe Aug 10, 2023
b646a8e
Merge branch 'main' into cellular
emilybthorpe Aug 10, 2023
ac07ddd
Add doxygen for system upload command
emilybthorpe Aug 10, 2023
4f472f4
Merge branch 'cellular' of https://github.com/UCSD-E4E/smartfin-fw3 i…
emilybthorpe Aug 10, 2023
7c48b7e
Formatting
emilybthorpe Aug 10, 2023
03df172
remove testing publish
emilybthorpe Aug 10, 2023
c882ca2
Fix stat not initalizing and therefore causing undefined behavior fix…
emilybthorpe Aug 11, 2023
c06d365
Fix compliation warnings
emilybthorpe Aug 11, 2023
caf98d5
Merge branch 'main' into cellular
emilybthorpe Aug 21, 2023
d358311
Merge branch 'main' into cellular
emilybthorpe Aug 28, 2023
b91a234
feature: get data from sensor instead of fake data
emilybthorpe Aug 28, 2023
7fd2a80
Merge branch 'main' into cellular
emilybthorpe Aug 29, 2023
5180cd6
feature: integrate temp sensor to data collection
emilybthorpe Aug 29, 2023
ee29c9e
Merge branch 'main' into cellular
Sep 11, 2023
770cb2b
fix: Removes SpiffsParticleRK dependency
Sep 11, 2023
563e2e3
fix: Fixes newlines
Sep 11, 2023
409c7c4
fix! switches to 32 bit param, adds opendir fail
Sep 11, 2023
82ca64c
feat!: Adds fileCLI
Sep 11, 2023
6154c5b
fix: Reduces flog entries to 128
Sep 12, 2023
b74b46d
fix: Fixes tooling paths and switches to c++11
Sep 12, 2023
bd0ae1e
fix: Includes
Sep 12, 2023
3c80ff7
chore: Adds ruler
Sep 12, 2023
32349fe
fix: Adds debug point flog
Sep 12, 2023
66475c7
feat: Adds ls functionality
Sep 12, 2023
621797d
style: Fixes long line
Sep 12, 2023
3422dcb
fix: Adds chgdir
Sep 12, 2023
d35ff05
feat: Adds cd and pwd
Sep 12, 2023
08ad4c4
feat: Adds rm, fixes buildpath
Sep 12, 2023
6344465
feat: Adds hexdump
Sep 12, 2023
263381a
feat: Added file publish dump
Sep 12, 2023
c2cfcd5
feat: Adds helptext
Sep 12, 2023
be37dac
fix: Updates helptext
Sep 12, 2023
4cab8a3
style: Formatting
Sep 12, 2023
c41fe78
fix: Updates base85 to latest
Sep 12, 2023
eccb68f
docs: Updates library register
Sep 12, 2023
825e778
fix: Rolling back base85
Sep 12, 2023
afa0351
docs: Adds Recorder class
Sep 21, 2023
1f58ab3
feat: Switches to consolidated menu system
Sep 22, 2023
56c243a
fix: Fixes sleep CLI
Sep 22, 2023
f23356f
fix: Fixes upload CLI
Sep 22, 2023
cb0da06
fix: Fixes includes
Sep 22, 2023
47a6bd8
fix: Updates hexdump
Sep 23, 2023
cd1effd
feat: Functional session
Sep 27, 2023
86a4b45
fix: Updates flog
Sep 27, 2023
4d6f328
fix: Fixes data location initialization
Sep 27, 2023
f641578
feat: Adds mkdir
Sep 27, 2023
24cafec
fix: Added FLOG include
Sep 27, 2023
a9eb5e9
feat: Adds basic recorder functionality and test
Sep 29, 2023
815c6a1
fix: Fixes current_dir level
Sep 29, 2023
e3cc6a5
fix: Removes setName
Sep 29, 2023
1cdb02b
feat: Adds setSessionTime
Sep 29, 2023
b773e64
docs: Fixes environment
Oct 13, 2023
cf7b70e
feat: Adds fsync to write
Oct 13, 2023
9198bb1
docs: Adds more docs
Oct 13, 2023
98de874
feat: Adds additional fs flog entries
Oct 13, 2023
a2f5a6d
chore: Removes old debug flog
Oct 13, 2023
6a574c0
feat: Adds packetizing
Oct 13, 2023
a296ff0
feat: Adds pop last packet debug
Oct 13, 2023
654abd5
fix: Pops on empty session
Oct 13, 2023
dc66939
feat: Adds error handling to creation
Oct 13, 2023
63b10dd
fix: Adds protection against double open
Oct 13, 2023
ab59ef8
feat: Completes recorder
Oct 13, 2023
5a5f745
docs: Updates service diagram
Oct 17, 2023
c7cac65
chore: Ignores plantuml output
Oct 17, 2023
3502cc2
docs: Updated diagram
Oct 19, 2023
45b392e
docs: Ignores firmware diagram output
Oct 19, 2023
7339458
fix: Enabled cloud connectivity commands
Oct 19, 2023
8720114
fix: Cleaned up flog entries
Oct 19, 2023
8a3bd5e
docs: Updated application progress
Oct 19, 2023
2adc537
feat: Adds firmware hashes
Oct 19, 2023
674701e
feat: Adds DeviceOS version display
Oct 19, 2023
d2b7868
feat: Adds publish_blob
Feb 9, 2024
4774141
Merge branch 'main' into cellular
ntlhui Feb 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix imports
emilybthorpe committed Aug 4, 2023
commit 21ad015428b727d38e33e86fa404d176732990ab
11 changes: 4 additions & 7 deletions src/cellular/dataUpload.cpp
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
#include "base85.h"
#include "base64.h"
#include "sleepTask.hpp"
#include "flog.hpp"
#include "cli/flog.hpp"

void DataUpload::init(void)
{
@@ -37,25 +37,22 @@ STATES_e DataUpload::run(void)
nBytesToSend = DATA_UPLOAD_MAX_UPLOAD_LEN;
SF_OSAL_printf("Got %u bytes to upload\n", nBytesToSend);

dataPublishBuffer = "HI!!";
publishName = "Test Publish";
strncpy(dataPublishBuffer, "Hi!", DATA_UPLOAD_MAX_UPLOAD_LEN);
strncpy(publishName, "Test Publish", DU_PUBLISH_ID_NAME_LEN + 1);

if(!Particle.connected())
{
// we're not connected! abort
return STATE_CLI;
}

if(!Particle.publish(publishName, dataPublishBuffer", PRIVATE | WITH_ACK))
if(!Particle.publish(publishName, dataPublishBuffer, PRIVATE | WITH_ACK))
{
SF_OSAL_printf("Failed to upload data!\n");
continue;
}

SF_OSAL_printf("Uploaded record %s\n", dataPublishBuffer);
Particle.process();
lastSendTime = millis();


return STATE_CLI;
}