kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

readByte causes 2 bytes to be read #10

Closed mduitz closed 11 years ago

mduitz commented 11 years ago

i2c.cc In Handle ReadByte(const Arguments& args) { ... int8_t res = i2c_smbus_read_byte(fd);

if (i2c_smbus_read_byte(fd) == -1) {

should be

int8_t res = i2c_smbus_read_byte(fd);

if (res == -1) {

kelly commented 11 years ago

Whoops! Thanks, just fixed and pushed.