diff options
| author | Brent Stapleton <brent.stapleton@ettus.com> | 2018-12-21 10:27:42 -0800 | 
|---|---|---|
| committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-03 09:20:18 -0800 | 
| commit | 7d34f4d2c8e3ae63f7f217be7700d20e5c8823a7 (patch) | |
| tree | 3648f53aa9479bba0b40b9496688d039224c880a /host/examples | |
| parent | a7bd625203816837cd25ca06f79bef22caf4fa90 (diff) | |
| download | uhd-7d34f4d2c8e3ae63f7f217be7700d20e5c8823a7.tar.gz uhd-7d34f4d2c8e3ae63f7f217be7700d20e5c8823a7.tar.bz2 uhd-7d34f4d2c8e3ae63f7f217be7700d20e5c8823a7.zip  | |
examples: formatting in tx_waveforms
- Format `if` statements to multiple lines
- Add quick comment on the exit checks
Diffstat (limited to 'host/examples')
| -rw-r--r-- | host/examples/tx_waveforms.cpp | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index a002720ee..d5e4cb6f5 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -241,8 +241,14 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){      uint64_t num_acc_samps = 0;      while(true){ -        if (stop_signal_called) break; -        if (total_num_samps > 0 and num_acc_samps >= total_num_samps) break; +        // Break on the end of duration or CTRL-C +        if (stop_signal_called) { +            break; +        } +        // Break when we've received nsamps +        if (total_num_samps > 0 and num_acc_samps >= total_num_samps) { +            break; +        }          //fill the buffer with the waveform          for (size_t n = 0; n < buff.size(); n++){  | 
