Skip to content

Commit 23b1bf3

Browse files
Apply suggestions from code review
Co-authored-by: Petro Karashchenko <[email protected]>
1 parent a51626b commit 23b1bf3

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

canutils/libdronecan/Make.defs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
ifneq ($(CONFIG_CANUTILS_LIBDRONECAN),)
2222
CONFIGURED_APPS += $(APPDIR)/canutils/libdronecan
2323

24-
2524
ifeq ($(CONFIG_NET_CAN),y)
2625
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/canutils/libdronecan/libcanard/drivers/socketcan
2726
CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/canutils/libdronecan/libcanard/drivers/socketcan

canutils/libopencyphal/Make.defs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
ifneq ($(CONFIG_CANUTILS_LIBOPENCYPHAL),)
2222
CONFIGURED_APPS += $(APPDIR)/canutils/libopencyphal
2323

24-
2524
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/canutils/libopencyphal/o1heap/o1heap
2625
CXXFLAGS += ${INCDIR_PREFIX}$(APPDIR)/canutils/libopencyphal/o1heap/o1heap
2726

examples/dronecan/canard_main.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static uint8_t node_mode = UAVCAN_NODE_MODE_INITIALIZATION;
126126
static bool g_canard_daemon_started;
127127

128128
#if CANARD_ENABLE_CANFD
129-
static bool canfd = false;
129+
static bool canfd;
130130
#endif
131131

132132
/****************************************************************************
@@ -250,7 +250,7 @@ static void onTransferReceived(CanardInstance *ins,
250250
transfer->priority,
251251
CanardResponse,
252252
&buffer[0],
253-
(uint16_t) total_size, canfd);
253+
(uint16_t)total_size, canfd);
254254
#else
255255
canardRequestOrRespond(ins,
256256
transfer->source_node_id,
@@ -415,9 +415,9 @@ void process1HzTasks(uint64_t timestamp_usec)
415415
*
416416
****************************************************************************/
417417
#ifdef CONFIG_NET_CAN
418-
void processTxRxOnce(SocketCANInstance * socketcan, int timeout_msec)
418+
void processTxRxOnce(SocketCANInstance *socketcan, int timeout_msec)
419419
#else
420-
void processTxRxOnce(CanardNuttXInstance * nuttxcan, int timeout_msec)
420+
void processTxRxOnce(CanardNuttXInstance *nuttxcan, int timeout_msec)
421421
#endif
422422
{
423423
const CanardCANFrame *txf;
@@ -501,7 +501,7 @@ static int canard_daemon(int argc, char *argv[])
501501

502502

503503
#ifdef CONFIG_NET_CAN
504-
const char *const can_iface_name = "can0";
504+
const char * const can_iface_name = "can0";
505505

506506
# if CANARD_ENABLE_CANFD
507507
int16_t res = socketcanInit(&socketcan, can_iface_name, canfd);
@@ -604,7 +604,8 @@ int main(int argc, FAR char *argv[])
604604
return EXIT_SUCCESS;
605605
}
606606

607-
if (argc == 2 && strcmp(argv[1],"canfd") == 0) {
607+
if (argc == 2 && strcmp(argv[1], "canfd") == 0)
608+
{
608609
printf("CAN FD mode enabled\n");
609610
canfd = true;
610611
}

0 commit comments

Comments
 (0)