Skip to content

Pass required callback function for i2c write#16

Open
cthayer wants to merge 1 commit intotechniq:masterfrom
cthayer:patch-1
Open

Pass required callback function for i2c write#16
cthayer wants to merge 1 commit intotechniq:masterfrom
cthayer:patch-1

Conversation

@cthayer
Copy link

@cthayer cthayer commented Sep 3, 2017

i2c library requires a callback function when calling the write function.

Passing a noop function to avoid the following error when initializing the i2c reader:

.../node_modules/i2c/lib/i2c.coffee:88
          return callback(err);
                 ^

TypeError: callback is not a function
  at Immediate.<anonymous> (.../node_modules/i2c/lib/i2c.coffee:54:9)
  at runCallback (timers.js:672:20)
  at tryOnImmediate (timers.js:645:5)
  at processImmediate [as _immediateCallback] (timers.js:617:5)

`i2c` library requires a callback function when calling the `write` function.

Passing a `noop` function to avoid the following error when initializing the i2c reader:

```
.../node_modules/i2c/lib/i2c.coffee:88
          return callback(err);
                 ^

TypeError: callback is not a function
  at Immediate.<anonymous> (.../node_modules/i2c/lib/i2c.coffee:54:9)
  at runCallback (timers.js:672:20)
  at tryOnImmediate (timers.js:645:5)
  at processImmediate [as _immediateCallback] (timers.js:617:5)
```
@cthayer cthayer mentioned this pull request Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant