Prusa MINI Firmware overview
ExtUI Namespace Reference

Functions

bool isMoving ()
 
uint8_t getProgress_percent ()
 
void onStartup ()
 
void onIdle ()
 
int _is_thermal_error (PGM_P const msg)
 
void onPrinterKilled (PGM_P const msg, PGM_P const component)
 
void onMediaInserted ()
 
void onMediaError ()
 
void onMediaRemoved ()
 
void onPlayTone (const uint16_t frequency, const uint16_t duration)
 
void onPrintTimerStarted ()
 
void onPrintTimerPaused ()
 
void onPrintTimerStopped ()
 
void onFilamentRunout (const extruder_t extruder)
 
void onUserConfirmRequired (const char *const msg)
 
void onStatusChanged (const char *const msg)
 
void onFactoryReset ()
 
void onLoadSettings (char const *)
 
void onStoreSettings (char *)
 
void onConfigurationStoreWritten (bool success)
 
void onConfigurationStoreRead (bool success)
 
void onMeshUpdate (const uint8_t xpos, const uint8_t ypos, const float zval)
 

Function Documentation

◆ isMoving()

bool ExtUI::isMoving ( )
11  {
12  return planner.has_blocks_queued();
13 }
Here is the call graph for this function:

◆ getProgress_percent()

uint8_t ExtUI::getProgress_percent ( )
15  {
16  return ui.get_progress();
17 }

◆ onStartup()

void ExtUI::onStartup ( )
811  {
812  DBG_XUI("XUI: onStartup");
814 }
Here is the call graph for this function:

◆ onIdle()

void ExtUI::onIdle ( )
816  {
820 }
Here is the call graph for this function:

◆ _is_thermal_error()

int ExtUI::_is_thermal_error ( PGM_P const  msg)
823  {
824  if (!strcmp(msg, GET_TEXT(MSG_HEATING_FAILED_LCD)))
825  return 1;
826  if (!strcmp(msg, GET_TEXT(MSG_HEATING_FAILED_LCD_BED)))
827  return 1;
828  if (!strcmp(msg, GET_TEXT(MSG_HEATING_FAILED_LCD_CHAMBER)))
829  return 1;
830  if (!strcmp(msg, GET_TEXT(MSG_ERR_REDUNDANT_TEMP)))
831  return 1;
832  if (!strcmp(msg, GET_TEXT(MSG_THERMAL_RUNAWAY)))
833  return 1;
834  if (!strcmp(msg, GET_TEXT(MSG_THERMAL_RUNAWAY_BED)))
835  return 1;
836  if (!strcmp(msg, GET_TEXT(MSG_THERMAL_RUNAWAY_CHAMBER)))
837  return 1;
838  if (!strcmp(msg, GET_TEXT(MSG_ERR_MAXTEMP)))
839  return 1;
840  if (!strcmp(msg, GET_TEXT(MSG_ERR_MINTEMP)))
841  return 1;
842  if (!strcmp(msg, GET_TEXT(MSG_ERR_MAXTEMP_BED)))
843  return 1;
844  if (!strcmp(msg, GET_TEXT(MSG_ERR_MINTEMP_BED)))
845  return 1;
846  return 0;
847 }
Here is the caller graph for this function:

◆ onPrinterKilled()

void ExtUI::onPrinterKilled ( PGM_P const  msg,
PGM_P const  component 
)
849  {
850  //_dbg("onPrinterKilled %s", msg);
851  if (_is_thermal_error(msg)) { //todo remove me after new thermal manager
852  const marlin_vars_t &vars = marlin_server.vars;
853  temp_error(msg, component, vars.temp_nozzle, vars.target_nozzle, vars.temp_bed, vars.target_bed);
854  } else {
855  general_error(msg, component);
856  }
857 }
Here is the call graph for this function:

◆ onMediaInserted()

void ExtUI::onMediaInserted ( )
859  {
860  DBG_XUI("XUI: onMediaInserted");
862 }
Here is the call graph for this function:

◆ onMediaError()

void ExtUI::onMediaError ( )
864  {
865  DBG_XUI("XUI: onMediaError");
867 }
Here is the call graph for this function:

◆ onMediaRemoved()

void ExtUI::onMediaRemoved ( )
869  {
870  DBG_XUI("XUI: onMediaRemoved");
872 }
Here is the call graph for this function:

◆ onPlayTone()

void ExtUI::onPlayTone ( const uint16_t  frequency,
const uint16_t  duration 
)
874  {
875  DBG_XUI("XUI: onPlayTone");
876  _send_notify_event(MARLIN_EVT_PlayTone, frequency, duration);
877 }
Here is the call graph for this function:

◆ onPrintTimerStarted()

void ExtUI::onPrintTimerStarted ( )
879  {
880  DBG_XUI("XUI: onPrintTimerStarted");
882 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onPrintTimerPaused()

void ExtUI::onPrintTimerPaused ( )
884  {
885  DBG_XUI("XUI: onPrintTimerPaused");
887 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onPrintTimerStopped()

void ExtUI::onPrintTimerStopped ( )
889  {
890  DBG_XUI("XUI: onPrintTimerStopped");
892 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onFilamentRunout()

void ExtUI::onFilamentRunout ( const extruder_t  extruder)
894  {
895  DBG_XUI("XUI: onFilamentRunout");
897 }
Here is the call graph for this function:

◆ onUserConfirmRequired()

void ExtUI::onUserConfirmRequired ( const char *const  msg)
899  {
900  DBG_XUI("XUI: onUserConfirmRequired: %s", msg);
902 }
Here is the call graph for this function:

◆ onStatusChanged()

void ExtUI::onStatusChanged ( const char *const  msg)
904  {
905  DBG_XUI("XUI: onStatusChanged: %s", msg);
907  if (strcmp(msg, "Prusa-mini Ready.") == 0) {
908  } //TODO
909  else if (strcmp(msg, "TMC CONNECTION ERROR") == 0)
911  else if (strcmp(msg, MSG_ERR_PROBING_FAILED) == 0)
913  else {
914  if (msg && msg[0] != 0) { //empty message filter
915 
916  _add_status_msg(msg);
918  }
919  }
920 }
Here is the call graph for this function:

◆ onFactoryReset()

void ExtUI::onFactoryReset ( )
922  {
923  DBG_XUI("XUI: onFactoryReset");
925 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onLoadSettings()

void ExtUI::onLoadSettings ( char const )
927  {
928  DBG_XUI("XUI: onLoadSettings");
930 }
Here is the call graph for this function:

◆ onStoreSettings()

void ExtUI::onStoreSettings ( char *  )
932  {
933  DBG_XUI("XUI: onStoreSettings");
935 }
Here is the call graph for this function:

◆ onConfigurationStoreWritten()

void ExtUI::onConfigurationStoreWritten ( bool  success)
937  {
938  DBG_XUI("XUI: onConfigurationStoreWritten");
939 }
Here is the caller graph for this function:

◆ onConfigurationStoreRead()

void ExtUI::onConfigurationStoreRead ( bool  success)
941  {
942  DBG_XUI("XUI: onConfigurationStoreRead");
943 }

◆ onMeshUpdate()

void ExtUI::onMeshUpdate ( const uint8_t  xpos,
const uint8_t  ypos,
const float  zval 
)
945  {
946  DBG_XUI("XUI: onMeshUpdate x: %u, y: %u, z: %.2f", xpos, ypos, (double)zval);
947  uint8_t index = xpos + marlin_server.mesh.xc * ypos;
948  uint32_t usr32 = variant8_flt(zval).ui32;
949  uint16_t usr16 = xpos | ((uint16_t)ypos << 8);
950  marlin_server.mesh.z[index] = zval;
952 }
Here is the call graph for this function:
GET_TEXT
#define GET_TEXT(MSG)
Definition: multi_language.h:72
_marlin_server_t::mesh
marlin_mesh_t mesh
Definition: marlin_server.cpp:71
MARLIN_EVT_Startup
#define MARLIN_EVT_Startup
Definition: marlin_events.h:8
_add_status_msg
void _add_status_msg(const char *const popup_msg)
Definition: marlin_server.cpp:101
MARLIN_EVT_MediaError
#define MARLIN_EVT_MediaError
Definition: marlin_events.h:12
MARLIN_EVT_LoadSettings
#define MARLIN_EVT_LoadSettings
Definition: marlin_events.h:22
general_error
void general_error(const char *error, const char *module)
Marlin stopped.
Definition: bsod.c:174
_marlin_mesh_t::xc
uint8_t xc
Definition: marlin_events.h:104
marlin_server_idle
int marlin_server_idle(void)
Definition: marlin_server.cpp:254
MARLIN_EVT_MediaInserted
#define MARLIN_EVT_MediaInserted
Definition: marlin_events.h:11
MARLIN_EVT_PrintTimerStopped
#define MARLIN_EVT_PrintTimerStopped
Definition: marlin_events.h:17
marlin_server
marlin_server_t marlin_server
Definition: marlin_server.cpp:92
MARLIN_ERR_ProbingFailed
#define MARLIN_ERR_ProbingFailed
Definition: marlin_errors.h:9
_marlin_vars_t::temp_nozzle
float temp_nozzle
Definition: marlin_vars.h:83
_send_notify_event
void _send_notify_event(uint8_t evt_id, uint32_t usr32, uint16_t usr16)
Definition: marlin_server.cpp:481
MARLIN_EVT_StoreSettings
#define MARLIN_EVT_StoreSettings
Definition: marlin_events.h:23
DBG_XUI
#define DBG_XUI
Definition: marlin_server.cpp:37
MARLIN_EVT_PrintTimerPaused
#define MARLIN_EVT_PrintTimerPaused
Definition: marlin_events.h:16
MARLIN_EVT_Message
#define MARLIN_EVT_Message
Definition: marlin_events.h:36
_marlin_vars_t::target_nozzle
float target_nozzle
Definition: marlin_vars.h:85
_marlin_server_t::vars
marlin_vars_t vars
Definition: marlin_server.cpp:58
MARLIN_EVT_MeshUpdate
#define MARLIN_EVT_MeshUpdate
Definition: marlin_events.h:24
_marlin_vars_t::temp_bed
float temp_bed
Definition: marlin_vars.h:84
uint8_t
const uint8_t[]
Definition: 404_html.c:3
_marlin_mesh_t::z
float z[MARLIN_MAX_MESH_POINTS]
Definition: marlin_events.h:103
ui
MarlinUI ui
MARLIN_EVT_FactoryReset
#define MARLIN_EVT_FactoryReset
Definition: marlin_events.h:21
MARLIN_EVT_StatusChanged
#define MARLIN_EVT_StatusChanged
Definition: marlin_events.h:20
_marlin_vars_t
Definition: marlin_vars.h:77
MSG_ERR_PROBING_FAILED
#define MSG_ERR_PROBING_FAILED
Definition: language.h:297
marlin_server_idle_cb
marlin_server_idle_t * marlin_server_idle_cb
Definition: marlin_server.cpp:94
MARLIN_EVT_PlayTone
#define MARLIN_EVT_PlayTone
Definition: marlin_events.h:14
MARLIN_EVT_Error
#define MARLIN_EVT_Error
Definition: marlin_events.h:32
MARLIN_EVT_MediaRemoved
#define MARLIN_EVT_MediaRemoved
Definition: marlin_events.h:13
_variant8_t::ui32
uint32_t ui32
Definition: variant8.h:32
variant8_flt
variant8_t variant8_flt(float flt)
Definition: variant8.c:48
temp_error
void temp_error(const char *error, const char *module, float t_noz, float tt_noz, float t_bed, float tt_bed)
Definition: bsod.c:207
_marlin_vars_t::target_bed
float target_bed
Definition: marlin_vars.h:86
MARLIN_EVT_PrintTimerStarted
#define MARLIN_EVT_PrintTimerStarted
Definition: marlin_events.h:15
ExtUI::_is_thermal_error
int _is_thermal_error(PGM_P const msg)
Definition: marlin_server.cpp:823
MARLIN_ERR_TMCDriverError
#define MARLIN_ERR_TMCDriverError
Definition: marlin_errors.h:8
MARLIN_EVT_FilamentRunout
#define MARLIN_EVT_FilamentRunout
Definition: marlin_events.h:18
Planner::has_blocks_queued
static FORCE_INLINE bool has_blocks_queued()
Definition: planner.h:762
planner
Planner planner
Definition: planner.cpp:111
MARLIN_EVT_UserConfirmRequired
#define MARLIN_EVT_UserConfirmRequired
Definition: marlin_events.h:19