X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fdmm%2Fmetex14.c;h=0dd5d2edc8602dada2c4c24666bf818f239d46c2;hb=5a01d09482d06a9b09709c3fed60a3dcfe032b56;hp=8198082ac3e70a4885d57360e39ee08d6b71e95e;hpb=d9251a2c9f1ca4380c27240ccca90c9f9ed46d3f;p=libsigrok.git diff --git a/src/dmm/metex14.c b/src/dmm/metex14.c index 8198082a..0dd5d2ed 100644 --- a/src/dmm/metex14.c +++ b/src/dmm/metex14.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 . */ /** @@ -87,7 +86,7 @@ static int parse_value(const uint8_t *buf, struct metex14_info *info, return SR_OK; /* Bytes 2-8: Sign, value (up to 5 digits) and decimal point */ - sscanf((const char *)&valstr, "%f", result); + sr_atof_ascii((const char *)&valstr, result); dot_pos = strcspn(valstr, "."); if (dot_pos < cnt) @@ -294,7 +293,7 @@ SR_PRIV int sr_metex14_packet_request(struct sr_serial_dev_inst *serial) sr_spew("Requesting DMM packet."); - return (serial_write_nonblocking(serial, &wbuf, 1) == 1) ? SR_OK : SR_ERR; + return serial_write_blocking(serial, &wbuf, 1, 0); } #endif