Remove Text on a segment display #137
-
Hello, I want to wipe out the text on my segment display before I start to display a new text
In the above example everything is working fine. Now I thought I replace text by 18 spaces (18 because my display has 18 segments) so text: " ". That simply doesn't do anything. It seems that the code checks for empty strings and then ignores this. Background - maybe someone has another idea, my segments are ordered like this: score 1 player score2 Once the game is over the first line shows GAME OVER (config example above). Then 3 seconds later the lower line should show "Player 1 won". But for these 3 seconds it still shows score3, ball and score4. I want to have this empty from the start |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
What version of MPF are you running? There are numerous examples and tests for the segment displays that successfully clear out the display with an empty string, although those just use You may also want to enable debugging on your serial connection and see what commands are being sent to the segment displays, in case your hardware has special requirements that need to be considered. |
Beta Was this translation helpful? Give feedback.
-
Hello, EDIT: Tested on 0.80 now, same behavior. I am on 0.56.1 - I know there are newer versions available but need to find to resetup mpf. I am running it on openSuse and it was in the past a bit troublesome. If you say it is a no-go on that version then I need to carve out that time somehow. I am using a Cobra neo segment. Do you have a link how to enable debugging on the serial connection? Anyways "" and " " seem to behave differently, but even a "" doesn't seem to work correctly. Maybe it is as well due to how the time parameter really works or my wrong understanding of the time parameter. Before I explain that let me past here the full relevant show, at the bottom of the post I will post my full neo seg config, just in case. In addition I can as well provide a video how the display behaves if needed. But now into the details
What do I want to achieve with the above: a) As soon as the game ends I want to see the GAME OVER text flying in on the top row of my segments (8 + 2 + 8 digits)--> works perfectly fine In step c I don't have to clear out the displays because the previous text has a transition_out set. I do not have to clear the top row at the beginning because as soon as the text flies in all digits are wiped out automatically even though at the beginning of the animation I would only need the very right digit. So the old text (points and player number) are not being moved out with the in transition (no problem for me), just mention it since I don't know if that is the correct behavior. Now let's get to the second step that is introduced to wipe out the bottom line, I tried various time parameters, like above +1, but as well 0.1, +0.1, 0 and 1. The 0 kills it completely and results in a crash of mpf. Goal is to wipe out the line right at the start so time: 0 would be final goal, but I can live with 0.1. Regardless what time I put in (except 0) the behavior is the following:
I tried as well (just top part of the example for better readability)
So in the first step with time 0 I have both segments listed. Doesn't work either. Should it work? With the 5 steps from above, either mpf doesn't behave correctly or I have not understood how the time parameter works. Would you say that my description is what you would expect with my config? One additional question, the expire time parameter how is that calcualted? i) it is only the time while the text is on its final position, so transition in and out are extra counted Okay a long text, the more I appreciate an answer and like in the past I am willing to update the documentation to give back what I can give back. Thanks, PS: here the full config, just in case
|
Beta Was this translation helpful? Give feedback.
-
Short update, I did now a test on 0.80 and it shows the same behavior about the strange timing above. Just to make it clearer, if I replace in the second step the "" with "a" then all the timings are as I believe they should be - but of course I don't want to display an "a", it is only a test. If there is a bug and I can help to analyze, then I am happy to help and with a little bit of guidance I can as well dig into python code (basic python knowledge I have and I am not afraid to learn). |
Beta Was this translation helpful? Give feedback.
-
Works with update_method replace and missionpinball/mpf#1820, solved for me for now. |
Beta Was this translation helpful? Give feedback.
Works with update_method replace and missionpinball/mpf#1820, solved for me for now.