Prusa MINI Firmware overview
screen_test_graph.c File Reference
#include "gui.h"
#include "config.h"
#include "window_temp_graph.h"
#include "cmsis_os.h"
#include <stdlib.h>

Classes

struct  screen_test_term_data_t
 
struct  _screen_test_term_t
 

Typedefs

typedef struct _screen_test_term_t screen_test_term_t
 

Functions

void window_temp_scope_add (float temp_ext, float temp_bed)
 
void screen_test_graph_init (screen_test_term_t *screen)
 
void screen_test_graph_done (screen_test_term_t *screen)
 
void screen_test_graph_draw (screen_test_term_t *screen)
 
int screen_test_graph_event (screen_test_term_t *screen, window_t *window, uint8_t event, void *param)
 

Variables

screen_tpscreen_menu_service
 
osThreadId displayTaskHandle
 
uint8_t i = 0
 
screen_test_term_t screen_test_graph
 
const screen_tpscreen_test_graph = (screen_t *)(&screen_test_graph)
 

Typedef Documentation

◆ screen_test_term_t

Function Documentation

◆ window_temp_scope_add()

void window_temp_scope_add ( float  temp_ext,
float  temp_bed 
)

◆ screen_test_graph_init()

void screen_test_graph_init ( screen_test_term_t screen)
35  {
36  if (screen->pd == 0) {
37  int16_t id;
38  //font_t* font = resource_font(IDR_FNT_TERMINAL);
40  screen->pd = pd;
41 
42  int16_t id0 = window_create_ptr(WINDOW_CLS_FRAME, -1, rect_ui16(0, 0, 0, 0), &(pd->frame));
43  pd->id_frame = id0;
45 
46  id = window_create_ptr(WINDOW_CLS_TEXT, id0, rect_ui16(10, 0, 220, 22), &(pd->text));
47  pd->id_text = id;
48  window_set_text(id, (const char *)"Test");
49 
50  id = window_create_ptr(WINDOW_CLS_TEMP_GRAPH, id0, rect_ui16(10, 28, 180, 180), &pd->graph);
51  pd->id_graph = id;
52 
53  id = window_create_ptr(WINDOW_CLS_TEXT, id0, rect_ui16(10, 220, 100, 22), &(pd->button));
54  pd->id_button = id;
55  window_set_text(id, (const char *)"Return");
56  window_enable(id);
57  window_set_tag(id, 1);
58  }
59 }
Here is the call graph for this function:

◆ screen_test_graph_done()

void screen_test_graph_done ( screen_test_term_t screen)
61  {
62  if (screen->pd) {
63  window_destroy(screen->pd->frame.win.id);
64  gui_free(screen->pd);
65  screen->pd = 0;
66  }
67 }
Here is the call graph for this function:

◆ screen_test_graph_draw()

void screen_test_graph_draw ( screen_test_term_t screen)
69  {
70 }

◆ screen_test_graph_event()

int screen_test_graph_event ( screen_test_term_t screen,
window_t window,
uint8_t  event,
void param 
)
74  {
75  //int winid = -1;
76  //if (window) window->id;
77 
78  if (event == WINDOW_EVENT_LOOP) {
79  if (i == 5) {
81  //osSignalSet(displayTaskHandle, SIG_DISP_REDRAW);
83  i = 0;
84  }
85  i++;
86  } else if (event == WINDOW_EVENT_CLICK) {
87  switch ((int)param) {
88  case 1:
89  //screen_open(pscreen_menu_service->id);
90  screen_close();
91  break;
92  }
93  }
94  return 0;
95 }
Here is the call graph for this function:

Variable Documentation

◆ pscreen_menu_service

screen_t* pscreen_menu_service

◆ displayTaskHandle

osThreadId displayTaskHandle

◆ i

uint8_t i = 0

◆ screen_test_graph

◆ pscreen_test_graph

const screen_t* pscreen_test_graph = (screen_t *)(&screen_test_graph)
_window_temp_graph_t::win
window_t win
Definition: window_temp_graph.h:19
gui_free
void gui_free(void *ptr)
Definition: gui.c:39
window_set_color_back
void window_set_color_back(int16_t id, color_t clr)
Definition: window.c:431
screen_test_term_data_t::graph
window_temp_graph_t graph
Definition: screen_test_graph.c:23
pd
#define pd
Definition: screen_filebrowser.cpp:39
rect_ui16
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
gui_malloc
void * gui_malloc(unsigned int size)
Definition: gui.c:35
window_destroy
void window_destroy(int16_t id)
Definition: window.c:132
i
uint8_t i
Definition: screen_test_graph.c:72
screen_event_t
int() screen_event_t(screen_t *screen, window_t *window, uint8_t event, void *param)
Definition: screen.h:13
screen_test_term_data_t
Definition: screen_test_graph.c:14
_window_t::id
int16_t id
Definition: window.h:79
screen_close
void screen_close(void)
Definition: screen.c:80
window_set_text
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
gui_invalidate
void gui_invalidate(void)
Definition: gui.c:66
screen_test_term_data_t::frame
window_frame_t frame
Definition: screen_test_graph.c:16
WINDOW_CLS_FRAME
#define WINDOW_CLS_FRAME
Definition: window.h:9
screen_init_t
void() screen_init_t(screen_t *screen)
Definition: screen.h:10
window_set_tag
void window_set_tag(int16_t id, uint8_t tag)
Definition: window.c:329
WINDOW_FLG_GRAPH_INVALID
#define WINDOW_FLG_GRAPH_INVALID
Definition: window_temp_graph.h:8
_window_frame_t::win
window_t win
Definition: window_frame.h:19
_screen_test_term_t::pd
screen_test_term_data_t * pd
Definition: screen_test_graph.c:28
screen_test_graph_draw
void screen_test_graph_draw(screen_test_term_t *screen)
Definition: screen_test_graph.c:69
WINDOW_CLS_TEXT
#define WINDOW_CLS_TEXT
Definition: window.h:10
WINDOW_EVENT_CLICK
#define WINDOW_EVENT_CLICK
Definition: window.h:46
window_create_ptr
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
window_enable
void window_enable(int16_t id)
Definition: window.c:517
COLOR_BLACK
#define COLOR_BLACK
Definition: guitypes.h:40
WINDOW_EVENT_LOOP
#define WINDOW_EVENT_LOOP
Definition: window.h:49
screen_draw_t
void() screen_draw_t(screen_t *screen)
Definition: screen.h:12
screen_done_t
void() screen_done_t(screen_t *screen)
Definition: screen.h:11
_window_t::flg
uint32_t flg
Definition: window.h:81
screen_test_graph_init
void screen_test_graph_init(screen_test_term_t *screen)
Definition: screen_test_graph.c:35
screen_test_graph_done
void screen_test_graph_done(screen_test_term_t *screen)
Definition: screen_test_graph.c:61
screen_test_graph_event
int screen_test_graph_event(screen_test_term_t *screen, window_t *window, uint8_t event, void *param)
Definition: screen_test_graph.c:74
WINDOW_CLS_TEMP_GRAPH
int16_t WINDOW_CLS_TEMP_GRAPH
Definition: window_temp_graph.c:8