This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

*********** Bug alert on nRF Connect SDK with solution ***********************

Hi Nordic Team:

Summary: Bug in /v1.5.0/nrf/include/bluetooth/mesh/light_xyl_srv.h (line 120 and 132) , route cause: CPP Key word "new"

Details:

Bug:

The function deceleration void (*const range_update)( .......const struct bt_mesh_light_xy_range *new); and 

void (*const default_update)(..... *new); of /v1.5.0/nrf/include/bluetooth/mesh/light_xyl_srv.h has CPP key word "new"

It implies the compilation error while using CPP file at application layer. (like main.cpp) , as compilation will use CXX compiler.

 

Enclosed the snap of compilation error:

Solution:  

Update the function deceleration (void (*const range_update)( .......const struct bt_mesh_light_xy_range *new); and void (*const default_update)(..... *new);  of /v1.5.0/nrf/include/bluetooth/mesh/light_xyl_srv.as below to resolve this bug.

void (*const range_update)(struct bt_mesh_light_xyl_srv *srv,

                                                                   struct bt_mesh_msg_ctx *ctx,

                                                                   const struct bt_mesh_light_xy_range *old,

                                                                   const struct bt_mesh_light_xy_range *New);

 

 void (*const default_update)(struct bt_mesh_light_xyl_srv *srv,

                                                                     struct bt_mesh_msg_ctx *ctx,

                                                                     const struct bt_mesh_light_xy *old,

                                                                     const struct bt_mesh_light_xy *New);

 

Thanks

Selvam

Related