Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Disable debug on QP's internal task #20623

Merged
merged 7 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/quantum_painter.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Supported devices:
| `QUANTUM_PAINTER_SUPPORTS_256_PALETTE` | `FALSE` | If 256-color palettes are supported. Requires significantly more RAM on the MCU. |
| `QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS` | `FALSE` | If native color range is supported. Requires significantly more RAM on the MCU. |
| `QUANTUM_PAINTER_DEBUG` | _unset_ | Prints out significant amounts of debugging information to CONSOLE output. Significant performance degradation, use only for debugging. |
| `QP_DEBUG_ENABLE_INTERNAL_FLUSH_OUTPUT` | _unset_ | By default, debug is disabled while internal task is flushing the display(s). If you want want it to keep enabled, add this. Note: Console will get clogged. |
elpekenin marked this conversation as resolved.
Show resolved Hide resolved


Drivers have their own set of configurable options, and are described in their respective sections.

Expand Down
7 changes: 7 additions & 0 deletions quantum/painter/qp_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,16 @@ void qp_internal_task(void) {
#endif

// Flush (render) dirty regions to corresponding displays
#if !defined(QP_DEBUG_ENABLE_INTERNAL_FLUSH_OUTPUT)
bool debug_state = debug_enable;
debug_enable = false;
#endif // defined(QP_DEBUG_ENABLE_INTERNAL_FLUSH_OUTPUT)
elpekenin marked this conversation as resolved.
Show resolved Hide resolved
for (uint8_t i = 0; i < QP_NUM_DEVICES; i++) {
if (qp_devices[i] != NULL) {
qp_flush(qp_devices[i]);
}
}
#if !defined(QP_DEBUG_ENABLE_INTERNAL_FLUSH_OUTPUT)
debug_enable = debug_state;
#endif // defined(QP_DEBUG_ENABLE_INTERNAL_FLUSH_OUTPUT)
elpekenin marked this conversation as resolved.
Show resolved Hide resolved
}