canardv0 nxstyle fix
@@ -99,7 +99,8 @@ static CanardInstance canard;
/* Arena for memory allocation, used by the library */
-static uint8_t canard_memory_pool[CONFIG_EXAMPLES_LIBCANARDV0_NODE_MEM_POOL_SIZE];
+static uint8_t canard_memory_pool
+ [CONFIG_EXAMPLES_LIBCANARDV0_NODE_MEM_POOL_SIZE];
static uint8_t unique_id[UNIQUE_ID_LENGTH_BYTES] =
{ 0x00, 0x00, 0x00, 0x00,
@@ -203,13 +204,17 @@ static void onTransferReceived(CanardInstance *ins,
*/
/* Image CRC skipped */
+
/* HardwareVersion */
+
/* Major skipped */
+
/* Minor skipped */
memcpy(&buffer[24], unique_id, UNIQUE_ID_LENGTH_BYTES);
/* Certificate of authenticity skipped */
+
/* Name */
const size_t name_len = strlen(APP_NODE_NAME);
@@ -268,7 +273,8 @@ static bool shouldAcceptTransfer(const CanardInstance * ins,
if ((transfer_type == CanardTransferTypeRequest) &&
(data_type_id == UAVCAN_GET_NODE_INFO_DATA_TYPE_ID))
{
- *out_data_type_signature = UAVCAN_GET_NODE_INFO_DATA_TYPE_SIGNATURE;
+ *out_data_type_signature =
+ UAVCAN_GET_NODE_INFO_DATA_TYPE_SIGNATURE;
return true;
}
}
@@ -301,8 +307,8 @@ void process1HzTasks(uint64_t timestamp_usec)
100U * stats.peak_usage_blocks / stats.capacity_blocks;
#ifdef CONFIG_DEBUG_CAN
- printf
- ("Memory pool stats: capacity %u blocks, usage %u blocks, peak usage %u blocks (%u%%)\n",
+ printf("Memory pool stats: capacity %u blocks, usage %u blocks,"
+ " peak usage %u blocks (%u%%)\n",
stats.capacity_blocks, stats.current_usage_blocks,
stats.peak_usage_blocks, peak_percent);
#endif
@@ -345,7 +351,8 @@ void process1HzTasks(uint64_t timestamp_usec)
const int resp_res =
canardRequestOrRespond(&canard, dest_id,
UAVCAN_GET_NODE_INFO_DATA_TYPE_SIGNATURE,
- UAVCAN_GET_NODE_INFO_DATA_TYPE_ID, &transfer_id,
+ UAVCAN_GET_NODE_INFO_DATA_TYPE_ID,
+ &transfer_id,
CANARD_TRANSFER_PRIORITY_LOW, CanardRequest,
payload, 0);
if (resp_res <= 0)
@@ -471,7 +478,8 @@ static int canard_daemon(int argc, char *argv[])
onTransferReceived, shouldAcceptTransfer, (void *)(12345));
canardSetLocalNodeID(&canard, CONFIG_EXAMPLES_LIBCANARDV0_NODE_ID);
printf("canard_daemon: canard initialized\n");
- printf("start node (ID: %d Name: %s)\n", CONFIG_EXAMPLES_LIBCANARDV0_NODE_ID,
+ printf("start node (ID: %d Name: %s)\n",
+ CONFIG_EXAMPLES_LIBCANARDV0_NODE_ID,
APP_NODE_NAME);
g_canard_daemon_started = true;
@@ -517,7 +525,8 @@ int main(int argc, FAR char *argv[])
return EXIT_SUCCESS;
}
- ret = task_create("canard_daemon", CONFIG_EXAMPLES_LIBCANARDV0_DAEMON_PRIORITY,
+ ret = task_create("canard_daemon",
+ CONFIG_EXAMPLES_LIBCANARDV0_DAEMON_PRIORITY,
CONFIG_EXAMPLES_LIBCANARDV0_STACKSIZE, canard_daemon,
NULL);
if (ret < 0)
