Latest update kills Entry Mode Switcher
|
04-26-2016, 02:53 AM
Post: #1
|
|||
|
|||
Latest update kills Entry Mode Switcher
The latest firmware seems to have a broken Cristóbal De Jesús's brilliant little entry mode switcher:
Code:
This is one of the most useful programs I've ever found (thanks to Cristobal, a thousand times over!) but it doesn't quite work the same since the update. It actually does switch modes but the mode label (e.g. TEXTOUT_P(an(Entry+1),G0,2,207,2,RGB(255,0,0)); ) is cleared as soon as it's written to the screen. You can see the labels very briefly but then the screen is cleared and they disappear. The virtual calculator has the same issue. Any insight into why the text no longer appears? |
|||
04-26-2016, 06:23 AM
Post: #2
|
|||
|
|||
RE: Latest update kills Entry Mode Switcher
This might be similar issue as thread "10077 and RECT_P"?
Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
04-30-2016, 12:13 AM
Post: #3
|
|||
|
|||
RE: Latest update kills Entry Mode Switcher
Any other thoughts?
|
|||
04-30-2016, 09:56 AM
(This post was last modified: 04-30-2016 01:29 PM by DrD.)
Post: #4
|
|||
|
|||
RE: Latest update kills Entry Mode Switcher
You can see the entry mode longer by adding a delay after TEXTOUT_P():
WAIT(n); // See Help for options -Dale- |
|||
04-30-2016, 10:53 AM
Post: #5
|
|||
|
|||
RE: Latest update kills Entry Mode Switcher | |||
05-01-2016, 02:45 AM
Post: #6
|
|||
|
|||
RE: Latest update kills Entry Mode Switcher
(04-30-2016 09:56 AM)DrD Wrote: You can see the entry mode longer by adding a delay after TEXTOUT_P(): Thanks, that's actually really close to what I need. 300ms is a better delay and WAIT is too coarse. But spinning for a bit doesn't seem to hurt anything: Code:
Code:
|
|||
05-01-2016, 10:38 AM
Post: #7
|
|||
|
|||
RE: Latest update kills Entry Mode Switcher
The upshot of the problem is that a delay (of some sort) is necessary to "see" the TEXTOUT_P output.
Showing the change isn't absolutely necessary, because the change is immediately shown in the [Shift] [HOME] corresponding setting. It can be detected programmatically, using the Home Settings "Entry" variable, or directly via the command line, making the switcher program even more compact! -Dale- |
|||
05-01-2016, 04:08 PM
(This post was last modified: 05-01-2016 04:10 PM by Tim Wessman.)
Post: #8
|
|||
|
|||
RE: Latest update kills Entry Mode Switcher
(04-26-2016 02:53 AM)jgreenb2 Wrote: Any insight into why the text no longer appears? The text no longer appears because there was never any code to ensure that the text ever would be visible. When you draw to the screen, you need to either do some sort of wait, or use the FREEZE command to avoid the next screen draw. I believe that when the inner display loop was cleaned up and improved it was now fast enough that your text basically "disappeared" due to having the next screen draw happen. Adding FREEZE will make the text stay until you do something else. WAIT can be any value - not just integers. WAIT(.3) would be completely valid. Since TEXTOUT now returns the last X position "drawn" on the text, you could possibly get unexpected behavior due to evaluating that number as a "key". So now you probably want to return a specific number such as -1 (otherwise you may get an unexpected key executed). Code: // Cycles over entry mode options. TW Although I work for HP, the views and opinions I post here are my own. |
|||
05-01-2016, 06:15 PM
Post: #9
|
|||
|
|||
RE: Latest update kills Entry Mode Switcher
Tim,
Much obliged, thanks! -- Jeff |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)