diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 13:07:56 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 13:07:56 -0700 |
commit | 5ab3f053529bb8d85a7f1ba9e1dd113c1f6eb813 (patch) | |
tree | 71f0ebf7479de5bbdcf5f6ea3c9e39c0190a5269 /host/lib/usrp/usrp2/gps_ctrl.cpp | |
parent | d96e9f907e17900a59247ba6d28d33c26a1c4468 (diff) | |
download | uhd-5ab3f053529bb8d85a7f1ba9e1dd113c1f6eb813.tar.gz uhd-5ab3f053529bb8d85a7f1ba9e1dd113c1f6eb813.tar.bz2 uhd-5ab3f053529bb8d85a7f1ba9e1dd113c1f6eb813.zip |
GPS interface works for Jackson Labs devices.
Diffstat (limited to 'host/lib/usrp/usrp2/gps_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/gps_ctrl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/gps_ctrl.cpp b/host/lib/usrp/usrp2/gps_ctrl.cpp index 5c015be14..7152800aa 100644 --- a/host/lib/usrp/usrp2/gps_ctrl.cpp +++ b/host/lib/usrp/usrp2/gps_ctrl.cpp @@ -42,9 +42,10 @@ public: //TODO: try multiple baud rates (many GPS's are set up for 4800bps, you're fixed at 115200bps 8N1 right now) //you have to poke registers in order to set baud rate, there's no dude/bro interface for it - _iface->write_uart(GPS_UART, "HAAAY GUYYYYS\n"); + _iface->write_uart(GPS_UART, "HAAAY GUYYYYS\n"); try { reply = _iface->read_uart(GPS_UART, 20); + //std::cerr << "Got reply from GPS: " << reply.c_str() << " with length = " << reply.length() << std::endl; } catch (std::runtime_error err) { if(err.what() != std::string("usrp2 no control response")) throw; //sorry can't cope with that else { //we don't actually have a GPS installed @@ -57,6 +58,7 @@ public: switch(gps_type) { case GPS_TYPE_JACKSON_LABS: + std::cerr << "Found a Jackson Labs GPS" << std::endl; //issue some setup stuff so it quits spewing data out when not asked to //none of these should issue replies so we don't bother looking for it _iface->write_uart(GPS_UART, "SYST:COMM:SER:"); |