Reduce unnecessarily high indentation level in some places.
This commit is contained in:
parent
2ea67fc9bf
commit
dc89faeace
|
@ -660,7 +660,9 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data)
|
||||||
if (!(devc = sdi->priv))
|
if (!(devc = sdi->priv))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (revents == G_IO_IN) {
|
if (revents != G_IO_IN)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
ch = devc->current_channel->data;
|
ch = devc->current_channel->data;
|
||||||
|
|
||||||
switch (ch->type) {
|
switch (ch->type) {
|
||||||
|
@ -723,7 +725,6 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data)
|
||||||
devc->current_channel = devc->enabled_channels;
|
devc->current_channel = devc->enabled_channels;
|
||||||
hmo_request_data(sdi);
|
hmo_request_data(sdi);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,8 +188,10 @@ SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data)
|
||||||
sdi->driver->dev_acquisition_stop(sdi, cb_data);
|
sdi->driver->dev_acquisition_stop(sdi, cb_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Request next packet, if required. */
|
/* Only request the next packet if required. */
|
||||||
if ((sdi->status == SR_ST_ACTIVE) && (devc->acq_running)){
|
if (!((sdi->status == SR_ST_ACTIVE) && (devc->acq_running)))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
if (devc->acq_req_pending) {
|
if (devc->acq_req_pending) {
|
||||||
gint64 elapsed_us = g_get_monotonic_time() - devc->req_sent_at;
|
gint64 elapsed_us = g_get_monotonic_time() - devc->req_sent_at;
|
||||||
if (elapsed_us > (REQ_TIMEOUT_MS * 1000)) {
|
if (elapsed_us > (REQ_TIMEOUT_MS * 1000)) {
|
||||||
|
@ -197,6 +199,7 @@ SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data)
|
||||||
devc->acq_req_pending = 0;
|
devc->acq_req_pending = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (devc->acq_req_pending == 0) {
|
if (devc->acq_req_pending == 0) {
|
||||||
switch (devc->acq_req) {
|
switch (devc->acq_req) {
|
||||||
case AQ_NONE: /* Fall through */
|
case AQ_NONE: /* Fall through */
|
||||||
|
@ -232,7 +235,6 @@ SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data)
|
||||||
devc->req_sent_at = g_get_real_time();
|
devc->req_sent_at = g_get_real_time();
|
||||||
devc->acq_req_pending = 1;
|
devc->acq_req_pending = 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -619,8 +619,9 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
do bytes_read = ftdi_read_data(devc->ftdic, devc->ftdi_buf, FTDI_BUF_SIZE);
|
do {
|
||||||
while (bytes_read > 0);
|
bytes_read = ftdi_read_data(devc->ftdic, devc->ftdi_buf, FTDI_BUF_SIZE);
|
||||||
|
} while (bytes_read > 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We've acquired all the samples we asked for -- we're done.
|
* We've acquired all the samples we asked for -- we're done.
|
||||||
|
|
|
@ -554,7 +554,9 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
|
||||||
|
|
||||||
scpi = sdi->conn;
|
scpi = sdi->conn;
|
||||||
|
|
||||||
if (revents == G_IO_IN || revents == 0) {
|
if (!(revents == G_IO_IN || revents == 0))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
switch (devc->wait_event) {
|
switch (devc->wait_event) {
|
||||||
case WAIT_NONE:
|
case WAIT_NONE:
|
||||||
break;
|
break;
|
||||||
|
@ -753,7 +755,6 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
|
||||||
sr_session_send(cb_data, &packet);
|
sr_session_send(cb_data, &packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue