|
In lugnet.robotics.nxt, Jeff Elliott wrote:
> Ok, well, replying to my own message in the best of internet style...
>
> I got impatient and starting prodding. After a few hard resets, I came up with
> the following:
>
> Yes, the Get/SetDisplayNormal() permits you to write directly to screen memory.
Lots of very cool stuff deleted.
Sorry I missed your original message, Jeff. You can write to both the Normal
and Popup screen memory and toggle back and forth between which one gets
displayed.
This code flips between the two buffers for 10 seconds and then makes sure the
current buffer is set back the Normal:
gettick flipthen
add flipthen, flipthen, 10000 // ten seconds
GetDisplayFlags(d)
LoopIt:
// SwapDisplayMemory
xor d, d, DISPLAY_POPUP ; show popup memory
SetDisplayFlags(d)
wait 5
gettick flipnow
brcmp LT, LoopIt, flipnow, flipthen
// make sure the current display is the normal display
GetDisplayFlags(d)
and d, d, ~DISPLAY_POPUP
SetDisplayFlags(d)
Unfortunately, there isn't really an easier way to clear the screen other than
to use some sort of system call which draws on the screen. That's because only
those system calls set the display as "dirty" and if that doesn't happen then
the firmware will not do the right thing when you draw directly to the screen
memory. There isn't any way to directly set the dirty flag because it is not
exposed via the IOMAP structure.
John Hansen
|
|
Message has 2 Replies: | | Re: What do these macros do?
|
| (...) Thanks for your response, John. That tip about the dirty flag not being IOMAPpable is very, very useful; I could have wasted a lot of time working that out the hard way. I'm working on a graphical display widget to show a 'radar' (well, sonar) (...) (18 years ago, 21-Jan-07, to lugnet.robotics.nxt, lugnet.robotics)
|
Message is in Reply To:
| | Re: What do these macros do?
|
| Ok, well, replying to my own message in the best of internet style... I got impatient and starting prodding. After a few hard resets, I came up with the following: Yes, the Get/SetDisplayNormal() permits you to write directly to screen memory. This (...) (18 years ago, 11-Jan-07, to lugnet.robotics.nxt, lugnet.robotics)
|
12 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in...
NXT programmable brick
Robotics
|
|
|
|