summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Burnicki <martin.burnicki@meinberg.de>2022-08-24 16:57:44 +0200
committerMartin Burnicki <martin.burnicki@meinberg.de>2022-08-24 16:57:44 +0200
commita83fdff44a5eef739cda034fc24b5de0e9e2a61d (patch)
treea199b9aa09bced2d77010462044a35008e81e4f9
parent0b41ca6d8a25c68ffe9f34f4371b1ae9a15a41ae (diff)
downloadmbgtools-lx-a83fdff44a5eef739cda034fc24b5de0e9e2a61d.tar.gz
mbgtools-lx-a83fdff44a5eef739cda034fc24b5de0e9e2a61d.zip
Use feature check functions instead of macros in mbgsvcd
-rw-r--r--mbgsvcd/mbgsvcd.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/mbgsvcd/mbgsvcd.c b/mbgsvcd/mbgsvcd.c
index 2a5f031..bb176f3 100644
--- a/mbgsvcd/mbgsvcd.c
+++ b/mbgsvcd/mbgsvcd.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgsvcd.c 1.17 2021/12/01 19:06:54 martin.burnicki REL_M $
+ * $Id: mbgsvcd.c 1.18 2022/08/24 14:12:23 martin.burnicki REL_M $
*
* Main file for mbgsvcd which compares the system time to the
* time from a Meinberg device, and feeds these data pairs
@@ -9,6 +9,8 @@
*
* -----------------------------------------------------------------------
* $Log: mbgsvcd.c $
+ * Revision 1.18 2022/08/24 14:12:23 martin.burnicki
+ * Use feature check functions instead of macros.
* Revision 1.17 2021/12/01 19:06:54 martin.burnicki
* Cleaned up conditional support for serial devices.
* Added conditional support for PPS.
@@ -1096,10 +1098,7 @@ void prepare_bus_level_devices( void )
// Check if the device supports HR time.
p_ds->rc = mbg_chk_dev_has_hr_time( p_ds->dh );
- // TODO The call above does not yet work for SYN1588 devices,
- // so we also try by _pcps_has_hr_time(), which should return
- // true for these devices.
- if ( mbg_rc_is_error( p_ds->rc ) && !_pcps_has_hr_time( &p_ds->dev_info ) )
+ if ( mbg_rc_is_error( p_ds->rc ) )
{
mbg_log( LOG_WARNING, "Device %s does not support HR time stamps.",
_pcps_type_name( &p_ds->dev_info ) );
@@ -1109,7 +1108,7 @@ void prepare_bus_level_devices( void )
// Determine precision depending on the device type.
- if ( _pcps_is_lwr( &p_ds->dev_info ) )
+ if ( mbg_rc_is_success( mbg_chk_dev_is_lwr( p_ds->dh ) ) )
{
// Any kind of long wave receiver.
// TODO May be better if PZF is supported and used.
@@ -1117,7 +1116,7 @@ void prepare_bus_level_devices( void )
}
else
{
- if ( _pcps_is_irig_rx( &p_ds->dev_info ) )
+ if ( mbg_rc_is_success( mbg_chk_dev_is_tcr( p_ds->dh ) ) )
{
if ( _pcps_is_usb( &p_ds->dev_info ) )
ntp_precision = -10; // IRIG receiver connected via USB.