Skip to content

Commit

Permalink
Log improvement (#26)
Browse files Browse the repository at this point in the history
Log lost packets and errors from WFB-NG
  • Loading branch information
vertexodessa authored Nov 29, 2024
1 parent 00e88f0 commit e21dfbf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/wfbngrtl8812/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ add_library(wfb-ng STATIC
${CMAKE_SOURCE_DIR}/wfb-ng/src/wifibroadcast.cpp)
set_target_properties(wfb-ng PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/wfb-ng)
target_include_directories(wfb-ng PUBLIC ${CMAKE_SOURCE_DIR}/wfb-ng)
target_compile_definitions(wfb-ng PRIVATE __WFB_RX_SHARED_LIBRARY__)
target_compile_definitions(wfb-ng PRIVATE
__WFB_RX_SHARED_LIBRARY__
PREINCLUDE_FILE=<${CMAKE_SOURCE_DIR}/wfb_log.h>
)

add_library(devourer STATIC
${CMAKE_SOURCE_DIR}/devourer/hal/Hal8812PhyReg.h
Expand Down
13 changes: 13 additions & 0 deletions app/wfbngrtl8812/src/main/cpp/wfb_log.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include <android/log.h>
#include <cstdarg>

#define WFB_ERR(...) do{ __android_log_print( ANDROID_LOG_ERROR, "wfb-ng", __VA_ARGS__); } while(0)
#define WFB_INFO(...) do{ __android_log_print( ANDROID_LOG_INFO, "wfb-ng", __VA_ARGS__); } while(0)

#define WFB_DBG(...) (void(0))

#define ANDROID_IPC_MSG(...) do{ __android_log_print( ANDROID_LOG_INFO, "wfb-ng", __VA_ARGS__); } while(0)
#define IPC_MSG(...) do{ __android_log_print( ANDROID_LOG_INFO, "wfb-ng", __VA_ARGS__); } while(0)
#define IPC_MSG_SEND() (void)0

0 comments on commit e21dfbf

Please sign in to comment.