Prusa MINI Firmware overview
status_footer.h File Reference
#include "gui.h"

Go to the source code of this file.

Classes

struct  status_footer_t
 

Macros

#define BUTTON_STATUS_NOZZLE   0xf0
 
#define BUTTON_STATUS_HEATBED   0xf1
 
#define BUTTON_STATUS_PRNSPEED   0xf2
 
#define BUTTON_STATUS_Z_AXIS   0xf3
 
#define BUTTON_STATUS_FILAMENT   0xf4
 

Functions

void status_footer_init (status_footer_t *footer, int16_t parent)
 
int status_footer_event (status_footer_t *footer, window_t *window, uint8_t event, const void *param)
 

Macro Definition Documentation

◆ BUTTON_STATUS_NOZZLE

#define BUTTON_STATUS_NOZZLE   0xf0

◆ BUTTON_STATUS_HEATBED

#define BUTTON_STATUS_HEATBED   0xf1

◆ BUTTON_STATUS_PRNSPEED

#define BUTTON_STATUS_PRNSPEED   0xf2

◆ BUTTON_STATUS_Z_AXIS

#define BUTTON_STATUS_Z_AXIS   0xf3

◆ BUTTON_STATUS_FILAMENT

#define BUTTON_STATUS_FILAMENT   0xf4

Function Documentation

◆ status_footer_init()

void status_footer_init ( status_footer_t footer,
int16_t  parent 
)
27  {
28  int16_t id;
29 
30  strcpy(footer->text_nozzle, "0/0\177C");
31  strcpy(footer->text_heatbed, "0/0\177C");
32  strcpy(footer->text_prnspeed, "0%");
33  strcpy(footer->text_z_axis, "999.95");
34 
35  id = window_create_ptr( // nozzle
36  WINDOW_CLS_ICON, parent,
37  rect_ui16(8, 270, 16, 16), // 2px padding from right
38  &(footer->wi_nozzle));
41  // window_enable(id);
42 
43  id = window_create_ptr(
44  WINDOW_CLS_TEXT, parent,
45  rect_ui16(24, 269, 85, 20),
46  &(footer->wt_nozzle));
49  window_set_text(id, footer->text_nozzle);
50 
51  id = window_create_ptr( // heatbed
52  WINDOW_CLS_ICON, parent,
53  rect_ui16(128, 270, 20, 16),
54  &(footer->wi_heatbed));
57  //window_enable(id);
58 
59  id = window_create_ptr(
60  WINDOW_CLS_TEXT, parent,
61  rect_ui16(150, 269, 85, 22),
62  &(footer->wt_heatbed));
65  window_set_text(id, footer->text_heatbed);
66 
67  id = window_create_ptr( // prnspeed
68  WINDOW_CLS_ICON, parent,
69  rect_ui16(10, 297, 16, 12),
70  &(footer->wi_prnspeed));
73  //window_enable(id);
74 
75  id = window_create_ptr(
76  WINDOW_CLS_TEXT, parent,
77  rect_ui16(28, 296, 40, 22),
78  &(footer->wt_prnspeed));
81  window_set_text(id, footer->text_prnspeed);
82 
83  id = window_create_ptr( // z-axis
84  WINDOW_CLS_ICON, parent,
85  rect_ui16(80, 297, 16, 16),
86  &(footer->wi_z_axis));
89  //window_enable(id);
90 
91  id = window_create_ptr(
92  WINDOW_CLS_TEXT, parent,
93  rect_ui16(102, 296, 58, 22),
94  &(footer->wt_z_axis));
97  window_set_text(id, footer->text_z_axis);
98 
99  id = window_create_ptr( // filament
100  WINDOW_CLS_ICON, parent,
101  rect_ui16(163, 297, 16, 16),
102  &(footer->wi_filament));
105  //window_enable(id);
106 
107  id = window_create_ptr(
108  WINDOW_CLS_TEXT, parent,
109  rect_ui16(181, 296, 49, 22),
110  &(footer->wt_filament));
114 
115  status_footer_timer(footer, 0); // do update
116 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ status_footer_event()

int status_footer_event ( status_footer_t footer,
window_t window,
uint8_t  event,
const void param 
)
119  {
120  status_footer_timer(footer, (HAL_GetTick() / 50) * 50);
121 
122  if (event != WINDOW_EVENT_CLICK) {
123  return 0;
124  }
125 
126  switch ((int)param) {
132  return 0;
133  }
134  return 0;
135 }
Here is the call graph for this function:
Here is the caller graph for this function:
IDR_PNG_status_icon_heatbed
#define IDR_PNG_status_icon_heatbed
Definition: resource.h:21
window_set_alignment
void window_set_alignment(int16_t id, uint8_t alignment)
Definition: window.c:561
ALIGN_CENTER
#define ALIGN_CENTER
Definition: guitypes.h:19
rect_ui16
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
IDR_PNG_status_icon_prnspeed
#define IDR_PNG_status_icon_prnspeed
Definition: resource.h:22
IDR_FNT_SPECIAL
#define IDR_FNT_SPECIAL
Definition: resource.h:13
window_set_icon_id
void window_set_icon_id(int16_t id, uint16_t id_res)
Definition: window.c:659
IDR_PNG_status_icon_z_axis
#define IDR_PNG_status_icon_z_axis
Definition: resource.h:24
filaments
const filament_t filaments[FILAMENTS_END]
Definition: filament.cpp:20
IDR_PNG_status_icon_nozzle
#define IDR_PNG_status_icon_nozzle
Definition: resource.h:20
HAL_GetTick
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f4xx_hal.c:339
window_set_text
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
get_filament
FILAMENT_t get_filament()
Definition: filament.cpp:41
netif::name
char name[2]
Definition: netif.h:307
window_set_tag
void window_set_tag(int16_t id, uint8_t tag)
Definition: window.c:329
WINDOW_CLS_ICON
#define WINDOW_CLS_ICON
Definition: window.h:12
WINDOW_CLS_TEXT
#define WINDOW_CLS_TEXT
Definition: window.h:10
resource_font
font_t * resource_font(uint16_t id)
Definition: guitypes.c:186
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_text_t::font
font_t * font
Definition: window_text.h:19
IDR_PNG_status_icon_filament
#define IDR_PNG_status_icon_filament
Definition: resource.h:23