+ if (devc->cur_unit[i] == SR_UNIT_DECIBEL_MW ||
+ devc->cur_unit[i] == SR_UNIT_DECIBEL_VOLT ||
+ devc->cur_unit[i] == SR_UNIT_PERCENTAGE) {
+ mstr = g_match_info_fetch(match, 2);
+ if (mstr && sr_atoi(mstr, &exp) == SR_OK) {
+ devc->cur_digits[i] = MIN(4 - exp, devc->cur_digits[i]);
+ devc->cur_encoding[i] = MIN(5 - exp, devc->cur_encoding[i]);
+ }
+ g_free(mstr);
+ }
+