aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin/console/main.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-03-14 07:38:02 +1000
committerinmarket <andrewh@inmarket.com.au>2014-03-14 07:38:02 +1000
commit6f54bde79c553301a35535a0a71a4a09b181abfa (patch)
tree1408ad80459cd09da47960b4905d50195916639d /demos/modules/gwin/console/main.c
parent6d372f13528f44919ec193d03248d55a53484968 (diff)
parentea5a1b849df6e5085a92957ad387f9e653674415 (diff)
downloaduGFX-6f54bde79c553301a35535a0a71a4a09b181abfa.tar.gz
uGFX-6f54bde79c553301a35535a0a71a4a09b181abfa.tar.bz2
uGFX-6f54bde79c553301a35535a0a71a4a09b181abfa.zip
Merge branch 'master' into freertos
Diffstat (limited to 'demos/modules/gwin/console/main.c')
-rw-r--r--demos/modules/gwin/console/main.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/demos/modules/gwin/console/main.c b/demos/modules/gwin/console/main.c
index 83753c6c..14f68cd4 100644
--- a/demos/modules/gwin/console/main.c
+++ b/demos/modules/gwin/console/main.c
@@ -75,19 +75,28 @@ int main(void) {
/* Output some data on the first console */
for(i = 0; i < 10; i++) {
- gwinPrintf(GW1, "Hello uGFX!\r\n");
+ gwinPrintf(GW1, "Hello \033buGFX\033B!\n");
}
- /* Output some data on the second console */
- for(i = 0; i < 16; i++) {
- gwinPrintf(GW2, "Message Nr.: %d\r\n", i+1);
+ /* Output some data on the second console - Fast */
+ for(i = 0; i < 32; i++) {
+ gwinPrintf(GW2, "Message Nr.: \0331\033b%d\033B\033C\n", i+1);
}
- /* Output some data on the third console */
- for(i = 0; i < 18; i++) {
- gwinPrintf(GW3, "Message Nr.: %d\r\n", i+1);
+ /* Output some data on the third console - Slowly */
+ for(i = 0; i < 32; i++) {
+ gwinPrintf(GW3, "Message Nr.: \033u%d\033U\n", i+1);
+ gfxSleepMilliseconds(500);
}
+ /* Make console 3 invisible and then visible again to demonstrate the history buffer */
+ gwinPrintf(GW2, "Making red window \033uinvisible\033U\n");
+ gwinSetVisible(GW3, FALSE);
+ gfxSleepMilliseconds(1000);
+ gwinPrintf(GW2, "Making red window \033uvisible\033U\n");
+ gwinSetVisible(GW3, TRUE);
+ gwinPrintf(GW3, "\033bI'm back!!!\033B\n", i+1);
+
while(TRUE) {
gfxSleepMilliseconds(500);
}