mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-05 04:01:41 +02:00
fixed potential issue while set NRF pin to "off", added "default" behavior
This commit is contained in:
parent
700c5c71e4
commit
e3e141ab57
2 changed files with 5 additions and 5 deletions
|
@ -367,7 +367,7 @@
|
||||||
e.appendChild(lbl(p[1], p[0].toUpperCase()));
|
e.appendChild(lbl(p[1], p[0].toUpperCase()));
|
||||||
if("ESP8266" == type) {
|
if("ESP8266" == type) {
|
||||||
e.appendChild(sel(p[1], [
|
e.appendChild(sel(p[1], [
|
||||||
[255, "off"],
|
[255, "off / default"],
|
||||||
[0, "D3 (GPIO0)"],
|
[0, "D3 (GPIO0)"],
|
||||||
[1, "TX (GPIO1)"],
|
[1, "TX (GPIO1)"],
|
||||||
[2, "D4 (GPIO2)"],
|
[2, "D4 (GPIO2)"],
|
||||||
|
@ -389,7 +389,7 @@
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
e.appendChild(sel(p[1], [
|
e.appendChild(sel(p[1], [
|
||||||
[255, "off"],
|
[255, "off / default"],
|
||||||
[0, "GPIO0"],
|
[0, "GPIO0"],
|
||||||
[1, "TX (GPIO1)"],
|
[1, "TX (GPIO1)"],
|
||||||
[2, "GPIO2 (LED)"],
|
[2, "GPIO2 (LED)"],
|
||||||
|
|
|
@ -393,9 +393,9 @@ void web::showSave(AsyncWebServerRequest *request) {
|
||||||
for(uint8_t i = 0; i < 5; i ++) {
|
for(uint8_t i = 0; i < 5; i ++) {
|
||||||
pin = request->arg(String(pinArgNames[i])).toInt();
|
pin = request->arg(String(pinArgNames[i])).toInt();
|
||||||
switch(i) {
|
switch(i) {
|
||||||
default: mConfig->pinCs = pin; break;
|
default: mConfig->pinCs = ((pin != 0xff) ? pin : DEF_CS_PIN); break;
|
||||||
case 1: mConfig->pinCe = pin; break;
|
case 1: mConfig->pinCe = ((pin != 0xff) ? pin : DEF_CE_PIN); break;
|
||||||
case 2: mConfig->pinIrq = pin; break;
|
case 2: mConfig->pinIrq = ((pin != 0xff) ? pin : DEF_IRQ_PIN); break;
|
||||||
case 3: mConfig->led.led0 = pin; break;
|
case 3: mConfig->led.led0 = pin; break;
|
||||||
case 4: mConfig->led.led1 = pin; break;
|
case 4: mConfig->led.led1 = pin; break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue