Skip to content

Sht30#20

Merged
jr1221 merged 16 commits intomainfrom
sht30
Nov 1, 2025
Merged

Sht30#20
jr1221 merged 16 commits intomainfrom
sht30

Conversation

@Jake-Hensley
Copy link
Copy Markdown
Contributor

@Jake-Hensley Jake-Hensley commented Feb 7, 2025

Changes

Changed sht30 implementation

To Do

  • test on hardware

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please reach out to your Project Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • No merge conflicts
  • All checks passing
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • Request reviewers & ping on Slack

@Jake-Hensley Jake-Hensley self-assigned this Feb 7, 2025
Copy link
Copy Markdown
Contributor

@jr1221 jr1221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tis but a few things. lets see if it works lol

Core/Src/msb.c Outdated
#endif

#ifdef SENSOR_TOF
#ifdef SENSOR_TOFsht30_t
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmmm

Core/Src/msb.c Outdated
HAL_StatusTypeDef hal_stat = sht30_get_temp_humid(&temp_sensor);
if (hal_stat)
return hal_stat;
int status = sht30_get_temp_humid(&temp_sensor);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls use uint8_t throughout

Copy link
Copy Markdown
Contributor

@caiodasilva2005 caiodasilva2005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this man, just a few more changes and then we will be able to test the sht30!

Core/Src/msb.c Outdated
assert(!sht30_init(&temp_sensor)); /* This is always connected */
sht30_t temp_sensor;
assert(!sht30_init(&temp_sensor, (Read_ptr)sht30_i2c_read,
(Write_ptr)sht30_i2c_write,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you change the return type of the function pointer to a unit8_t, then you shouldn't have to cast when passing into init

Core/Src/msb.c Outdated
#endif

#ifdef SENSOR_TOF
#ifdef SENSOR_TOFsht30_t
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmmm

jr1221
jr1221 previously approved these changes Apr 9, 2025
Copy link
Copy Markdown
Contributor

@jr1221 jr1221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge when tested and builds and formats. (ensure you see the right temperature on MQTT you changed the format to floats so the JSOn needs to be updated)

/// @param out
/// @return error code
int8_t central_temp_measure(uint16_t *temp, uint16_t *humidity)
int8_t central_temp_measure(float *temp, float *humidity)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move docs to header.

@jr1221 jr1221 merged commit 2757745 into main Nov 1, 2025
2 checks passed
@jr1221 jr1221 deleted the sht30 branch November 1, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants