63 lines
953 B
C
63 lines
953 B
C
#include "ui.h"
|
|
#include "lcd.h"
|
|
#include "tools.h"
|
|
#include "status.h"
|
|
|
|
uint16_t ui_cpt=0;
|
|
|
|
/*
|
|
lcd_init(20,4);
|
|
lcd_backlight(1);
|
|
lcd_clear();
|
|
lcd_home();
|
|
lcd_display();
|
|
lcd_setCursor(1,1);
|
|
lcdprint("** Pyro RF ! **");
|
|
spi_init_master();
|
|
_delay_ms(500);
|
|
lcd_setCursor(3,2);
|
|
lcdprint("Init");
|
|
*/
|
|
void ui_setup()
|
|
{
|
|
lcd_init(20,4);
|
|
lcd_backlight(1);
|
|
lcd_clear();
|
|
lcd_home();
|
|
lcd_display();
|
|
};
|
|
|
|
void ui_splash(){
|
|
lcd_setCursor(1,1);
|
|
lcdprint("** Pyro RF ! **");
|
|
lcd_setCursor(2,2);
|
|
lcdprint("A. Houdelette");
|
|
lcd_setCursor(3,4);
|
|
lcdprint("E. Langlois");
|
|
}
|
|
|
|
void ui_main(){
|
|
}
|
|
|
|
enum ui_states { UI_START, UI_INIT, UI_MAIN} ui_state = UI_START;
|
|
|
|
void ui_run(){
|
|
switch(ui_state){
|
|
case UI_START:
|
|
ui_setup();
|
|
ui_splash();
|
|
ui_state = UI_INIT;
|
|
ui_cpt=400; // 2s;
|
|
break;
|
|
case UI_INIT:
|
|
if(ui_cpt) return;
|
|
if(state==INIT) return;
|
|
lcd_clear();
|
|
ui_state=UI_MAIN;
|
|
|
|
case UI_MAIN:
|
|
ui_main();
|
|
break;
|
|
|
|
}
|
|
}
|