From 8baea03abc86c63f592a51eed230ab5f28a1ab52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=A4fele?= Date: Fri, 30 Mar 2018 18:14:49 +0200 Subject: [PATCH] Remove checkbox for setting pwm frequency --- hardware/pigpiod/locales/en-US/pi-gpiod.json | 4 +-- hardware/pigpiod/pi-gpiod.html | 26 +------------------- hardware/pigpiod/pi-gpiod.js | 2 +- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/hardware/pigpiod/locales/en-US/pi-gpiod.json b/hardware/pigpiod/locales/en-US/pi-gpiod.json index 865a7a39..dcd605ce 100644 --- a/hardware/pigpiod/locales/en-US/pi-gpiod.json +++ b/hardware/pigpiod/locales/en-US/pi-gpiod.json @@ -7,7 +7,6 @@ "resistor": "Resistor?", "readinitial": "Read initial state of pin on deploy/restart?", "type": "Type", - "setfreq": "Set frequency?", "freq": "Frequency", "initpin": "Initialise pin state?", "debounce": "Debounce", @@ -34,8 +33,7 @@ "pin": "Pins in Use: ", "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", + "pwm": "PWM output - input must be between 0 to 100.
Frequency must be in between 5 and 40000 Hz.", "ser": "Servo output - input must be between 0 to 100. 50 is centre.
Min must be 500uS or more, Max must be 2500uS or less." }, "types": { diff --git a/hardware/pigpiod/pi-gpiod.html b/hardware/pigpiod/pi-gpiod.html index eee85ff6..de458b00 100644 --- a/hardware/pigpiod/pi-gpiod.html +++ b/hardware/pigpiod/pi-gpiod.html @@ -381,11 +381,6 @@ -
- - - -
Hz @@ -419,7 +414,6 @@
-
Pins marked in blue are dual use. Make sure they are not enabled for their other use before using as GPIO.
@@ -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); diff --git a/hardware/pigpiod/pi-gpiod.js b/hardware/pigpiod/pi-gpiod.js index 3414f83f..16dbd635 100644 --- a/hardware/pigpiod/pi-gpiod.js +++ b/hardware/pigpiod/pi-gpiod.js @@ -153,7 +153,7 @@ module.exports = function(RED) { if (node.setfreq) { PiGPIO.set_PWM_frequency(node.pin,node.freq); } - //PiGPIO.set_PWM_range(node.pin,1000); + //PiGPIO.set_PWM_range(node.pin,1000); } }); }