Skip to content

Commit

Permalink
return errors
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenguy committed Sep 25, 2024
1 parent 48f4ea7 commit 9d53b69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ina219/ina219.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ func (d *Device) Configure() (err error) {
//
// Triggering a conversion or reading the "power" register resets
// the conversion ready bit.
func (d *Device) Trigger() {
func (d *Device) Trigger() (err error) {
// Only trigger if the mode is one of the triggered modes.
if ModeTriggered(d.config.Mode) {
d.WriteRegister(RegConfig, d.config.RegisterValue())
err = d.WriteRegister(RegConfig, d.config.RegisterValue())
}
return
}

// Measurements reads the bus voltage, shunt voltage, current, and power
Expand Down

0 comments on commit 9d53b69

Please sign in to comment.