addInput(new Form_StaticText(
'Notes',
'Devices with a Pulse Per Second output such as radios that receive a time signal from DCF77 (DE), JJY (JP), MSF (GB) or WWVB (US) may be used as a PPS reference for NTP. ' .
'A serial GPS may also be used, but the serial GPS driver would usually be the better option. ' .
'A PPS signal only provides a reference to the change of a second, so at least one other source to number the seconds is required.' . '
' .
'At least 3 additional time sources should be configured under ' .
'' . 'Services > NTP' . '' . ' to reliably supply the time of each PPS pulse.'
));
$serialports = glob("/dev/cua?[0-9]{,.[0-9]}", GLOB_BRACE);
if (!empty($serialports)) {
$splist = array();
foreach ($serialports as $port) {
$shortport = substr($port, 5);
$splist[$shortport] = $shortport;
}
$section->addInput(new Form_Select(
'ppsport',
'Serial Port',
$pconfig['port'],
$splist
))->setHelp('All serial ports are listed, be sure to pick the port with the PPS source attached. ');
}
$section->addInput(new Form_Input(
'ppsfudge1',
'Fudge Time',
'text',
$pconfig['fudge1']
))->setHelp('Fudge time is used to specify the PPS signal offset from the actual second such as the transmission delay between the transmitter and the receiver. (default: 0.0).');
$section->addInput(new Form_Input(
'ppsstratum',
'Stratum',
'text',
$pconfig['stratum']
))->setHelp('This may be used to change the PPS Clock stratum (default: 0). This may be useful if, for some reason, you want ntpd to prefer a different clock and just monitor this source.');
$section->addInput(new Form_Checkbox(
'ppsflag2',
'Flags',
'Enable falling edge PPS signal processing (default: unchecked, rising edge).',
$pconfig['flag2']
));
$section->addInput(new Form_Checkbox(
'ppsflag3',
null,
'Enable kernel PPS clock discipline (default: unchecked).',
$pconfig['flag3']
));
$section->addInput(new Form_Checkbox(
'ppsflag4',
null,
'Record a timestamp once for each second, useful for constructing Allan deviation plots (default: unchecked).',
$pconfig['flag4']
));
$section->addInput(new Form_Input(
'ppsrefid',
'Clock ID',
'text',
$pconfig['refid'],
['placeholder' => '1 to 4 characters']
))->setHelp('This may be used to change the PPS Clock ID (default: PPS).');
$form->add($section);
print($form);
include("foot.inc");