Skip to content

After updating Bebop 2 to the v4.3.0 firmware, a BD_NET_DC_EVENT_ID is received with an undefined data element #61

@MichaelFitzurka

Description

@MichaelFitzurka

Using the feature/firmware-4.0 branch,
And the v4.3.0 firmware on the Bebop 2 drone,
I started to receive an error on starting up the node app.

Cannot read property 'readUInt8' of undefined
at Bebop._packetReceiver (/home/michael.fitzurka/Projects/IoT_Demo/IoT-Demo_Drone/node_modules/node-bebop/lib/bebop.js:307:43)

line 307 is:
var commandProject = networkFrame.data.readUInt8(0),

I added a clause to the if statement above it, to check for undefined, to get me running again, but I do not know if that has any unforeseen circumstances. Added logs to be sure and the networkFrame.id was 126, which is the BD_NET_DC_EVENT_ID.

lines 304-306 (adding line 306):
if ((networkFrame.id === constants.BD_NET_DC_EVENT_ID ||
networkFrame.id === constants.BD_NET_DC_NAVDATA_ID)
&& networkFrame.data != undefined) {

FYI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions