Skip to content

Commit

Permalink
throw exception if incorrect DCDC version were provided
Browse files Browse the repository at this point in the history
  • Loading branch information
sergforce committed Dec 25, 2015
1 parent c9b7e8c commit b362710
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions host/umtrx_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,8 @@ umtrx_impl::umtrx_impl(const device_addr_t &device_addr)
{
detect_hw_dcdc_ver(mb_path);
} else {
if (_hw_dcdc_ver >= DCDC_VER_COUNT)
{
UHD_MSG(status) << "Unknown UmTRX DCDC version " << _hw_dcdc_ver << std::endl;
_hw_dcdc_ver = DCDC_VER_2_3_1_OLD;
}
if (_hw_dcdc_ver != DCDC_VER_2_3_1_OLD)
{
UHD_MSG(status) << "Using DCDC version " << _hw_dcdc_ver << std::endl;
}
UHD_ASSERT_THROW(_hw_dcdc_ver < DCDC_VER_COUNT);
UHD_MSG(status) << "Using DCDC version " << _hw_dcdc_ver << std::endl;
}
_tree->create<int>(mb_path / "hwdcdc_ver").set(_hw_dcdc_ver);

Expand Down

0 comments on commit b362710

Please sign in to comment.