Skip to content

Commit

Permalink
ds3502 set function check for max value has wrong comparison
Browse files Browse the repository at this point in the history
should be less than max value, not greater than.  In its current state it rejects all valid messages.
  • Loading branch information
rekliner authored Jul 7, 2024
1 parent 14bc58d commit 8ece18d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/ds3502/ds3502.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ esp_err_t ds3502_get(i2c_dev_t *dev, uint8_t *pos)

esp_err_t ds3502_set(i2c_dev_t *dev, uint8_t pos, bool save)
{
CHECK_ARG(dev && pos >= DS3502_MAX);
CHECK_ARG(dev && pos <= DS3502_MAX);

I2C_DEV_TAKE_MUTEX(dev);
if (save)
Expand Down

0 comments on commit 8ece18d

Please sign in to comment.