Add tip for frequency setting

This commit is contained in:
Philipp Häfele 2018-03-30 12:09:40 +02:00
parent 0984f91f8b
commit 26b9588ba6
2 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,7 @@
"in": "Only Digital Input is supported - input must be 0 or 1.",
"dig": "Digital output - input must be 0 or 1.",
"pwm": "PWM output - input must be between 0 to 100.",
"freq": "Frequency must be in between 5 and 40000 Hz",
"ser": "Servo output - input must be between 0 to 100. 50 is centre.<br/>Min must be 500uS or more, Max must be 2500uS or less."
},
"types": {

View File

@ -419,6 +419,7 @@
</div>
<div class="form-tips" id="dig-tip"><span data-i18n="[html]pi-gpiod.tip.dig"></span></div>
<div class="form-tips" id="pwm-tip"><span data-i18n="[html]pi-gpiod.tip.pwm"></span></div>
<div class="form-tips" id="freq-tip"><span data-i18n="[html]pi-gpiod.tip.freq"></span></div>
<div class="form-tips" id="ser-tip"><span data-i18n="[html]pi-gpiod.tip.ser"></span></div>
<div class="form-tips" id="pin-tip">Pins marked in blue are dual use. Make sure they are not enabled for
their other use before using as GPIO.</div>
@ -507,6 +508,7 @@
$('#node-set-minimax').show();
$("#dig-tip").hide();
$("#pwm-tip").hide();
$("#freq-tip").hide();
$("#ser-tip").show();
}
else {
@ -517,6 +519,7 @@
$('#node-set-minimax').hide();
$("#dig-tip").show();
$("#pwm-tip").hide();
$("#freq-tip").hide();
$("#ser-tip").hide();
}
};
@ -536,8 +539,10 @@
var setfreqstate = function () {
if ($('#node-input-setfreq').is(":checked")) {
$("#node-set-frequency").show();
$("#freq-tip").show();
} else {
$("#node-set-frequency").hide();
$("#freq-tip").hide();
}
};
$("#node-input-setfreq").change(function () { setfreqstate(); });