Explicitly set default values for all configurable options.
Make it easier to find out the compiled-in defaults in the code and set all options in default.cfg. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>master
parent
937f3aec5b
commit
e3a9535dff
|
@ -23,6 +23,7 @@ announceReceiptTimeout 3
|
||||||
#
|
#
|
||||||
# Run time options
|
# Run time options
|
||||||
#
|
#
|
||||||
|
assume_two_step 0
|
||||||
logging_level 6
|
logging_level 6
|
||||||
path_trace_enabled 0
|
path_trace_enabled 0
|
||||||
follow_up_info 0
|
follow_up_info 0
|
||||||
|
|
6
pi.c
6
pi.c
|
@ -32,9 +32,9 @@
|
||||||
#define NSEC_PER_SEC 1000000000
|
#define NSEC_PER_SEC 1000000000
|
||||||
|
|
||||||
/* These two take their values from the configuration file. (see ptp4l.c) */
|
/* These two take their values from the configuration file. (see ptp4l.c) */
|
||||||
double configured_pi_kp;
|
double configured_pi_kp = 0.0;
|
||||||
double configured_pi_ki;
|
double configured_pi_ki = 0.0;
|
||||||
double configured_pi_offset;
|
double configured_pi_offset = 0.0;
|
||||||
|
|
||||||
struct pi_servo {
|
struct pi_servo {
|
||||||
struct servo servo;
|
struct servo servo;
|
||||||
|
|
6
ptp4l.c
6
ptp4l.c
|
@ -32,18 +32,21 @@
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
int assume_two_step;
|
int assume_two_step = 0;
|
||||||
|
|
||||||
static int running = 1;
|
static int running = 1;
|
||||||
|
|
||||||
static struct config cfg_settings = {
|
static struct config cfg_settings = {
|
||||||
.dds = {
|
.dds = {
|
||||||
|
.twoStepFlag = TRUE,
|
||||||
.slaveOnly = FALSE,
|
.slaveOnly = FALSE,
|
||||||
.priority1 = 128,
|
.priority1 = 128,
|
||||||
.clockQuality.clockClass = 248,
|
.clockQuality.clockClass = 248,
|
||||||
.clockQuality.clockAccuracy = 0xfe,
|
.clockQuality.clockAccuracy = 0xfe,
|
||||||
.clockQuality.offsetScaledLogVariance = 0xffff,
|
.clockQuality.offsetScaledLogVariance = 0xffff,
|
||||||
.priority2 = 128,
|
.priority2 = 128,
|
||||||
|
.domainNumber = 0,
|
||||||
|
.free_running = 0,
|
||||||
.freq_est_interval = 1,
|
.freq_est_interval = 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -56,6 +59,7 @@ static struct config cfg_settings = {
|
||||||
.transportSpecific = 0,
|
.transportSpecific = 0,
|
||||||
.path_trace_enabled = 0,
|
.path_trace_enabled = 0,
|
||||||
.follow_up_info = 0,
|
.follow_up_info = 0,
|
||||||
|
.freq_est_interval = 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
.timestamping = TS_HARDWARE,
|
.timestamping = TS_HARDWARE,
|
||||||
|
|
Loading…
Reference in New Issue