more feature
This commit is contained in:
@@ -7,26 +7,33 @@ Select standard motherboard and standard backplane for testing.
|
||||
Created by Lewis he on October 10, 2019.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "gui.h"
|
||||
#include "powermgm.h"
|
||||
#include "motor.h"
|
||||
#include "splashscreen.h"
|
||||
#include "gui/gui.h"
|
||||
#include "gui/splashscreen.h"
|
||||
#include "gui/screenshot.h"
|
||||
|
||||
#include "hardware/display.h"
|
||||
#include "hardware/powermgm.h"
|
||||
#include "hardware/motor.h"
|
||||
|
||||
TTGOClass *ttgo = TTGOClass::getWatch();;
|
||||
|
||||
void setup()
|
||||
{
|
||||
motor_setup();
|
||||
Serial.begin(115200);
|
||||
ttgo->begin();
|
||||
ttgo->lvgl_begin();
|
||||
ttgo->lvgl_begin();
|
||||
|
||||
SPIFFS.begin();
|
||||
display_setup( ttgo );
|
||||
|
||||
screenshot_setup();
|
||||
|
||||
splash_screen_stage_one( ttgo );
|
||||
splash_screen_stage_update( "init serial", 10 );
|
||||
|
||||
Serial.begin(115200);
|
||||
Serial.printf("startup ...");
|
||||
|
||||
splash_screen_stage_update( "init spiff", 20 );
|
||||
if ( !SPIFFS.begin() ) {
|
||||
splash_screen_stage_update( "format spiff", 30 );
|
||||
@@ -40,18 +47,23 @@ void setup()
|
||||
splash_screen_stage_update( "init gui", 100 );
|
||||
splash_screen_stage_finish( ttgo );
|
||||
|
||||
gui_setup();
|
||||
gui_setup();
|
||||
lv_task_handler();
|
||||
|
||||
ttgo->bl->adjust( 0 );
|
||||
for( int bl = 0 ; bl < DEFAULT_BACKLIGHT ; bl++ ) {
|
||||
for( int bl = 0 ; bl < display_get_brightness() ; bl++ ) {
|
||||
ttgo->bl->adjust( bl );
|
||||
delay(10);
|
||||
}
|
||||
delay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
static int i = 0;
|
||||
gui_loop( ttgo );
|
||||
powermgm_loop( ttgo );
|
||||
if ( i == 0 ) {
|
||||
screenshot_take();
|
||||
i++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user