mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Remove checkbox for setting pwm frequency
This commit is contained in:
committed by
Philipp Häfele
parent
cda6eec3ab
commit
8baea03abc
@@ -381,11 +381,6 @@
|
||||
<option value="ser" data-i18n="pi-gpiod.servo"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row" id="node-set-freq-tick">
|
||||
<label> </label>
|
||||
<input type="checkbox" id="node-input-setfreq" style="display:inline-block; width:auto; vertical-align:top;">
|
||||
<label for="node-input-setfreq" style="width:70%;"><span data-i18n="pi-gpiod.label.setfreq"></span></label>
|
||||
</div>
|
||||
<div class="form-row" id="node-set-frequency">
|
||||
<label> <span data-i18n="pi-gpiod.label.freq"></label>
|
||||
<input type="text" id="node-input-freq" style="width:70px;"> Hz
|
||||
@@ -419,7 +414,6 @@
|
||||
</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>
|
||||
@@ -492,7 +486,7 @@
|
||||
$('#node-set-tick').hide();
|
||||
$('#node-set-state').hide();
|
||||
$('#node-input-set').prop('checked', false);
|
||||
$('#node-set-freq-tick').show();
|
||||
$("#node-set-frequency").show();
|
||||
$('#node-set-minimax').hide();
|
||||
$("#dig-tip").hide();
|
||||
$("#pwm-tip").show();
|
||||
@@ -502,24 +496,18 @@
|
||||
$('#node-set-tick').hide();
|
||||
$('#node-set-state').hide();
|
||||
$('#node-input-set').prop('checked', false);
|
||||
$('#node-set-freq-tick').hide();
|
||||
$("#node-set-frequency").hide();
|
||||
$('#node-input-setfreq').prop('checked', false);
|
||||
$('#node-set-minimax').show();
|
||||
$("#dig-tip").hide();
|
||||
$("#pwm-tip").hide();
|
||||
$("#freq-tip").hide();
|
||||
$("#ser-tip").show();
|
||||
}
|
||||
else {
|
||||
$('#node-set-tick').show();
|
||||
$('#node-set-freq-tick').hide();
|
||||
$("#node-set-frequency").hide();
|
||||
$('#node-input-setfreq').prop('checked', false);
|
||||
$('#node-set-minimax').hide();
|
||||
$("#dig-tip").show();
|
||||
$("#pwm-tip").hide();
|
||||
$("#freq-tip").hide();
|
||||
$("#ser-tip").hide();
|
||||
}
|
||||
};
|
||||
@@ -536,18 +524,6 @@
|
||||
$("#node-input-set").change(function () { setstate(); });
|
||||
setstate();
|
||||
|
||||
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(); });
|
||||
setfreqstate();
|
||||
|
||||
$('#pinform input').on('change', function() {
|
||||
this.pin = $("#pinform input[type='radio']:checked").val();
|
||||
$("#node-input-pin").val(this.pin);
|
||||
|
Reference in New Issue
Block a user