]> sigrok.org Git - libsigrok.git/blobdiff - src/dmm/fs9721.c
several DMMs: set DC flag for diode mode
[libsigrok.git] / src / dmm / fs9721.c
index d4a857d367d75b7c59d63967175a06c93b6aee3f..c13bdbcf675a28bb5d1914c3f6ab44fc7102d716 100644 (file)
@@ -15,8 +15,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 <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -303,7 +302,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_rel)
@@ -364,7 +363,7 @@ SR_PRIV int sr_fs9721_parse(const uint8_t *buf, float *floatval,
        parse_flags(buf, info_local);
        handle_flags(analog, floatval, &exponent, info_local);
 
-       analog->encoding->digits  = -exponent;
+       analog->encoding->digits = -exponent;
        analog->spec->spec_digits = -exponent;
 
        return SR_OK;