Skip to content

Commit

Permalink
AP_CANMananger: fix awful defaulting of AP_CAN_LOGGING_ENABLED
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jan 3, 2025
1 parent 054ef53 commit 2d00ab3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions libraries/AP_CANManager/AP_CANManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
#include <AP_Common/sorting.h>
#include <AP_Logger/AP_Logger.h>

/*
avoid a recursion issue with config defines
*/
#if AP_CAN_LOGGING_ENABLED && !HAL_LOGGING_ENABLED
#undef AP_CAN_LOGGING_ENABLED
#define AP_CAN_LOGGING_ENABLED 0
#endif

#define LOG_TAG "CANMGR"
#define LOG_BUFFER_SIZE 1024

Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_CANManager/AP_CANManager_config.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#pragma once

#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_Logger/AP_Logger_config.h>

#ifndef AP_CAN_SLCAN_ENABLED
#define AP_CAN_SLCAN_ENABLED HAL_MAX_CAN_PROTOCOL_DRIVERS
#endif

#ifndef AP_CAN_LOGGING_ENABLED
#define AP_CAN_LOGGING_ENABLED HAL_MAX_CAN_PROTOCOL_DRIVERS
#define AP_CAN_LOGGING_ENABLED HAL_MAX_CAN_PROTOCOL_DRIVERS && HAL_LOGGING_ENABLED
#endif

0 comments on commit 2d00ab3

Please sign in to comment.