-
Notifications
You must be signed in to change notification settings - Fork 0
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
Created sht30 internal temp fault monitoring #55
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
//#include <nerduino.h> Replace | ||
#include "datastructs.h" | ||
#include "segment.h" | ||
#include "Core/Drivers/Embedded-Base/general/include/sht30.h" | ||
|
||
/* We want to make sure we aren't doing useless analysis on the same set of data since we are | ||
* backfilling segment data */ | ||
|
@@ -33,4 +34,14 @@ AccumulatorData_t* bmsdata; | |
|
||
AccumulatorData_t* prevbmsdata; | ||
|
||
/** | ||
* @brief Create a new object to store the most recent data point for the temp sensor | ||
*/ | ||
sht30_t* sht30data; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like the @brief got doubled here, but also dont think we need one at all. creating an sht30 object right nect to an acc data one is pretty self explanatory imo, so feel free to remove both |
||
|
||
/** | ||
* @brief Create a new object to store the most recent data point for the temp sensor | ||
*/ | ||
void sht30_init(); | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,14 +115,16 @@ Timer ocvTimer; | |
|
||
bool is_first_reading_ = true; | ||
|
||
void push(AccumulatorData_t* data) | ||
void push(AccumulatorData_t* data, sht30_t* sht30data) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just gonna wanna update the acual call of this function in main.c to use this new param as well |
||
{ | ||
if (prevbmsdata != nullptr) | ||
delete prevbmsdata; | ||
|
||
prevbmsdata = bmsdata; | ||
bmsdata = data; | ||
|
||
sht30_get_temp_humid(sht30data) | ||
|
||
disable_therms(); | ||
|
||
high_curr_therm_check(); /* = prev if curr > 50 */ | ||
|
@@ -525,3 +527,8 @@ void diff_curr_therm_check() | |
} | ||
} | ||
} | ||
|
||
void sht30_init(sht30_t* sht30data) | ||
{ | ||
sht30data->i2c_handle = &hi2c1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ive discovered that for whatever reason it doesnt love the full path, so actually just "sht30.h" will work better