X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fdmm%2Ffs9922.c;h=06c8b3c430b29e67011ec6065f7f6fb347f56154;hb=HEAD;hp=6e745412a3857f5b8e04732b893152bcef539d82;hpb=d9251a2c9f1ca4380c27240ccca90c9f9ed46d3f;p=libsigrok.git diff --git a/src/dmm/fs9922.c b/src/dmm/fs9922.c index 6e745412..06c8b3c4 100644 --- a/src/dmm/fs9922.c +++ b/src/dmm/fs9922.c @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ /* @@ -291,7 +290,7 @@ static void handle_flags(struct sr_datafeed_analog *analog, float *floatval, if (info->is_auto) analog->meaning->mqflags |= SR_MQFLAG_AUTORANGE; if (info->is_diode) - analog->meaning->mqflags |= SR_MQFLAG_DIODE; + analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC; if (info->is_hold) analog->meaning->mqflags |= SR_MQFLAG_HOLD; if (info->is_max) @@ -360,7 +359,7 @@ SR_PRIV int sr_fs9922_parse(const uint8_t *buf, float *floatval, int ret, exponent = 0; struct fs9922_info *info_local; - info_local = (struct fs9922_info *)info; + info_local = info; if ((ret = parse_value(buf, floatval, &exponent)) != SR_OK) { sr_dbg("Error parsing value: %d.", ret); @@ -380,12 +379,12 @@ SR_PRIV void sr_fs9922_z1_diode(struct sr_datafeed_analog *analog, void *info) { struct fs9922_info *info_local; - info_local = (struct fs9922_info *)info; + info_local = info; /* User-defined z1 flag means "diode mode". */ if (info_local->is_z1) { analog->meaning->mq = SR_MQ_VOLTAGE; analog->meaning->unit = SR_UNIT_VOLT; - analog->meaning->mqflags |= SR_MQFLAG_DIODE; + analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC; } }