From 2f3245d1ae4ed955fb9d1a1d7206c9d9600b56e9 Mon Sep 17 00:00:00 2001 From: worldpeace-germany Date: Wed, 21 Aug 2024 20:14:45 +0200 Subject: [PATCH 1/5] clarification of default_color in segment_displays --- docs/config/segment_displays.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/config/segment_displays.md b/docs/config/segment_displays.md index f69471b13e..ef64226606 100644 --- a/docs/config/segment_displays.md +++ b/docs/config/segment_displays.md @@ -37,9 +37,12 @@ of your config. (If you don't include them, the default will be used). ### default_color: List of one (or more) values, each is a type: `color` (*color name*, -*hex*, or list of values *0*-*255*). Default: `white` +*hex*, or list of values *0*-*255*). Default: `white`. + +You should specify for each digit of your segment display a default color. If you specify less +colors than the `size` of your display the other digitis will have `white` as default color. E.g. if you have 8 digits and specify `"blue, yellow"` then the other +6 digits will have `white` as default color. ---8<-- "todo.md" ### default_transition_update_hz: From 0a3fff5ad7b1c13af6144052f3893b2b14b76316 Mon Sep 17 00:00:00 2001 From: worldpeace-germany Date: Tue, 27 Aug 2024 19:45:41 +0200 Subject: [PATCH 2/5] Improvement for debugging setup --- docs/code/introduction/debug.md | 19 +++++++++++++----- .../code/introduction/images/debug_script.png | Bin 0 -> 92132 bytes 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 docs/code/introduction/images/debug_script.png diff --git a/docs/code/introduction/debug.md b/docs/code/introduction/debug.md index 1cd3366c15..4e2ef7211a 100644 --- a/docs/code/introduction/debug.md +++ b/docs/code/introduction/debug.md @@ -21,7 +21,10 @@ By clicking on the line number you can set a breakpoint: ![open menu](images/debug_set_breakpoint.png) -## Attach to process +## Run in debug mode +You basically have two options to run mpf in debug mode. You can either start mpf normally and then attach the debugger to the running process. The other option is that you start mpf in debug mode from PyCharm directly. The latter has the advantage that you can as well catch code that executes while mpf initializes and not only during the game flow. Both options are being explained below. + +### Attach to process Now it is time to start mpf like you normally do. Keep in mind, that before you start mpf with e.g. `mpf -t -b`, that you need to [activate](../../install/virtual-environments.md) your Python virtual environment. @@ -33,10 +36,16 @@ Afterwards a new pop-up window will open up ![open menu](images/debug_select_process.png) -from where you need to select your mpf process, depeding what other (Python) process you have running the list might be shorter or longer. +from where you need to select your mpf process, depeding what other (Python) process you have running the list might be shorter or longer. Run your game and wait until your game flow hits the debugger. Now you have the normal debugging options like stepping in or looking into variables. -## Start Debugging +![open menu](images/debug_code.png) -Run your game and wait until your game flow hits the debugger. Now you have the normal debugging options like stepping in or looking into variables. +### Start mpf in debug mode -![open menu](images/debug_code.png) +In this case you need to execute mpf not as an executable like you normally do, but as a python script. So you don't run it with `mpf -t -b` but with something like `python /