fix default socket options for mcp230xxi so socket name only need include the word 'interrupt'
parent
5c57e614e9
commit
ab71ebc518
|
@ -24,7 +24,7 @@ class MCP230XXi extends MCP230XX {
|
|||
}
|
||||
// set the required interrupt consumer to the default options if none supplied
|
||||
if (!opts.sockets) opts.sockets = [ interrupt ]
|
||||
else if (!opts.sockets.find(socket=>socket.name==='interrupt')) {
|
||||
else if (!opts.sockets.find(socket=>socket.name.includes('interrupt'))) {
|
||||
opts.sockets.push(interrupt)
|
||||
}
|
||||
super(opts)
|
||||
|
|
Loading…
Reference in New Issue