]> sigrok.org Git - libsigrok.git/commitdiff
hantek-4032l: Cosmetics.
authorUwe Hermann <redacted>
Sat, 6 Jul 2019 21:21:22 +0000 (23:21 +0200)
committerUwe Hermann <redacted>
Sat, 6 Jul 2019 21:21:22 +0000 (23:21 +0200)
src/hardware/hantek-4032l/api.c
src/hardware/hantek-4032l/protocol.c

index 9da338ab1cf4a8e5c63836b312587e3dc02e66cf..3dc54ba5967a446dcd4f932e96cc93476b971d4e 100644 (file)
@@ -515,7 +515,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        else
                cmd_pkt->sample_rate = devc->sample_rate;
 
-       /* Set pwm channel values. */
+       /* Set PWM channel values. */
        devc->cmd_pkt.pwm_a = h4032l_voltage2pwm(devc->cur_threshold[0]);
        devc->cmd_pkt.pwm_b = h4032l_voltage2pwm(devc->cur_threshold[1]);
 
@@ -590,7 +590,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                /* Compress range mask value and apply range settings. */
                if (range_mask) {
                        cmd_pkt->trigger[0].flags.data_range_enabled = 1;
-                       cmd_pkt->trigger[0].data_range_mask |= (range_mask);
+                       cmd_pkt->trigger[0].data_range_mask |= range_mask;
 
                        uint32_t new_range_value = 0;
                        uint32_t bit_mask = 1;
index 77afae0e2ec5d6eea5cd456197bd105f15eb0f40..f316793184a4c4b042757cd592b4a41ec8803d38 100644 (file)
@@ -132,7 +132,7 @@ static void send_data(struct sr_dev_inst *sdi,
                sr_session_send(sdi, &trig);
 
                /* Send rest of data. */
-               logic.length = (sample_count-trigger_offset) * sizeof(uint32_t);
+               logic.length = (sample_count - trigger_offset) * sizeof(uint32_t);
                logic.data = data + trigger_offset;
                if (logic.length)
                        sr_session_send(sdi, &packet);