File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ function loadPinmux()
4141 pin . info = [ "reserved" ]
4242 pin . type = "reserved"
4343 pin . description = ""
44- pin . overlay = ""
44+ pin . overlay = [ ]
4545 pin . gpioDirection = "unmodified"
4646 pin . gpioValue = "unmodified"
4747 pin . kernelPinNumber = 0
@@ -342,9 +342,17 @@ function saveConfig(fileName) {
342342 var sourcePin = portList [ i ] . pinList [ j ]
343343 var pin = j + 1
344344
345- if ( ( sourcePin . overlay === "" ) || ( sourcePin . type === "reserved" ) ) // this is a reserved pin
345+ if ( ( sourcePin . overlay === [ ] ) || ( sourcePin . type === "reserved" ) ) // this is a reserved pin
346346 continue
347- if ( sourcePin . loadedOverlays . indexOf ( sourcePin . overlay ) === - 1 ) // overlay not loaded
347+
348+ var contained = false
349+ for ( var k = 0 ; k < sourcePin . overlay . length ; ++ k ) {
350+ if ( sourcePin . loadedOverlays . indexOf ( sourcePin . overlay [ k ] ) !== - 1 ) { // overlay not loaded
351+ contained = true
352+ break
353+ }
354+ }
355+ if ( ! contained ) // overlay not loaded
348356 continue
349357
350358 var pinName = "P" + port + "_" + pin
You can’t perform that action at this time.
0 commit comments