Merge pull request #180 from jhbruhn/patch-1
This commit is contained in:
commit
c7aaf5b388
1 changed files with 1 additions and 0 deletions
|
|
@ -108,6 +108,7 @@ static int read_adc_spec(const struct adc_dt_spec* spec, prst_adc_read_t* out) {
|
||||||
|
|
||||||
int32_t val_mv = buf;
|
int32_t val_mv = buf;
|
||||||
RET_IF_ERR(adc_raw_to_millivolts_dt(spec, &val_mv));
|
RET_IF_ERR(adc_raw_to_millivolts_dt(spec, &val_mv));
|
||||||
|
val_mv = MAX(0, val_mv);
|
||||||
|
|
||||||
out->raw = buf;
|
out->raw = buf;
|
||||||
out->millivolts = val_mv;
|
out->millivolts = val_mv;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue