Skip to content

DemoHelloAPI.init is called again after DeviceAPI.open is called #2

@soundanalogous

Description

@soundanalogous

After a couple of weekends out of town I finally have time to continue testing DeviceFirmata. In attempting to run the DemoHelloAPI example, I see that init is called a second time after DeviceAPI.open is called. I don't see anything in the application flow that would trigger this, but it is what I'm observing. Same for DemoMetaAPI.

This is the error message I get (I added a console log just inside the init function):

soundanalogous:LuniJS soundanalogous$ node examples/DemoHelloAPI.js
[2016-07-09 13:42:15.095] [INFO] DemoHelloAPI - Program DemoHelloAPI is running.
init
[2016-07-09 13:42:15.103] [DEBUG] DemoHelloAPI - Board is ready.
[2016-07-09 13:42:15.104] [DEBUG] DemoHelloAPI - RemoteDeviceDriver is ready.
[2016-07-09 13:42:15.104] [DEBUG] DemoHelloAPI - HelloAPI is created.
[2016-07-09 13:42:15.104] [DEBUG] DemoHelloAPI - Sequencer is created.
[2016-07-09 13:42:15.104] [INFO] DemoHelloAPI - Begin step processing.
[2016-07-09 13:42:15.104] [TRACE] DeviceAPI - open(Hello:0)
init
[2016-07-09 13:42:15.106] [DEBUG] DemoHelloAPI - Board is ready.
/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/firmata/lib/firmata.js:1859
    throw new Error(commandByte + " is not an available SYSEX_RESPONSE byte");
    ^

Error: 95 is not an available SYSEX_RESPONSE byte
    at Board.sysexResponse (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/firmata/lib/firmata.js:1859:11)
    at RemoteDeviceDriver (/Users/soundanalogous/Documents/Dev/LuniJS/lib/RDD/RemoteDeviceDriver.js:45:16)
    at firmata.Board (/Users/soundanalogous/Documents/Dev/LuniJS/examples/DemoHelloAPI.js:44:16)
    at Board.<anonymous> (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/firmata/lib/firmata.js:545:7)
    at emitOne (events.js:96:13)
    at SerialPort.emit (events.js:188:7)
    at SerialPort._error (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/serialport/lib/serialport.js:188:10)
    at SerialPort.write (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/serialport/lib/serialport.js:259:17)
    at Board.sysexCommand (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/firmata/lib/firmata.js:1890:18)
    at RemoteDeviceDriver.open (/Users/soundanalogous/Documents/Dev/LuniJS/lib/RDD/RemoteDeviceDriver.js:128:16)

The SYSEX_RESPONSE error is due to the second call to init, where the first call already populated the 0x5F command id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions