Added QuinLED-ESP32-Ethernet type
Set 19531 as default ESP32 PWM frequency
This commit is contained in:
parent
06f2f9adbb
commit
2c0b07387b
@ -193,7 +193,7 @@ class BusPwm : public Bus {
|
|||||||
|
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
analogWriteRange(255); //same range as one RGB channel
|
analogWriteRange(255); //same range as one RGB channel
|
||||||
analogWriteFreq(WLED_PWM_FREQ_ESP8266);
|
analogWriteFreq(WLED_PWM_FREQ);
|
||||||
#else
|
#else
|
||||||
_ledcStart = pinManager.allocateLedc(numPins);
|
_ledcStart = pinManager.allocateLedc(numPins);
|
||||||
if (_ledcStart == 255) { //no more free LEDC channels
|
if (_ledcStart == 255) { //no more free LEDC channels
|
||||||
@ -209,7 +209,7 @@ class BusPwm : public Bus {
|
|||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
pinMode(_pins[i], OUTPUT);
|
pinMode(_pins[i], OUTPUT);
|
||||||
#else
|
#else
|
||||||
ledcSetup(_ledcStart + i, WLED_PWM_FREQ_ESP32, 8);
|
ledcSetup(_ledcStart + i, WLED_PWM_FREQ, 8);
|
||||||
ledcAttachPin(_pins[i], _ledcStart + i);
|
ledcAttachPin(_pins[i], _ledcStart + i);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -138,10 +138,13 @@
|
|||||||
#define BTN_TYPE_SWITCH_ACT_HIGH 5 //not implemented
|
#define BTN_TYPE_SWITCH_ACT_HIGH 5 //not implemented
|
||||||
|
|
||||||
//Ethernet board types
|
//Ethernet board types
|
||||||
|
#define WLED_NUM_ETH_TYPES 5
|
||||||
|
|
||||||
#define WLED_ETH_NONE 0
|
#define WLED_ETH_NONE 0
|
||||||
#define WLED_ETH_WT32_ETH01 1
|
#define WLED_ETH_WT32_ETH01 1
|
||||||
#define WLED_ETH_ESP32_POE 2
|
#define WLED_ETH_ESP32_POE 2
|
||||||
#define WLED_ETH_WESP32 3
|
#define WLED_ETH_WESP32 3
|
||||||
|
#define WLED_ETH_QUINLED 4
|
||||||
|
|
||||||
//Hue error codes
|
//Hue error codes
|
||||||
#define HUE_ERROR_INACTIVE 0
|
#define HUE_ERROR_INACTIVE 0
|
||||||
@ -201,9 +204,13 @@
|
|||||||
#define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit
|
#define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit
|
||||||
|
|
||||||
// PWM settings
|
// PWM settings
|
||||||
#define WLED_PWM_FREQ_ESP8266 880 //PWM frequency proven as good for LEDs
|
#ifndef WLED_PWM_FREQ
|
||||||
#define WLED_PWM_FREQ_ESP32 5000
|
#ifdef ESP8266
|
||||||
|
#define WLED_PWM_FREQ 880 //PWM frequency proven as good for LEDs
|
||||||
|
#else
|
||||||
|
#define WLED_PWM_FREQ 19531
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TOUCH_THRESHOLD 32 // limit to recognize a touch, higher value means more sensitive
|
#define TOUCH_THRESHOLD 32 // limit to recognize a touch, higher value means more sensitive
|
||||||
|
|
||||||
|
@ -68,9 +68,11 @@
|
|||||||
<h3>Ethernet Type</h3>
|
<h3>Ethernet Type</h3>
|
||||||
<select name="ETH">
|
<select name="ETH">
|
||||||
<option value="0">None</option>
|
<option value="0">None</option>
|
||||||
|
<option value="2">ESP32-POE</option>
|
||||||
|
<option value="4">QuinLED-ESP32</option>
|
||||||
|
<option value="3">WESP32</option>
|
||||||
<option value="1">WT32-ETH01</option>
|
<option value="1">WT32-ETH01</option>
|
||||||
<option value="2">ESP32-POE</option>
|
</select><br><br></div>
|
||||||
<option value="3">WESP32</option></select><br><br></div>
|
|
||||||
<hr>
|
<hr>
|
||||||
<button type="button" onclick="B()">Back</button><button type="submit">Save & Connect</button>
|
<button type="button" onclick="B()">Back</button><button type="submit">Save & Connect</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -63,10 +63,10 @@ Disable WiFi sleep: <input type="checkbox" name="WS"><br><i>
|
|||||||
Can help with connectivity issues.<br>
|
Can help with connectivity issues.<br>
|
||||||
Do not enable if WiFi is working correctly, increases power consumption.</i><div
|
Do not enable if WiFi is working correctly, increases power consumption.</i><div
|
||||||
id="ethd"><h3>Ethernet Type</h3><select name="ETH"><option value="0">None
|
id="ethd"><h3>Ethernet Type</h3><select name="ETH"><option value="0">None
|
||||||
</option><option value="1">WT32-ETH01</option><option value="2">ESP32-POE
|
</option><option value="2">ESP32-POE</option><option value="4">QuinLED-ESP32
|
||||||
</option><option value="3">WESP32</option></select><br><br></div><hr><button
|
</option><option value="3">WESP32</option><option value="1">WT32-ETH01</option>
|
||||||
type="button" onclick="B()">Back</button><button type="submit">Save & Connect
|
</select><br><br></div><hr><button type="button" onclick="B()">Back</button>
|
||||||
</button></form></body></html>)=====";
|
<button type="submit">Save & Connect</button></form></body></html>)=====";
|
||||||
|
|
||||||
|
|
||||||
// Autogenerated from wled00/data/settings_leds.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_leds.htm, do not edit!!
|
||||||
|
@ -58,6 +58,16 @@ ethernet_settings ethernetBoards[] = {
|
|||||||
17, // eth_mdio,
|
17, // eth_mdio,
|
||||||
ETH_PHY_LAN8720, // eth_type,
|
ETH_PHY_LAN8720, // eth_type,
|
||||||
ETH_CLOCK_GPIO0_IN // eth_clk_mode
|
ETH_CLOCK_GPIO0_IN // eth_clk_mode
|
||||||
|
},
|
||||||
|
|
||||||
|
// QuinLed-ESP32-Ethernet
|
||||||
|
{
|
||||||
|
0, // eth_address,
|
||||||
|
5, // eth_power,
|
||||||
|
23, // eth_mdc,
|
||||||
|
18, // eth_mdio,
|
||||||
|
ETH_PHY_LAN8720, // eth_type, (confirm this is right?)
|
||||||
|
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -439,7 +449,7 @@ void WLED::initConnection()
|
|||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_ETHERNET)
|
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_ETHERNET)
|
||||||
// Only initialize ethernet board if not NONE
|
// Only initialize ethernet board if not NONE
|
||||||
if (ethernetType != WLED_ETH_NONE) {
|
if (ethernetType != WLED_ETH_NONE && ethernetType < WLED_NUM_ETH_TYPES) {
|
||||||
ethernet_settings es = ethernetBoards[ethernetType];
|
ethernet_settings es = ethernetBoards[ethernetType];
|
||||||
ETH.begin(
|
ETH.begin(
|
||||||
(uint8_t) es.eth_address,
|
(uint8_t) es.eth_address,
|
||||||
|
@ -220,7 +220,7 @@ void getSettingsJS(byte subPage, char* dest)
|
|||||||
sappend('c',SET_F("WS"),noWifiSleep);
|
sappend('c',SET_F("WS"),noWifiSleep);
|
||||||
|
|
||||||
#ifdef WLED_USE_ETHERNET
|
#ifdef WLED_USE_ETHERNET
|
||||||
sappend('i',SET_F("ETH"),ethernetType);
|
sappend('v',SET_F("ETH"),ethernetType);
|
||||||
#else
|
#else
|
||||||
//hide ethernet setting if not compiled in
|
//hide ethernet setting if not compiled in
|
||||||
oappend(SET_F("document.getElementById('ethd').style.display='none';"));
|
oappend(SET_F("document.getElementById('ethd').style.display='none';"));
|
||||||
|
Loading…
Reference in New Issue
Block a user