From: Uwe Hermann Date: Sat, 6 Jul 2019 21:21:22 +0000 (+0200) Subject: hantek-4032l: Cosmetics. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e6bb2984e9c48458f2686be7e5c5e90ad1b95c42;p=libsigrok.git hantek-4032l: Cosmetics. --- diff --git a/src/hardware/hantek-4032l/api.c b/src/hardware/hantek-4032l/api.c index 9da338ab..3dc54ba5 100644 --- a/src/hardware/hantek-4032l/api.c +++ b/src/hardware/hantek-4032l/api.c @@ -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; diff --git a/src/hardware/hantek-4032l/protocol.c b/src/hardware/hantek-4032l/protocol.c index 77afae0e..f3167931 100644 --- a/src/hardware/hantek-4032l/protocol.c +++ b/src/hardware/hantek-4032l/protocol.c @@ -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);