Skip to content

Commit 0003897

Browse files
committed
Disable blinky templates for wifi boards
Signed-off-by: paulober <[email protected]>
1 parent eccc938 commit 0003897

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

web/zephyr/main.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ var submitted = false;
136136
{
137137
const boardSelector = document.getElementById("sel-board-type");
138138
const templateSelect = document.getElementById("sel-template");
139+
const blinkyOption = document.getElementById("option-template-blinky");
139140
const wifiOption = document.getElementById("option-template-wifi");
140141

141142
const gpioCheckbox = document.getElementById("gpio-features-cblist");
@@ -175,6 +176,8 @@ var submitted = false;
175176
const applyBoardConstraints = () => {
176177
const supportsWifi = boardSupportsWifi(boardSelector.value);
177178

179+
// temporary disable blinky template for wifi boards until supported by zephyr
180+
setOptionDisabled(blinkyOption, supportsWifi);
178181
setOptionDisabled(wifiOption, !supportsWifi);
179182

180183
if (wifiCheckbox) {
@@ -194,16 +197,27 @@ var submitted = false;
194197
isProgrammatic = false;
195198
}
196199

200+
const fallback = firstEnabledTemplateValue();
201+
197202
// If Wi-Fi template selected on a non-Wi-Fi board, fall back
198203
if (!supportsWifi && templateSelect.value === "wifi") {
199-
const fallback = firstEnabledTemplateValue();
200204
if (fallback && fallback !== "wifi") {
201205
isProgrammatic = true;
202206
templateSelect.value = fallback;
203207
isProgrammatic = false;
204208
templateSelect.dispatchEvent(new Event("change", { bubbles: true }));
205209
}
206210
}
211+
212+
if (supportsWifi && templateSelect.value === "blinky") {
213+
if (fallback && fallback !== "blinky") {
214+
isProgrammatic = true;
215+
templateSelect.value = fallback;
216+
isProgrammatic = false;
217+
templateSelect.dispatchEvent(new Event("change", { bubbles: true }));
218+
}
219+
}
220+
207221
return supportsWifi;
208222
};
209223

0 commit comments

Comments
 (0)