Enumerations | Functions

xpal_StatBar.h File Reference

Functions and Definitions to control the StatusBar. More...

Go to the source code of this file.

Enumerations

enum  hl_stb_state_t { stbDisable = 0, stbEnable = 1 }
 

StatBar State.


enum  hl_stb_BatSym_t {
  FullOpMax = 0x39, FullOp4 = 0x38, FullOp3 = 0x37, FullOp2 = 0x36,
  FullOp1 = 0x35, FullOpMin = 0x34, LimitOp3 = 0x33, LimitOp2 = 0x32,
  LimitOp1 = 0x31, Empty = 0x30
}
 

Battery symbol selector.

More...
enum  hl_stb_GPSSym_t {
  GpsNoLock = 0x26, GpsLock3 = 0x27, GpsLock4 = 0x28, GpsLock5 = 0x29,
  GpsLock6 = 0x2A, GpsLock7 = 0x2B, GpsLock8 = 0x2C
}
 

GPS symbol selector.

More...
enum  hl_stb_Sym_t {
  EmptySymbol = 0x20, BattNi = 0x21, BattPrimary = 0x22, SDcard = 0x23,
  SDcardActive = 0x24, USBsymbol = 0x25, SLEEPsymbol = 0x2D, IDLEsymbol = 0x2E,
  RUNsymbol = 0x2F, ExtIface = 0x3E, ExtIfActive = 0x3F
}
 

Status Symbol code definition.

More...

Functions

void hl_stb_init (void)
 init the display status bar
void hl_stb_disable (void)
 disable status write to allow apps to use the area
void hl_stb_enable (void)
 enable status write
void hl_stb_BattState (hl_stb_BatSym_t state)
 set batt stat display
void hl_stb_GPSState (hl_stb_GPSSym_t state)
 set GPS stat display
void hl_stb_SDState (hl_stb_Sym_t state)
 set SD Card stat display
void hl_stb_PwrState (hl_stb_Sym_t state)
 set Power stat display
void hl_stb_IOState (hl_stb_Sym_t state)
 set IO stat display
void hl_stb_WriteTime (const char *time)
 write time string
void hl_stb_WriteSeconds (const char *seconds)
 write second string
void hl_stb_WriteDate (const char *date)
 write date string

Detailed Description

Functions and Definitions to control the StatusBar.


Enumeration Type Documentation

Battery symbol selector.

Enumerator:
FullOpMax 

Battery full (9).

FullOp4 

Battery full (8).

FullOp3 

Battery full (7).

FullOp2 

Battery full (6).

FullOp1 

Battery full (5).

FullOpMin 

Min Level for full operation (4).

LimitOp3 

Battery full (3).

LimitOp2 

Battery full (2).

LimitOp1 

Battery full (1).

Empty 

Battery full (0).

             {
  FullOpMax  = 0x39, 
  FullOp4    = 0x38, 
  FullOp3    = 0x37, 
  FullOp2    = 0x36, 
  FullOp1    = 0x35, 
  FullOpMin  = 0x34, 
  LimitOp3   = 0x33, 
  LimitOp2   = 0x32, 
  LimitOp1   = 0x31, 
  Empty      = 0x30, 
} hl_stb_BatSym_t;

GPS symbol selector.

Enumerator:
GpsNoLock 

Symbol GPS no Sat. Lock.

GpsLock3 

Symbol GPS 3 Sat's Locked.

GpsLock4 

Symbol GPS 4 Sat's Locked.

GpsLock5 

Symbol GPS 5 Sat's Locked.

GpsLock6 

Symbol GPS 6 Sat's Locked.

GpsLock7 

Symbol GPS 7 Sat's Locked.

GpsLock8 

Symbol GPS 8 Sat's Locked.

             {
  GpsNoLock  = 0x26, 
  GpsLock3   = 0x27, 
  GpsLock4   = 0x28, 
  GpsLock5   = 0x29, 
  GpsLock6   = 0x2A, 
  GpsLock7   = 0x2B, 
  GpsLock8   = 0x2C, 
} hl_stb_GPSSym_t;

Status Symbol code definition.

Enumerator:
EmptySymbol 

Empty Symbol to clear a symbol position.

BattNi 

Ni Symbol for Ni Accu.

BattPrimary 

PR Symbol for primary 1.5V Battery eg. alcaline.

SDcard 

SD Card Symbol - SD Card detected.

SDcardActive 

SD Card Active Symbol eg. file open or rd/wr.

USBsymbol 

Symbol to indicate USB connection.

SLEEPsymbol 

Symbol to indicate that sleep mode is used.

IDLEsymbol 

Symbol to indicate that idle mode is used.

RUNsymbol 

Symbol to indicate that CPU runs 100% active.

ExtIface 

Symbol to indicate that the external Interface is connected.

ExtIfActive 

Symbol to indicate that the external Interface is active.

             {
  EmptySymbol   = 0x20, 

  BattNi                = 0x21, 
  BattPrimary   = 0x22, 

  SDcard                = 0x23, 
  SDcardActive  = 0x24, 

  USBsymbol             = 0x25, 
  SLEEPsymbol   = 0x2D, 
  IDLEsymbol    = 0x2E, 
  RUNsymbol             = 0x2F, 

  ExtIface              = 0x3E, 
  ExtIfActive   = 0x3F, 

} hl_stb_Sym_t;


Function Documentation

void hl_stb_init ( void   ) 

init the display status bar

  • clear area

init fields and vars

The function assumes an enabled state.

  • clear area

init fields and vars

                      {

        stb_state = stbEnable;

        // clear area
        hl_lcd_set_rectangle(HL_STB_MIN_X, HL_STB_MIN_Y, HL_STB_MAX_X, HL_STB_MAX_Y, op_clear);

        // draw border line
        hl_lcd_set_line_horiz(HL_STB_MIN_X, HL_STB_MAX_Y, HL_STB_MAX_X+1, op_set);
}

void hl_stb_WriteDate ( const char *  date  ) 

write date string

Function will write the full date string string will be truncated after character 8

                                       {

        if(stb_state == stbEnable){
                // Draw new time string when drawing is allowed
                hl_lcd_set_font (&font_8x8);
                hl_lcd_drawstrn(HL_DATE_X, HL_DATE_Y, date, HL_DATE_LEN);
                RestoreFont();
        }
}

void hl_stb_WriteSeconds ( const char *  seconds  ) 

write second string

Function will write the 2 second Characters only string will be truncated after character 2

                                             {

        if(stb_state == stbEnable){
                // Draw new time string when drawing is allowed
                hl_lcd_set_font (&font_8x8);
                hl_lcd_drawstrn(HL_TIME_X + (8*HL_TIME_LEN) - 2, HL_TIME_Y, seconds, 2);
                RestoreFont();
        }
}

void hl_stb_WriteTime ( const char *  time  ) 

write time string

Function will write the full time string string will be truncated after character 8

                                       {

        if(stb_state == stbEnable){
                // Draw new time string when drawing is allowed
                hl_lcd_set_font (&font_8x8);
                hl_lcd_drawstrn(HL_TIME_X, HL_TIME_Y, time, HL_TIME_LEN);
                RestoreFont();
        }
}