----------------
What to display?
----------------

Display size is 20 chars by 2 lines

SCREEN1: [MAIN]
=======
hostname (cdbs01) (6 chars) 13 chars left after a space
ip (15 chars)

Perhaps we can display something like 20050428-1709 (13 chars) with hostname on line 1
This time will update every 1 minute and be set to GPS time...

After the ip, we have 4 chars left after a space, perhaps this can show a number of sats tracked and a 'heartbeat'

So screen 1 will look like this:

--------------------
cdbs01 20050428-1729
128.138.190.231 09 *
--------------------

The '*' can flash on/off every time a subframe is decoded... or perhaps quicker, based on some other metric (watchdog?)

SCREEN2: [PRN]
=======
Perhaps display the first 7 PRN's tracking with CN0

--------------------
02|28|04|05|31|29|31
50|54|34|45|52|51|39
--------------------

SCREEN3: [TIME]
=======

Display GPS time with second update:

--------------------
Tue Apr 26 02:49:30 
2005 GPS
--------------------

SCREEN4:  [REBOOT]
=======

Give the user an option to cleanly reboot the system

SCREEN5: 
=======
IP: Option of DHCP or Static
Use arrow keys to select DHCP or Static. Must update net.eth0 accordingly.

If optio=static, screends 5-7 become available. The F1 key can be used at any time in screen 5-8 to execute '/etc/init.d/net.eth0 restart'. Screen 1 and 6-8 should be updated based on this new information.

SCREEN6:
=======
Enter IP - This will change /etc/init.d/net.eth0.
Will display field 000.000.000.000 use left/right arrow to
change cursur position, use up/down to cycle through 0-9.
'Enter' key will update the net.eth0 config

SCREEN7:
=======
Enter Netmask.

Screen8:
=======
Enter Gateway

Screen9:
=======
Enter DNS


--------------------
How to tackle this?
--------------------

What information is needed?
----

 S1 hostname
 S1 GPS Time (RTAI)
 S1 IP
 S1 Num of sats tracking (RTAI)
 S1 Heartbeat (RTAI)
 S2 First 7 PRNs tracked (RTAI)
 S3 Decoded GPS Time (RTAI)
 S4 Reboot
 S5 Static/Dynamic IP
 S6 IP field
 S7 Netmask field
 S8 Gateway field
 S9 DNS field

How to obtain this information?
----

S1: hostname - can get from gethostbyname or $HOSTNAME. 
    gps time - must obtain from RTAI module
    IP - get from ifconfig or gethostbyaddr
    numSats - from RTAI
    Heartbeat - tied to tow_sync perhaps? or ms_counter?
S2: Numsats - from RTAI
S3: Gps time - from RTAI
S4: Reboot - execute reboot as root
S5: Network - Must read /etc/conf.d/net to decide whether dynamic/static
              Any changes on this must immediately update conf.d/net.
              Enter on this page ALWAYS restarts the network.
S6: IP field - Only on when static, must get from ifconfig (if valid) or
               else from conf.d/net
S7: Netw mask - always read from ifconfig
S8: Gateway - always read from ifconfig
S9: DNS - always read from /etc/resolv.conf

Best way to do this?
---
display of non-rtai data: should just use function calls
display of rtai data: must check whether rtai module is running.
        best way is probably to try an rtai_malloc in user-side,
        if it fails, then the module is not loaded.

        Once the malloc works, all data is available in shm.

Data must be formatted for
 1) LCD
 2) Text file

If RTAI not loaded, must display useful info.

Other?
------

Backlight timer
Should dump human readable file for finger process
If RTAI module doesn't exist, or if it hasn't tracked sats
for a while, must flag this in a text file.

FIXME: If the button is held in long, it accumumlates MANY keys
and the program (with its DELAY) takes a long time to clear
the buffer.
