From: Uwe Hermann Date: Tue, 11 Jun 2013 16:55:47 +0000 (+0200) Subject: scanalogic2: Only print actual state changes in the log. X-Git-Tag: libsigrok-0.2.1~67 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=28083961fbbd7ff76ee1199d3aebde21dded77ab;p=libsigrok.git scanalogic2: Only print actual state changes in the log. --- diff --git a/hardware/ikalogic-scanalogic2/protocol.c b/hardware/ikalogic-scanalogic2/protocol.c index d1fb3beb..4ed690b6 100644 --- a/hardware/ikalogic-scanalogic2/protocol.c +++ b/hardware/ikalogic-scanalogic2/protocol.c @@ -292,7 +292,9 @@ SR_PRIV void sl2_receive_transfer_in( struct libusb_transfer *transfer) return; } - sr_spew("State changed from %i to %i.", devc->state, devc->next_state); + if (devc->state != devc->next_state) + sr_spew("State changed from %i to %i.", + devc->state, devc->next_state); devc->state = devc->next_state; if (devc->state == STATE_WAIT_DATA_READY) { @@ -421,7 +423,9 @@ SR_PRIV void sl2_receive_transfer_out( struct libusb_transfer *transfer) return; } - sr_spew("State changed from %i to %i.", devc->state, devc->next_state); + if (devc->state != devc->next_state) + sr_spew("State changed from %i to %i.", + devc->state, devc->next_state); devc->state = devc->next_state; if (devc->state == STATE_IDLE) {