Functions | Variables

xpal_StatBar.c File Reference

Functions to control the Status Bar Display. More...

#include "config.h"
#include "display.h"
#include "xpal_disp_areas.h"
#include "fontlist.h"
#include "xpal_StatBar.h"

Functions

void RestoreFont (void)
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

Variables

hl_stb_state_t stb_state

Detailed Description

Functions to control the Status Bar Display.


Function Documentation

void hl_stb_init ( void   ) 

init the display status bar

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();
        }
}