50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/task.h>
|
|
#include <lvgl.h>
|
|
#include <tt_app.h>
|
|
|
|
typedef struct {
|
|
volatile bool running;
|
|
volatile bool http_ready;
|
|
volatile bool http_exited;
|
|
volatile bool discovery_ready;
|
|
volatile bool visible;
|
|
volatile bool override_active;
|
|
|
|
int http_socket;
|
|
int client_socket;
|
|
int discovery_socket;
|
|
TaskHandle_t http_task;
|
|
TaskHandle_t discovery_task;
|
|
|
|
AppHandle app;
|
|
lv_obj_t* draw_area;
|
|
lv_obj_t* server_label;
|
|
lv_obj_t* tool_label;
|
|
|
|
uint16_t display_width;
|
|
uint16_t display_height;
|
|
uint16_t draw_width;
|
|
uint16_t draw_height;
|
|
int draw_color;
|
|
} McpScreenState;
|
|
|
|
bool mcp_services_start(McpScreenState* state);
|
|
void mcp_services_stop(McpScreenState* state);
|
|
|
|
void mcp_ui_set_server_status(McpScreenState* state, const char* status);
|
|
void mcp_ui_set_last_tool(McpScreenState* state, const char* tool);
|
|
bool mcp_ui_clear(McpScreenState* state, int color);
|
|
bool mcp_ui_draw_text(
|
|
McpScreenState* state,
|
|
const char* text,
|
|
int x,
|
|
int y,
|
|
int size
|
|
);
|