Skip to content

Solar refactor#120

Merged
ThirteenFish merged 7 commits into
masterfrom
solar-refactor
Jun 29, 2025
Merged

Solar refactor#120
ThirteenFish merged 7 commits into
masterfrom
solar-refactor

Conversation

@ThirteenFish

Copy link
Copy Markdown
Contributor

I thought the bugfix/cvrf_oneshot_read_avg_power merge was going in to master, I missed that it ended up here instead. Into master we go!

wjeffreys96 and others added 7 commits June 21, 2025 15:32
When performing a one shot conversion we write to the config mode
register to trigger a conversion, then we check the cvrf bit to see if
the conversion is ready to read or not.
The read_avg_power_and_voltage function will now trigger a read and then
wait for it to be finished before updating the state. This will make
sure that all the readings are synchronized. In order to do this, the
mode must be set to triggered conversions when calling ina226Start.
Previously I wasn't understanding the register naming conventions so I
wasn't writing/reading to the correct locations. This should fix that.
Also removed whitespaces at EOL.
Initializing the sample for readability mainly. Removed whitespace at
EOL. Moved the sleep call before polling so as to not poll uneccesarily.
Switch From Continuous to Triggered Conversions Using CVRF
@ThirteenFish ThirteenFish merged commit 0e1cc6d into master Jun 29, 2025
1 check passed
@ThirteenFish ThirteenFish deleted the solar-refactor branch June 29, 2025 20:59
wjeffreys96 pushed a commit that referenced this pull request Jul 18, 2025
I thought the `bugfix/cvrf_oneshot_read_avg_power` merge was going in to master, I missed that it ended up here instead. Into master we go!
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.

2 participants