host: Check if DC offset value reads as it's been written to LMS.

We had an issue with GPS 1pps signals disrupting SPI operations,
which was mostly visible during calibratoin, because it takes
many SPI operations to finish. And because the key operation
during calibration is DC offset altering, it's easy to spot when
SPI is working incorrectrly by checking it. It's a useless check
in a normal situation, so I don't want to see this in production
code.
This commit is contained in:
Alexander Chemeris
2015-12-23 21:34:40 -05:00
parent 3c240a2ab2
commit a870e8a16f

View File

@@ -395,6 +395,10 @@ protected:
boost::recursive_mutex::scoped_lock l(_mutex);
if (verbosity>0) printf("lms6002d_ctrl_impl::set_tx_vga1dc_i_int(%d)\n", offset);
lms.set_tx_vga1dc_i_int(offset);
uint8_t old = lms.get_tx_vga1dc_i_int();
if (offset != old) {
lms.dump();
}
return offset;
}
@@ -402,6 +406,10 @@ protected:
boost::recursive_mutex::scoped_lock l(_mutex);
if (verbosity>0) printf("lms6002d_ctrl_impl::set_tx_vga1dc_q_int(%d)\n", offset);
lms.set_tx_vga1dc_q_int(offset);
uint8_t old = lms.get_tx_vga1dc_q_int();
if (offset != old) {
lms.dump();
}
return offset;
}