Project

General

Profile

0426-Include-AirSpy-serial-in-connect-message.patch

dreinhold, 07/24/2018 03:06 AM

View differences:

lib/airspy/airspy_source_c.cc
112 112
  memset(version, 0, sizeof(version));
113 113
  ret = airspy_version_string_read( _dev, version, sizeof(version));
114 114
  AIRSPY_THROW_ON_ERROR(ret, "Failed to read version string")
115
#if 0
116 115
  airspy_read_partid_serialno_t part_serial;
117 116
  ret = airspy_board_partid_serialno_read( _dev, &part_serial );
118
  AIRSPY_THROW_ON_ERROR(ret, "Failed to read serial number")
119
#endif
117
  AIRSPY_THROW_ON_ERROR(ret, "Failed to read serial number");
118
  char serial_number[17];
119
  memset(serial_number, 0, sizeof(serial_number));
120
  sprintf(serial_number, "%08X%08X", part_serial.serial_no[2], part_serial.serial_no[3]);
120 121
  uint32_t num_rates;
121 122
  airspy_get_samplerates(_dev, &num_rates, 0);
122 123
  uint32_t *samplerates = (uint32_t *) malloc(num_rates * sizeof(uint32_t));
......
129 130
   * to play nice with the monotonic requirement of meta-range later on */
130 131
  std::sort(_sample_rates.begin(), _sample_rates.end());
131 132

  
132
  std::cerr << "Using " << version << ", samplerates: ";
133
  std::cerr << "Using " << version << ", serial: 0x" << serial_number <<", samplerates: ";
133 134

  
134 135
  for (size_t i = 0; i < _sample_rates.size(); i++)
135 136
    std::cerr << boost::format("%gM ") % (_sample_rates[i].first / 1e6);
136
- 
Add picture from clipboard (Maximum size: 48.8 MB)