]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/testo/protocol.c
Mark some arrays as const
[libsigrok.git] / src / hardware / testo / protocol.c
index eb02f9f8465a8ec13027f7435ca540b31edb6d54..92bb286e1c1ca71d7dab29766918118e2369e4a6 100644 (file)
@@ -170,8 +170,8 @@ SR_PRIV int testo_request_packet(const struct sr_dev_inst *sdi)
  * Testo 175/177/400/650/950/435/635/735/445/645/945/946/545. */
 SR_PRIV gboolean testo_check_packet_prefix(unsigned char *buf, int len)
 {
+       static const unsigned char check[] = { 0x21, 0, 0, 0, 1 };
        int i;
-       unsigned char check[] = { 0x21, 0, 0, 0, 1 };
 
        if (len < 5)
                return FALSE;
@@ -246,7 +246,8 @@ SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi)
 
        packet.type = SR_DF_ANALOG;
        packet.payload = &analog;
-       sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
+       /* TODO: Use proper 'digits' value for this device (and its modes). */
+       sr_analog_init(&analog, &encoding, &meaning, &spec, 2);
        analog.num_samples = 1;
        analog.meaning->mqflags = 0;
        analog.data = &value;