Because the ESP-IDF supports [runtime log level control](https://docs.espressif.com/projects/esp-idf/en/v5.5.2/esp32s3/api-reference/system/log.html#log-level-control), SystemK required some tweak to take full advantage of this.
This PR makes the following changes to SystemK:
- On the ESP32 platform, the highest logging level *compiled in* to the app is now controlable by Kconfig, as "SystemK maximum log level".
- [Protocols.c](272618d49d/Protocols/Protocols.c) was refactored, and the `DEBUG_PACKET_[EN/DE]CODE` #defines were renamed to make it clear that they now only apply to the PSoC platform.
- Some decoding warnings in the Test Protocol were downgraded to debug, since they were a nuisance most of the time.
Co-authored-by: Joe Kearney <joe@clubk.club>
Reviewed-on: #10
81 lines
2.7 KiB
CMake
Executable file
81 lines
2.7 KiB
CMake
Executable file
idf_component_register(
|
|
SRCS
|
|
"BLE/BLE_Packets.c"
|
|
"BLE/BLE_Packet_Tracker.c"
|
|
"BLE/BLE_Utils.c"
|
|
"Events/KEvents.c"
|
|
"Game/Game.c"
|
|
"Game/Weapons.c"
|
|
"Logging/KLog.c"
|
|
"Menu/GameSettings/GameMenuItem.c"
|
|
"Menu/GameSettings/PlayerIDMenuItem.c"
|
|
"Menu/GameSettings/TeamIDMenuItem.c"
|
|
"Menu/HardwareSettings/HandedMenuItem.c"
|
|
"Menu/HardwareSettings/HardwareMenuItem.c"
|
|
"Menu/HardwareSettings/VolumeMenuItem.c"
|
|
"Menu/Menu.c"
|
|
"NeoPixels/Gamma.c"
|
|
"NeoPixels/NeoPixels.c"
|
|
"NeoPixels/Sine.c"
|
|
"NeoPixels/Animations/All_Off.c"
|
|
"NeoPixels/Animations/All_On.c"
|
|
"NeoPixels/Animations/BLE_Nearby.c"
|
|
"NeoPixels/Animations/BLE_RSSI.c"
|
|
"NeoPixels/Animations/Countdown.c"
|
|
"NeoPixels/Animations/Flamethrower.c"
|
|
"NeoPixels/Animations/Flashlight.c"
|
|
"NeoPixels/Animations/Health_Report.c"
|
|
"NeoPixels/Animations/Idle_Animation.c"
|
|
"NeoPixels/Animations/Menu_Animation.c"
|
|
"NeoPixels/Animations/Shot_Fired.c"
|
|
"NeoPixels/Animations/Tagged_Out.c"
|
|
"NeoPixels/Animations/Tag_Received.c"
|
|
"NeoPixels/Animations/Team_Colors.c"
|
|
"NeoPixels/Animations/Test_Pattern.c"
|
|
"NeoPixels/Animations/Wrapping_Up_Animation.c"
|
|
"Protocols/Dubuque.c"
|
|
"Protocols/Dynasty.c"
|
|
"Protocols/Laser_X.c"
|
|
"Protocols/Miles_Tag_II.c"
|
|
"Protocols/NEC.c"
|
|
"Protocols/Nerf_Laser_Ops_Pro.c"
|
|
"Protocols/Nerf_Laser_Strike.c"
|
|
"Protocols/Nerf_Phoenix_LTX.c"
|
|
"Protocols/Protocols.c"
|
|
"Protocols/Squad_Hero.c"
|
|
"Protocols/Test.c"
|
|
"States/Playing/State_Playing.c"
|
|
"States/Playing/State_Playing__Interacting.c"
|
|
"States/Playing/State_Playing__Tagged_Out.c"
|
|
"States/Starting_Game/State_Starting_Game.c"
|
|
"States/Starting_Game/State_Starting_Game__Counting_Down.c"
|
|
"States/Starting_Game/State_Starting_Game__Instigating.c"
|
|
"States/Starting_Game/State_Starting_Game__Responding.c"
|
|
"States/State_Configuring.c"
|
|
"States/State_Initializing.c"
|
|
"States/State_Machine.c"
|
|
"States/State_Ready.c"
|
|
"States/State_Reprogramming.c"
|
|
"States/State_Wrapping_Up.c"
|
|
"SystemK.c"
|
|
INCLUDE_DIRS
|
|
"."
|
|
"Audio"
|
|
"BLE"
|
|
"Events"
|
|
"Game"
|
|
"IR"
|
|
"Logging"
|
|
"Menu"
|
|
"NeoPixels"
|
|
"Protocols"
|
|
"Settings"
|
|
"States"
|
|
)
|
|
|
|
# This ensures LOG_LOCAL_LEVEL is defined before any header files are included.
|
|
idf_build_set_property(COMPILE_DEFINITIONS
|
|
"-DLOG_LOCAL_LEVEL=${CONFIG_SYSTEMK_LOG_LEVEL}"
|
|
APPEND
|
|
)
|
|
|