]> sigrok.org Git - libsigrok.git/blobdiff - src/dmm/fs9721.c
output/csv: use intermediate time_t var, silence compiler warning
[libsigrok.git] / src / dmm / fs9721.c
index d4a857d367d75b7c59d63967175a06c93b6aee3f..392e37e75f2ff0d842ace56c59686a86e9f80997 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)
@@ -354,7 +353,7 @@ SR_PRIV int sr_fs9721_parse(const uint8_t *buf, float *floatval,
        int ret, exponent = 0;
        struct fs9721_info *info_local;
 
-       info_local = (struct fs9721_info *)info;
+       info_local = info;
 
        if ((ret = parse_value(buf, floatval, &exponent)) != SR_OK) {
                sr_dbg("Error parsing value: %d.", ret);
@@ -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;
@@ -374,7 +373,7 @@ SR_PRIV void sr_fs9721_00_temp_c(struct sr_datafeed_analog *analog, void *info)
 {
        struct fs9721_info *info_local;
 
-       info_local = (struct fs9721_info *)info;
+       info_local = info;
 
        /* User-defined FS9721_LP3 flag 'c2c1_00' means temperature (C). */
        if (info_local->is_c2c1_00) {
@@ -387,7 +386,7 @@ SR_PRIV void sr_fs9721_01_temp_c(struct sr_datafeed_analog *analog, void *info)
 {
        struct fs9721_info *info_local;
 
-       info_local = (struct fs9721_info *)info;
+       info_local = info;
 
        /* User-defined FS9721_LP3 flag 'c2c1_01' means temperature (C). */
        if (info_local->is_c2c1_01) {
@@ -400,7 +399,7 @@ SR_PRIV void sr_fs9721_10_temp_c(struct sr_datafeed_analog *analog, void *info)
 {
        struct fs9721_info *info_local;
 
-       info_local = (struct fs9721_info *)info;
+       info_local = info;
 
        /* User-defined FS9721_LP3 flag 'c2c1_10' means temperature (C). */
        if (info_local->is_c2c1_10) {
@@ -413,7 +412,7 @@ SR_PRIV void sr_fs9721_01_10_temp_f_c(struct sr_datafeed_analog *analog, void *i
 {
        struct fs9721_info *info_local;
 
-       info_local = (struct fs9721_info *)info;
+       info_local = info;
 
        /* User-defined FS9721_LP3 flag 'c2c1_01' means temperature (F). */
        if (info_local->is_c2c1_01) {
@@ -432,7 +431,7 @@ SR_PRIV void sr_fs9721_max_c_min(struct sr_datafeed_analog *analog, void *info)
 {
        struct fs9721_info *info_local;
 
-       info_local = (struct fs9721_info *)info;
+       info_local = info;
 
        /* User-defined FS9721_LP3 flag 'c2c1_00' means MAX. */
        if (info_local->is_c2c1_00)