#include "hmiworks.h"
#include "_frame0.h"
#pragma GCC diagnostic ignored "-Wunused-variable"

static tWidget *thisCanvas = (tWidget *)&CanvasFrame6;
static tContext globalContext;
static tContext *thisContext = &globalContext;

#pragma GCC diagnostic warning "-Wunused-variable"


static void ConnectWidgetVariable();
static void DisconnectWidgetVariable();
static const unsigned char pucImage_BitButton90[] = 
{
    IMAGE_FMT_4BPP_COMP,
    67, 0,
    25, 0,

    4,
    0x00, 0x00, 0x00,
    0x66, 0x66, 0x66,
    0x90, 0xa9, 0xad,
    0xd6, 0xe7, 0xe7,
    0xff, 0xff, 0xff,

    0x1f, 0x44, 0x44, 0x44, 0xe9, 0xd4, 0xa7, 0x5f, 0x11, 0x07, 0x10, 0x43,
    0x33, 0x33, 0x33, 0xe9, 0xd4, 0xa7, 0x87, 0x5f, 0x33, 0x32, 0x10, 0x43,
    0x07, 0x07, 0x77, 0x8f, 0x2a, 0x32, 0x10, 0x43, 0x07, 0x07, 0x77, 0x2a,
    0x1e, 0x32, 0x10, 0x43, 0x07, 0x07, 0x77, 0x2a, 0x32, 0x3c, 0x10, 0x43,
    0x07, 0x07, 0x77, 0x2a, 0x32, 0x10, 0x78, 0x43, 0x07, 0x07, 0x77, 0x2a,
    0x32, 0x10, 0x43, 0xf1, 0x07, 0x07, 0x77, 0x2a, 0x32, 0x10, 0x43, 0x03,
    0x06, 0x00, 0x00, 0x03, 0x30, 0x30, 0xd2, 0x01, 0x30, 0x60, 0x33, 0xd2,
    0x04, 0x33, 0x33, 0x32, 0x10, 0x43, 0xb7, 0x93, 0x03, 0x41, 0x32, 0x30,
    0x21, 0xc2, 0x06, 0x06, 0x33, 0x33, 0x32, 0x10, 0x43, 0x93, 0x21, 0x30,
    0x20, 0x00, 0x03, 0xd2, 0x33, 0x30, 0x00, 0x00, 0x00, 0x18, 0x33, 0x00,
    0x03, 0x89, 0x33, 0x32, 0x10, 0x43, 0xf5, 0xc3, 0x51, 0x19, 0xd2, 0x33,
    0xc1, 0x03, 0xd3, 0x45, 0x30, 0x33, 0x32, 0x10, 0x43, 0xc3, 0x03, 0x39,
    0xf4, 0x31, 0x3b, 0xc1, 0xd3, 0x30, 0x33, 0x32, 0x10, 0x7e, 0x43, 0xc3,
    0x22, 0x31, 0x3b, 0xc1, 0xd3, 0x30, 0x8f, 0x33, 0x32, 0x10, 0x43, 0xc3,
    0x22, 0x31, 0x0a, 0x78, 0x00, 0xc1, 0x09, 0xe9, 0x33, 0x32, 0x10, 0x43,
    0x81, 0xc3, 0x00, 0x00, 0x03, 0x30, 0x30, 0x03, 0xd1, 0x29, 0x33, 0x00,
    0xc2, 0x33, 0x89, 0x33, 0x30, 0x33, 0x1f, 0x32, 0x10, 0x43, 0xc3, 0x9b,
    0xb7, 0x6f, 0x21, 0x1e, 0x32, 0x10, 0x43, 0x07, 0x07, 0x77, 0x2a, 0x32,
    0x3c, 0x10, 0x43, 0x07, 0x07, 0x77, 0x2a, 0x32, 0x10, 0x78, 0x43, 0x07,
    0x07, 0x77, 0x2a, 0x32, 0x10, 0x43, 0xf1, 0x07, 0x07, 0x77, 0x2a, 0x32,
    0x10, 0x43, 0x07, 0xe3, 0x07, 0x77, 0x2a, 0x32, 0x10, 0x43, 0x07, 0x07,
    0xc0, 0x77, 0x2a, 0x32, 0x10, 0x42, 0x22, 0x22, 0x22, 0xf0, 0xe9, 0xd4,
    0xa7, 0x5f, 0x22, 0x22, 0x10, 0x11, 0x3e, 0x11, 0x11, 0xe9, 0xd4, 0xa7,
    0x5f, 0x11, 0x10,
};
static const unsigned char pucImagePress_BitButton90[] = 
{
    IMAGE_FMT_4BPP_COMP,
    67, 0,
    25, 0,

    4,
    0x00, 0x00, 0x00,
    0x66, 0x66, 0x66,
    0x90, 0xa9, 0xad,
    0xd6, 0xe7, 0xe7,
    0xff, 0xff, 0xff,

    0x1f, 0x11, 0x11, 0x11, 0xe9, 0xd4, 0xa7, 0x5f, 0x11, 0x07, 0x40, 0x12,
    0x22, 0x22, 0x22, 0xe9, 0xd4, 0xa7, 0x80, 0x5f, 0x22, 0x22, 0x40, 0x12,
    0x33, 0x33, 0x33, 0xf0, 0xe9, 0xd4, 0xa7, 0x5f, 0x33, 0x33, 0x40, 0x12,
    0xf3, 0x07, 0x07, 0x77, 0x2b, 0x40, 0x12, 0x07, 0x07, 0xcf, 0x77, 0x2b,
    0x40, 0x12, 0x07, 0x07, 0x77, 0x2b, 0x3c, 0x40, 0x12, 0x07, 0x07, 0x77,
    0x2b, 0x40, 0x12, 0xf2, 0x07, 0x07, 0x77, 0x2b, 0x40, 0x12, 0x03, 0x00,
    0x0c, 0x00, 0x03, 0x30, 0x30, 0xd2, 0x01, 0x30, 0x33, 0xc2, 0xd2, 0x05,
    0x33, 0x33, 0x40, 0x12, 0x93, 0x03, 0xdc, 0x41, 0x32, 0x30, 0x21, 0xc2,
    0x07, 0x33, 0x33, 0x31, 0x40, 0x12, 0x93, 0x21, 0x30, 0x00, 0x03, 0xd2,
    0x00, 0x33, 0x30, 0x00, 0x00, 0x00, 0x33, 0x00, 0x03, 0xc7, 0x89, 0x33,
    0x33, 0x40, 0x12, 0xc3, 0x51, 0x19, 0xaa, 0xd2, 0x33, 0xc1, 0x03, 0xd3,
    0x30, 0x33, 0x33, 0x2f, 0x40, 0x12, 0xc3, 0x03, 0x39, 0x31, 0x3b, 0xc1,
    0xa3, 0xd3, 0x30, 0x33, 0x33, 0x40, 0x12, 0xc3, 0x22, 0xf4, 0x31, 0x3b,
    0xc1, 0xd3, 0x30, 0x33, 0x33, 0x40, 0x7b, 0x12, 0xc3, 0x22, 0x31, 0x0a,
    0x00, 0xc1, 0x09, 0xc4, 0xe9, 0x33, 0x33, 0x40, 0x12, 0xc3, 0x00, 0x00,
    0x09, 0x03, 0x30, 0x30, 0x03, 0xd1, 0x33, 0x00, 0xc2, 0x48, 0x33, 0x89,
    0x33, 0x30, 0x33, 0x33, 0x40, 0x12, 0xf0, 0xc4, 0x94, 0xa7, 0x5f, 0x33,
    0x33, 0x40, 0x12, 0xf3, 0x07, 0x07, 0x77, 0x2b, 0x40, 0x12, 0x07, 0x07,
    0xcf, 0x77, 0x2b, 0x40, 0x12, 0x07, 0x07, 0x77, 0x2b, 0x3c, 0x40, 0x12,
    0x07, 0x07, 0x77, 0x2b, 0x40, 0x12, 0xf3, 0x07, 0x07, 0x77, 0x2b, 0x40,
    0x12, 0x07, 0x07, 0xcf, 0x77, 0x2b, 0x40, 0x12, 0x07, 0x07, 0x77, 0x2b,
    0x0f, 0x40, 0x44, 0x44, 0x44, 0xe9, 0xd4, 0xa7, 0x5f, 0x80, 0x11, 0x40,
};

#include "__frame6.h"

RectangularButton(BitButton90, WIDGET_ROOT, 0, 0, &g_sFoxLink240x320x16_HX8347A,
104, 289, 67, 25, PB_STYLE_RELEASE_NOTIFY|PB_STYLE_FILL|PB_STYLE_IMG|PB_STYLE_TEXT, ClrSilver, ClrSilver, 0, ClrSilver,
&g_sFontCm20, "", pucImage_BitButton90, pucImagePress_BitButton90, 0, 0,
OnBitButton90Click);
Canvas(LabelWidget91, WIDGET_ROOT, 0, 0,
       &g_sFoxLink240x320x16_HX8347A, 16, 12, 58, 46,
       CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT_OPAQUE
, 0xFFFFFF, 0x000000, 0x000000,
       &g_sFontCm14, "LabelWidget69",
       0, 0);
Canvas(LabelWidget92, WIDGET_ROOT, 0, 0,
       &g_sFoxLink240x320x16_HX8347A, 11, 64, 58, 46,
       CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT_OPAQUE
, 0xFFFFFF, 0x000000, 0x000000,
       &g_sFontCm14, "LabelWidget69",
       0, 0);
Canvas(LabelWidget93, WIDGET_ROOT, 0, 0,
       &g_sFoxLink240x320x16_HX8347A, 9, 114, 58, 46,
       CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT_OPAQUE
, 0xFFFFFF, 0x000000, 0x000000,
       &g_sFontCm14, "LabelWidget69",
       0, 0);
Canvas(LabelWidget94, WIDGET_ROOT, 0, 0,
       &g_sFoxLink240x320x16_HX8347A, 11, 165, 58, 46,
       CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT_OPAQUE
, 0xFFFFFF, 0x000000, 0x000000,
       &g_sFontCm14, "LabelWidget69",
       0, 0);
Canvas(LabelWidget95, WIDGET_ROOT, 0, 0,
       &g_sFoxLink240x320x16_HX8347A, 90, 10, 58, 46,
       CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT_OPAQUE
, 0xFFFFFF, 0x000000, 0x000000,
       &g_sFontCm14, "LabelWidget69",
       0, 0);
Canvas(LabelWidget98, WIDGET_ROOT, 0, 0,
       &g_sFoxLink240x320x16_HX8347A, 86, 65, 58, 46,
       CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT_OPAQUE
, 0xFFFFFF, 0x000000, 0x000000,
       &g_sFontCm14, "LabelWidget69",
       0, 0);
Canvas(LabelWidget100, WIDGET_ROOT, 0, 0,
       &g_sFoxLink240x320x16_HX8347A, 89, 117, 58, 46,
       CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT_OPAQUE
, 0xFFFFFF, 0x000000, 0x000000,
       &g_sFontCm14, "LabelWidget69",
       0, 0);
Canvas(LabelWidget101, WIDGET_ROOT, 0, 0,
       &g_sFoxLink240x320x16_HX8347A, 89, 166, 58, 46,
       CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT_OPAQUE
, 0xFFFFFF, 0x000000, 0x000000,
       &g_sFontCm14, "LabelWidget69",
       0, 0);


Canvas(CanvasFrame6, WIDGET_ROOT, 0, 0, &g_sFoxLink240x320x16_HX8347A, 0, 0,
       240, 320, CANVAS_STYLE_APP_DRAWN, 0, 0, 0, 0, 0, 0, OnFrame669Paint);


void renderFrame669Vector(tContext *pContext, int ox, int oy) {
}
void OnFrame669Paint(tWidget *pWidget, tContext *pContext)
{
        hmi_SetForeground(pContext, 0xFFFFFF);
        hmi_FillRect(pContext, 0, 0, 240, 320);
renderFrame669Vector(pContext, 0, 0);
}


static void InitGlobalContext()
{
  GrContextInit(thisContext, thisCanvas->pDisplay);
  GrContextClipRegionSet(thisContext, &(thisCanvas->sPosition));
}
void InitWidget6()
{
    WidgetAdd(WIDGET_ROOT, (tWidget *)(&CanvasFrame6));
    WidgetAdd(WIDGET_ROOT, (tWidget *)&BitButton90);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&LabelWidget91);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&LabelWidget92);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&LabelWidget93);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&LabelWidget94);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&LabelWidget95);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&LabelWidget98);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&LabelWidget100);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&LabelWidget101);
    InitGlobalContext();
    WidgetPaint(WIDGET_ROOT);
    ConnectWidgetVariable();
}

void FreeWidget6()
{
    DisconnectWidgetVariable();
    WidgetRemove((tWidget *)(&CanvasFrame6));
    WidgetRemove((tWidget *)(&BitButton90));
    WidgetRemove((tWidget *)(&LabelWidget91));
    WidgetRemove((tWidget *)(&LabelWidget92));
    WidgetRemove((tWidget *)(&LabelWidget93));
    WidgetRemove((tWidget *)(&LabelWidget94));
    WidgetRemove((tWidget *)(&LabelWidget95));
    WidgetRemove((tWidget *)(&LabelWidget98));
    WidgetRemove((tWidget *)(&LabelWidget100));
    WidgetRemove((tWidget *)(&LabelWidget101));
}


void OnBitButton90Click(tWidget *pWidget) 
{
  hmi_GotoFrameByName("Frame1");
}


static void LabelWidget91_display_I_7018_21_AI0(PVAR pv)
{
static char buf[10];
usprintf(buf, "%d", PVAR_GET(pv));
CanvasTextSet(&LabelWidget91,buf);
CanvasMsgProc((tWidget*)&LabelWidget91, WIDGET_MSG_PAINT,0,0);
}
static void LabelWidget92_display_I_7018_21_AI1(PVAR pv)
{
static char buf[10];
usprintf(buf, "%d", PVAR_GET(pv));
CanvasTextSet(&LabelWidget92,buf);
CanvasMsgProc((tWidget*)&LabelWidget92, WIDGET_MSG_PAINT,0,0);
}
static void LabelWidget93_display_I_7018_21_AI2(PVAR pv)
{
static char buf[10];
usprintf(buf, "%d", PVAR_GET(pv));
CanvasTextSet(&LabelWidget93,buf);
CanvasMsgProc((tWidget*)&LabelWidget93, WIDGET_MSG_PAINT,0,0);
}
static void LabelWidget94_display_I_7018_21_AI3(PVAR pv)
{
static char buf[10];
usprintf(buf, "%d", PVAR_GET(pv));
CanvasTextSet(&LabelWidget94,buf);
CanvasMsgProc((tWidget*)&LabelWidget94, WIDGET_MSG_PAINT,0,0);
}
static void LabelWidget95_display_I_7018_21_AI4(PVAR pv)
{
static char buf[10];
usprintf(buf, "%d", PVAR_GET(pv));
CanvasTextSet(&LabelWidget95,buf);
CanvasMsgProc((tWidget*)&LabelWidget95, WIDGET_MSG_PAINT,0,0);
}
static void LabelWidget98_display_I_7018_21_AI5(PVAR pv)
{
static char buf[10];
usprintf(buf, "%d", PVAR_GET(pv));
CanvasTextSet(&LabelWidget98,buf);
CanvasMsgProc((tWidget*)&LabelWidget98, WIDGET_MSG_PAINT,0,0);
}
static void LabelWidget100_display_I_7018_21_AI6(PVAR pv)
{
static char buf[10];
usprintf(buf, "%d", PVAR_GET(pv));
CanvasTextSet(&LabelWidget100,buf);
CanvasMsgProc((tWidget*)&LabelWidget100, WIDGET_MSG_PAINT,0,0);
}
static void LabelWidget101_display_I_7018_21_AI7(PVAR pv)
{
static char buf[10];
usprintf(buf, "%d", PVAR_GET(pv));
CanvasTextSet(&LabelWidget101,buf);
CanvasMsgProc((tWidget*)&LabelWidget101, WIDGET_MSG_PAINT,0,0);
}
static void display_I_7018_21_AI0(PVAR pv)
{
  LabelWidget91_display_I_7018_21_AI0(pv);
}

static void display_I_7018_21_AI1(PVAR pv)
{
  LabelWidget92_display_I_7018_21_AI1(pv);
}

static void display_I_7018_21_AI2(PVAR pv)
{
  LabelWidget93_display_I_7018_21_AI2(pv);
}

static void display_I_7018_21_AI3(PVAR pv)
{
  LabelWidget94_display_I_7018_21_AI3(pv);
}

static void display_I_7018_21_AI4(PVAR pv)
{
  LabelWidget95_display_I_7018_21_AI4(pv);
}

static void display_I_7018_21_AI5(PVAR pv)
{
  LabelWidget98_display_I_7018_21_AI5(pv);
}

static void display_I_7018_21_AI6(PVAR pv)
{
  LabelWidget100_display_I_7018_21_AI6(pv);
}

static void display_I_7018_21_AI7(PVAR pv)
{
  LabelWidget101_display_I_7018_21_AI7(pv);
}

static void ConnectWidgetVariable()
{
  WidgetMessageQueueProcess();
  I_7018_21_AI0.dirty = 1;
  I_7018_21_AI0.display = display_I_7018_21_AI0;
  I_7018_21_AI1.dirty = 1;
  I_7018_21_AI1.display = display_I_7018_21_AI1;
  I_7018_21_AI2.dirty = 1;
  I_7018_21_AI2.display = display_I_7018_21_AI2;
  I_7018_21_AI3.dirty = 1;
  I_7018_21_AI3.display = display_I_7018_21_AI3;
  I_7018_21_AI4.dirty = 1;
  I_7018_21_AI4.display = display_I_7018_21_AI4;
  I_7018_21_AI5.dirty = 1;
  I_7018_21_AI5.display = display_I_7018_21_AI5;
  I_7018_21_AI6.dirty = 1;
  I_7018_21_AI6.display = display_I_7018_21_AI6;
  I_7018_21_AI7.dirty = 1;
  I_7018_21_AI7.display = display_I_7018_21_AI7;
}

static void DisconnectWidgetVariable()
{
  I_7018_21_AI0.display = 0;
  I_7018_21_AI1.display = 0;
  I_7018_21_AI2.display = 0;
  I_7018_21_AI3.display = 0;
  I_7018_21_AI4.display = 0;
  I_7018_21_AI5.display = 0;
  I_7018_21_AI6.display = 0;
  I_7018_21_AI7.display = 0;
}

void _frame6()
{
  var_table_init();
  FreeCurrentFrame();
  _CurrentFrame = 6;
  InitWidget6();
}

