summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2011-04-08 14:59:46 -0700
committerJosh Blum <josh@joshknows.com>2011-04-29 09:58:54 -0700
commita4aa89ed5d73b6afa5d2d28d8f2b6cc206baf22d (patch)
tree216703a0056e4634ef85b14a08a7386a9670e5d2 /host/lib/usrp/usrp2
parent4df082cb4eb6659d76dd9a38988033c82c662fa9 (diff)
downloaduhd-a4aa89ed5d73b6afa5d2d28d8f2b6cc206baf22d.tar.gz
uhd-a4aa89ed5d73b6afa5d2d28d8f2b6cc206baf22d.tar.bz2
uhd-a4aa89ed5d73b6afa5d2d28d8f2b6cc206baf22d.zip
USRP2: Added GPS time support to the sensors interface. gps_time sensor returns epoch time as time_t. Untested.
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 520ee49a6..7a756087a 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -372,7 +372,11 @@ void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){
else if(key.name == "ref_locked") {
val = sensor_value_t("Ref", this->get_ref_locked(), "locked", "unlocked");
return;
- } else {
+ }
+ else if(key.name == "gps_time") {
+ val = sensor_value_t("GPS time", int(_gps_ctrl->get_epoch_time()), "seconds");
+ }
+ else {
UHD_THROW_PROP_GET_ERROR();
}
break;