Prusa MINI Firmware overview
|
#include "config.h"
#include "status_footer.h"
#include "filament.h"
#include "../Marlin/src/module/temperature.h"
#include "../Marlin/src/module/planner.h"
|
void | status_footer_timer (status_footer_t *footer, uint32_t mseconds) |
|
void | status_footer_update_temperatures (status_footer_t *footer, bool &heating_nozzle, bool &heating_heatbed, bool &cooling_nozzle, bool &cooling_heatbed) |
|
void | status_footer_update_feedrate (status_footer_t *footer) |
|
void | status_footer_update_z_axis (status_footer_t *footer) |
|
void | status_footer_update_filament (status_footer_t *footer) |
|
void | status_footer_indicate_nozzle (window_text_t *nozzle, bool heating, bool cooling) |
|
void | status_footer_indicate_heatbed (window_text_t *heatbed, bool heating, bool cooling) |
|
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) |
|
◆ HEATING_DIFFERENCE
#define HEATING_DIFFERENCE 2 |
◆ status_footer_timer()
138 bool heating_nozzle =
false;
139 bool cooling_nozzle =
false;
140 bool heating_heatbed =
false;
141 bool cooling_heatbed =
false;
147 cooling_nozzle, cooling_heatbed);
◆ status_footer_update_temperatures()
void status_footer_update_temperatures |
( |
status_footer_t * |
footer, |
|
|
bool & |
heating_nozzle, |
|
|
bool & |
heating_heatbed, |
|
|
bool & |
cooling_nozzle, |
|
|
bool & |
cooling_heatbed |
|
) |
| |
178 cooling_nozzle = (target_nozzle < (actual_nozzle -
HEATING_DIFFERENCE) && actual_nozzle > 50);
180 cooling_heatbed = (target_heatbed < (actual_heatbed -
HEATING_DIFFERENCE) && actual_heatbed > 45);
182 if (heating_nozzle && target_nozzle != footer->
nozzle) {
183 footer->
nozzle = target_nozzle;
184 }
else if (!heating_nozzle && actual_nozzle != footer->
nozzle) {
185 footer->
nozzle = actual_nozzle;
187 sprintf(footer->
text_nozzle,
"%.0f/%.0f\177C", (
double)actual_nozzle, (
double)target_nozzle);
190 if (heating_heatbed && target_heatbed != footer->
heatbed) {
191 footer->
heatbed = target_heatbed;
192 }
else if (!heating_heatbed && actual_heatbed != footer->
heatbed) {
193 footer->
heatbed = actual_heatbed;
195 sprintf(footer->
text_heatbed,
"%.0f/%.0f\177C", (
double)actual_heatbed, (
double)target_heatbed);
198 #ifdef LCD_HEATBREAK_TO_FILAMENT
201 sprintf(footer->text_heatbreak,
"%.0f\177C", (
double)actual_heatbreak);
203 #endif //LCD_HEATBREAK_TO_FILAMENT
◆ status_footer_update_feedrate()
◆ status_footer_update_z_axis()
◆ status_footer_update_filament()
221 #ifndef LCD_HEATBREAK_TO_FILAMENT
◆ status_footer_indicate_nozzle()
void status_footer_indicate_nozzle |
( |
window_text_t * |
nozzle, |
|
|
bool |
heating, |
|
|
bool |
cooling |
|
) |
| |
230 }
else if (heating) {
232 }
else if (cooling) {
◆ status_footer_indicate_heatbed()
void status_footer_indicate_heatbed |
( |
window_text_t * |
heatbed, |
|
|
bool |
heating, |
|
|
bool |
cooling |
|
) |
| |
241 }
else if (heating) {
243 }
else if (cooling) {
◆ status_footer_init()
◆ status_footer_event()
126 switch ((
int)param) {
#define IDR_PNG_status_icon_heatbed
Definition: resource.h:21
void window_set_alignment(int16_t id, uint8_t alignment)
Definition: window.c:561
static FORCE_INLINE int16_t degTargetHotend(const uint8_t E_NAME)
Definition: temperature.h:562
#define COLOR_WHITE
Definition: guitypes.h:41
#define ALIGN_CENTER
Definition: guitypes.h:19
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
#define IDR_PNG_status_icon_prnspeed
Definition: resource.h:22
#define IDR_FNT_SPECIAL
Definition: resource.h:13
void window_set_icon_id(int16_t id, uint16_t id_res)
Definition: window.c:659
static FORCE_INLINE float degHotend(const uint8_t E_NAME)
Definition: temperature.h:544
#define IDR_PNG_status_icon_z_axis
Definition: resource.h:24
const filament_t filaments[FILAMENTS_END]
Definition: filament.cpp:20
#define IDR_PNG_status_icon_nozzle
Definition: resource.h:20
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f4xx_hal.c:339
int16_t id
Definition: window.h:79
xyze_pos_t current_position
Definition: motion.cpp:102
int16_t feedrate_percentage
Definition: motion.cpp:139
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
#define COLOR_ORANGE
Definition: guitypes.h:57
FILAMENT_t get_filament()
Definition: filament.cpp:41
char name[2]
Definition: netif.h:307
void window_set_tag(int16_t id, uint8_t tag)
Definition: window.c:329
#define COLOR_BLUE
Definition: guitypes.h:45
#define WINDOW_CLS_ICON
Definition: window.h:12
#define WINDOW_CLS_TEXT
Definition: window.h:10
font_t * resource_font(uint16_t id)
Definition: guitypes.c:186
#define WINDOW_EVENT_CLICK
Definition: window.h:46
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
color_t window_get_color_text(int16_t id)
Definition: window.c:469
font_t * font
Definition: window_text.h:19
Nozzle nozzle
Definition: nozzle.cpp:29
Temperature thermalManager
Definition: temperature.cpp:89
void window_set_color_text(int16_t id, color_t clr)
Definition: window.c:457
#define IDR_PNG_status_icon_filament
Definition: resource.h:23
window_t win
Definition: window_text.h:16