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
68 lines
No EOL
2 KiB
Text
68 lines
No EOL
2 KiB
Text
menu "KTag SystemK"
|
|
|
|
config KTAG_N_NEOPIXEL_CHANNELS
|
|
int "Number of NeoPixel channels"
|
|
range 1 4
|
|
default 4
|
|
help
|
|
Only values of '1' or '4' are supported.
|
|
|
|
config KTAG_MAX_NEOPIXELS_PER_CHANNEL
|
|
int "Maximum Neopixels per channel"
|
|
default 8
|
|
help
|
|
Maximum number of NeoPixels on a single channel.
|
|
|
|
config KTAG_ANIMATION_STEP_TIME_IN_ms
|
|
int "Time between animation updates (in milliseconds)"
|
|
default 10
|
|
|
|
config KTAG_T_DEFAULT_START_GAME_in_ms
|
|
int "Default time between game initiation and game start (in milliseconds)"
|
|
default 30000
|
|
|
|
config KTAG_MAX_AUDIO_VOLUME
|
|
int "Maximum audio volume"
|
|
range 1 100
|
|
default 100
|
|
help
|
|
Value of audio volume representing the maximum volume possible for this device.
|
|
|
|
config KTAG_MIN_AUDIO_VOLUME
|
|
int "Minimum audio volume"
|
|
range 0 99
|
|
default 0
|
|
help
|
|
Value of audio volume representing the minimum volume possible for this device.
|
|
|
|
config SYSTEMK_LOG_LEVEL
|
|
int
|
|
default 0 if SYSTEMK_LOG_LEVEL_NONE
|
|
default 1 if SYSTEMK_LOG_LEVEL_ERROR
|
|
default 2 if SYSTEMK_LOG_LEVEL_WARN
|
|
default 3 if SYSTEMK_LOG_LEVEL_INFO
|
|
default 4 if SYSTEMK_LOG_LEVEL_DEBUG
|
|
default 5 if SYSTEMK_LOG_LEVEL_VERBOSE
|
|
|
|
choice SYSTEMK_LOG_LEVEL_CHOICE
|
|
bool "SystemK maximum log level"
|
|
default SYSTEMK_LOG_LEVEL_VERBOSE
|
|
help
|
|
Set the maximum compiled log level for SystemK.
|
|
Messages at higher levels will be removed at compile time.
|
|
|
|
config SYSTEMK_LOG_LEVEL_NONE
|
|
bool "No output"
|
|
config SYSTEMK_LOG_LEVEL_ERROR
|
|
bool "Error"
|
|
config SYSTEMK_LOG_LEVEL_WARN
|
|
bool "Warning"
|
|
config SYSTEMK_LOG_LEVEL_INFO
|
|
bool "Info"
|
|
config SYSTEMK_LOG_LEVEL_DEBUG
|
|
bool "Debug"
|
|
config SYSTEMK_LOG_LEVEL_VERBOSE
|
|
bool "Verbose"
|
|
endchoice
|
|
|
|
endmenu |