Skip to content

Commit 66760b3

Browse files
TedXitridge
authored andcommitted
fix: fix examples NODESTATUS buffer size inaccurate
1 parent 5d7b725 commit 66760b3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

examples/BatteryNode/battery_node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static bool shouldAcceptTransfer(const CanardInstance *ins,
568568
*/
569569
static void send_NodeStatus(void)
570570
{
571-
uint8_t buffer[UAVCAN_PROTOCOL_GETNODEINFO_RESPONSE_MAX_SIZE];
571+
uint8_t buffer[UAVCAN_PROTOCOL_NODESTATUS_MAX_SIZE];
572572

573573
node_status.uptime_sec = micros64() / 1000000ULL;
574574
node_status.health = UAVCAN_PROTOCOL_NODESTATUS_HEALTH_OK;

examples/ESCNode/esc_node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ static bool shouldAcceptTransfer(const CanardInstance *ins,
776776
*/
777777
static void send_NodeStatus(void)
778778
{
779-
uint8_t buffer[UAVCAN_PROTOCOL_GETNODEINFO_RESPONSE_MAX_SIZE];
779+
uint8_t buffer[UAVCAN_PROTOCOL_NODESTATUS_MAX_SIZE];
780780

781781
node_status.uptime_sec = micros64() / 1000000ULL;
782782
node_status.health = UAVCAN_PROTOCOL_NODESTATUS_HEALTH_OK;

examples/RangeFinder/rangefinder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ static bool shouldAcceptTransfer(const CanardInstance *ins,
555555
*/
556556
static void send_NodeStatus(void)
557557
{
558-
uint8_t buffer[UAVCAN_PROTOCOL_GETNODEINFO_RESPONSE_MAX_SIZE];
558+
uint8_t buffer[UAVCAN_PROTOCOL_NODESTATUS_MAX_SIZE];
559559

560560
node_status.uptime_sec = micros64() / 1000000ULL;
561561
node_status.health = UAVCAN_PROTOCOL_NODESTATUS_HEALTH_OK;

examples/ServoNode/servo_node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ static bool shouldAcceptTransfer(const CanardInstance *ins,
719719
*/
720720
static void send_NodeStatus(void)
721721
{
722-
uint8_t buffer[UAVCAN_PROTOCOL_GETNODEINFO_RESPONSE_MAX_SIZE];
722+
uint8_t buffer[UAVCAN_PROTOCOL_NODESTATUS_MAX_SIZE];
723723

724724
node_status.uptime_sec = micros64() / 1000000ULL;
725725
node_status.health = UAVCAN_PROTOCOL_NODESTATUS_HEALTH_OK;

examples/SimpleNode/simple_node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static bool shouldAcceptTransfer(const CanardInstance *ins,
175175
*/
176176
static void send_NodeStatus(void)
177177
{
178-
uint8_t buffer[UAVCAN_PROTOCOL_GETNODEINFO_RESPONSE_MAX_SIZE];
178+
uint8_t buffer[UAVCAN_PROTOCOL_NODESTATUS_MAX_SIZE];
179179

180180
node_status.uptime_sec = micros64() / 1000000ULL;
181181
node_status.health = UAVCAN_PROTOCOL_NODESTATUS_HEALTH_OK;

0 commit comments

Comments
 (0)