esp32 firmware for a toaster reflow oven WIP!!!!!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
reflower/main/scenes/scene_bootanim.c

36 lines
829 B

#include <malloc.h>
#include <stdio.h>
#include <graphics/bitmaps.h>
#include "scenes.h"
#include "liquid.h"
#include "analog.h"
#include "graphics/nokia.h"
#include "graphics/drawing.h"
struct BootScene {
struct Scene base;
uint32_t cnt;
};
static struct SceneEvent Boot_onTick(struct BootScene *self) {
self->cnt += 10; // ms
if (self->cnt == 2000) {
return SceneEvent_Close(0, NULL);
}
return SceneEvent_None();
}
static void Boot_paint(struct BootScene *self)
{
LCD_clearDisplay(0);
LCD_setBitmap(Bitmap_Get("boot_logo")->bytes);
}
struct Scene *NewScene_Boot(void) {
struct BootScene *scene = calloc(1, sizeof(struct BootScene));
scene->base.paint = (Scene_paint_t) Boot_paint;
scene->base.onTick = (Scene_onTick_t) Boot_onTick;
return (struct Scene *) scene;
}