fix default socket options for mcp230xxi so socket name only need include the word 'interrupt'

master
David Kebler 2020-03-24 15:58:47 -07:00
parent 5c57e614e9
commit ab71ebc518
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class MCP230XXi extends MCP230XX {
} }
// set the required interrupt consumer to the default options if none supplied // set the required interrupt consumer to the default options if none supplied
if (!opts.sockets) opts.sockets = [ interrupt ] 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) opts.sockets.push(interrupt)
} }
super(opts) super(opts)