Browse Source

Merge pull request #5062 from thinkyhead/rc_warnings_fix

Warnings fixed redux
pull/1/head
Scott Lahteine 8 years ago
committed by GitHub
parent
commit
3544c3632f
  1. 4
      Marlin/Conditionals_post.h
  2. 18
      Marlin/Marlin_main.cpp
  3. 3
      Marlin/buzzer.h
  4. 18
      Marlin/macros.h
  5. 131
      Marlin/ultralcd.cpp
  6. 2
      Marlin/ultralcd_impl_DOGM.h
  7. 2
      Marlin/ultralcd_impl_HD44780.h

4
Marlin/Conditionals_post.h

@ -306,13 +306,13 @@
/**
* ARRAY_BY_EXTRUDERS based on EXTRUDERS
*/
#define ARRAY_BY_EXTRUDERS(args...) ARRAY_N(EXTRUDERS, args)
#define ARRAY_BY_EXTRUDERS(...) ARRAY_N(EXTRUDERS, __VA_ARGS__)
#define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1)
/**
* ARRAY_BY_HOTENDS based on HOTENDS
*/
#define ARRAY_BY_HOTENDS(args...) ARRAY_N(HOTENDS, args)
#define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__)
#define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
/**

18
Marlin/Marlin_main.cpp

@ -634,8 +634,8 @@ static bool send_ok[BUFSIZE];
static inline type pgm_read_any(const type *p) \
{ return pgm_read_##reader##_near(p); }
DEFINE_PGM_READ_ANY(float, float);
DEFINE_PGM_READ_ANY(signed char, byte);
DEFINE_PGM_READ_ANY(float, float)
DEFINE_PGM_READ_ANY(signed char, byte)
#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \
static const PROGMEM type array##_P[XYZ] = \
@ -643,12 +643,12 @@ DEFINE_PGM_READ_ANY(signed char, byte);
static inline type array(int axis) \
{ return pgm_read_any(&array##_P[axis]); }
XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS);
XYZ_CONSTS_FROM_CONFIG(float, base_max_pos, MAX_POS);
XYZ_CONSTS_FROM_CONFIG(float, base_home_pos, HOME_POS);
XYZ_CONSTS_FROM_CONFIG(float, max_length, MAX_LENGTH);
XYZ_CONSTS_FROM_CONFIG(float, home_bump_mm, HOME_BUMP_MM);
XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS)
XYZ_CONSTS_FROM_CONFIG(float, base_max_pos, MAX_POS)
XYZ_CONSTS_FROM_CONFIG(float, base_home_pos, HOME_POS)
XYZ_CONSTS_FROM_CONFIG(float, max_length, MAX_LENGTH)
XYZ_CONSTS_FROM_CONFIG(float, home_bump_mm, HOME_BUMP_MM)
XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR)
/**
* ***************************************************************************
@ -8542,7 +8542,7 @@ void ok_to_send() {
cartes[X_AXIS] = delta_tower1_x + ex[0] * Xnew + ey[0] * Ynew - ez[0] * Znew;
cartes[Y_AXIS] = delta_tower1_y + ex[1] * Xnew + ey[1] * Ynew - ez[1] * Znew;
cartes[Z_AXIS] = z1 + ex[2] * Xnew + ey[2] * Ynew - ez[2] * Znew;
};
}
void forward_kinematics_DELTA(float point[ABC]) {
forward_kinematics_DELTA(point[A_AXIS], point[B_AXIS], point[C_AXIS]);

3
Marlin/buzzer.h

@ -109,7 +109,8 @@ class Buzzer {
this->tick();
thermalManager.manage_heater();
}
this->buffer.enqueue((tone_t) { duration, frequency });
tone_t tone = { duration, frequency };
this->buffer.enqueue(tone);
}
/**

18
Marlin/macros.h

@ -81,15 +81,15 @@
#define ZERO(a) memset(a,0,sizeof(a))
// Macros for initializing arrays
#define ARRAY_6(v1, v2, v3, v4, v5, v6, args...) { v1, v2, v3, v4, v5, v6 }
#define ARRAY_5(v1, v2, v3, v4, v5, args...) { v1, v2, v3, v4, v5 }
#define ARRAY_4(v1, v2, v3, v4, args...) { v1, v2, v3, v4 }
#define ARRAY_3(v1, v2, v3, args...) { v1, v2, v3 }
#define ARRAY_2(v1, v2, args...) { v1, v2 }
#define ARRAY_1(v1, args...) { v1 }
#define _ARRAY_N(N, args...) ARRAY_ ##N(args)
#define ARRAY_N(N, args...) _ARRAY_N(N, args)
#define ARRAY_6(v1, v2, v3, v4, v5, v6, ...) { v1, v2, v3, v4, v5, v6 }
#define ARRAY_5(v1, v2, v3, v4, v5, ...) { v1, v2, v3, v4, v5 }
#define ARRAY_4(v1, v2, v3, v4, ...) { v1, v2, v3, v4 }
#define ARRAY_3(v1, v2, v3, ...) { v1, v2, v3 }
#define ARRAY_2(v1, v2, ...) { v1, v2 }
#define ARRAY_1(v1, ...) { v1 }
#define _ARRAY_N(N, ...) ARRAY_ ##N(__VA_ARGS__)
#define ARRAY_N(N, ...) _ARRAY_N(N, __VA_ARGS__)
// Macros for adding
#define INC_0 1

131
Marlin/ultralcd.cpp

@ -169,7 +169,8 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
typedef void (*screenFunc_t)();
// Different types of actions that can be used in menu items.
static void menu_action_back();
#define menu_action_back(dummy) _menu_action_back()
static void _menu_action_back();
static void menu_action_submenu(screenFunc_t data);
static void menu_action_gcode(const char* pgcode);
static void menu_action_function(screenFunc_t data);
@ -267,7 +268,9 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
* menu_action_[type](arg3...)
*
* Examples:
* MENU_ITEM(back, MSG_WATCH)
* MENU_ITEM(back, MSG_WATCH, 0 [dummy parameter] )
* or
* MENU_BACK(MSG_WATCH)
* lcd_implementation_drawmenu_back(sel, row, PSTR(MSG_WATCH))
* menu_action_back()
*
@ -281,35 +284,37 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
*
*/
#define _MENU_ITEM_PART_1(TYPE, LABEL, ARGS...) \
#define _MENU_ITEM_PART_1(TYPE, LABEL, ...) \
if (_menuLineNr == _thisItemNr) { \
if (lcdDrawUpdate) \
lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## ARGS); \
lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
if (wasClicked && encoderLine == _thisItemNr) { \
lcd_quick_feedback()
#define _MENU_ITEM_PART_2(TYPE, ARGS...) \
menu_action_ ## TYPE(ARGS); \
#define _MENU_ITEM_PART_2(TYPE, ...) \
menu_action_ ## TYPE(__VA_ARGS__); \
return; \
} \
} \
++_thisItemNr
#define MENU_ITEM(TYPE, LABEL, ARGS...) do { \
#define MENU_ITEM(TYPE, LABEL, ...) do { \
_skipStatic = false; \
_MENU_ITEM_PART_1(TYPE, LABEL, ## ARGS); \
_MENU_ITEM_PART_2(TYPE, ## ARGS); \
_MENU_ITEM_PART_1(TYPE, LABEL, ## __VA_ARGS__); \
_MENU_ITEM_PART_2(TYPE, ## __VA_ARGS__); \
} while(0)
#define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
// Used to print static text with no visible cursor.
#define STATIC_ITEM(LABEL, ARGS...) \
#define STATIC_ITEM(LABEL, ...) \
if (_menuLineNr == _thisItemNr) { \
if (_skipStatic && encoderLine <= _thisItemNr) { \
encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
} \
if (lcdDrawUpdate) \
lcd_implementation_drawmenu_static(_lcdLineNr, PSTR(LABEL), ## ARGS); \
lcd_implementation_drawmenu_static(_lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
} \
++_thisItemNr
@ -329,24 +334,24 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
/**
* MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
*/
#define MENU_MULTIPLIER_ITEM(type, label, args...) do { \
_MENU_ITEM_PART_1(type, label, ## args); \
#define MENU_MULTIPLIER_ITEM(type, label, ...) do { \
_MENU_ITEM_PART_1(type, label, ## __VA_ARGS__); \
encoderRateMultiplierEnabled = true; \
lastEncoderMovementMillis = 0; \
_MENU_ITEM_PART_2(type, ## args); \
_MENU_ITEM_PART_2(type, ## __VA_ARGS__); \
} while(0)
#endif //ENCODER_RATE_MULTIPLIER
#define MENU_ITEM_DUMMY() do { _thisItemNr++; } while(0)
#define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
#define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
#define MENU_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
#define MENU_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
#if ENABLED(ENCODER_RATE_MULTIPLIER)
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, ...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, ...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
#else //!ENCODER_RATE_MULTIPLIER
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
#endif //!ENCODER_RATE_MULTIPLIER
/** Used variables to keep track of the menu */
@ -602,7 +607,7 @@ void kill_screen(const char* lcd_msg) {
static void lcd_main_menu() {
START_MENU();
MENU_ITEM(back, MSG_WATCH);
MENU_BACK(MSG_WATCH);
#if ENABLED(BLTOUCH)
if (!endstops.z_probe_enabled && TEST_BLTOUCH())
@ -749,7 +754,7 @@ void kill_screen(const char* lcd_msg) {
//
// ^ Main
//
MENU_ITEM(back, MSG_MAIN);
MENU_BACK(MSG_MAIN);
//
// Speed:
@ -874,7 +879,7 @@ void kill_screen(const char* lcd_msg) {
static void lcd_dac_menu() {
dac_driver_getValues();
START_MENU();
MENU_ITEM(back, MSG_CONTROL);
MENU_BACK(MSG_CONTROL);
MENU_ITEM_EDIT_CALLBACK(int3, MSG_X " " MSG_DAC_PERCENT, &driverPercent[X_AXIS], 0, 100, dac_driver_commit);
MENU_ITEM_EDIT_CALLBACK(int3, MSG_Y " " MSG_DAC_PERCENT, &driverPercent[Y_AXIS], 0, 100, dac_driver_commit);
MENU_ITEM_EDIT_CALLBACK(int3, MSG_Z " " MSG_DAC_PERCENT, &driverPercent[Z_AXIS], 0, 100, dac_driver_commit);
@ -961,7 +966,7 @@ void kill_screen(const char* lcd_msg) {
static void lcd_preheat_pla_menu() {
START_MENU();
MENU_ITEM(back, MSG_PREPARE);
MENU_BACK(MSG_PREPARE);
#if HOTENDS == 1
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_pla0);
#else
@ -983,7 +988,7 @@ void kill_screen(const char* lcd_msg) {
static void lcd_preheat_abs_menu() {
START_MENU();
MENU_ITEM(back, MSG_PREPARE);
MENU_BACK(MSG_PREPARE);
#if HOTENDS == 1
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_abs0);
#else
@ -1210,7 +1215,7 @@ void kill_screen(const char* lcd_msg) {
*/
static void lcd_level_bed() {
START_MENU();
MENU_ITEM(back, MSG_LEVEL_BED_CANCEL);
MENU_BACK(MSG_LEVEL_BED_CANCEL);
MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue);
END_MENU();
}
@ -1229,7 +1234,7 @@ void kill_screen(const char* lcd_msg) {
//
// ^ Main
//
MENU_ITEM(back, MSG_MAIN);
MENU_BACK(MSG_MAIN);
//
// Auto Home
@ -1333,7 +1338,7 @@ void kill_screen(const char* lcd_msg) {
static void lcd_delta_calibrate_menu() {
START_MENU();
MENU_ITEM(back, MSG_MAIN);
MENU_BACK(MSG_MAIN);
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
MENU_ITEM(function, MSG_DELTA_CALIBRATE_X, _goto_tower_x);
MENU_ITEM(function, MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
@ -1478,7 +1483,7 @@ void kill_screen(const char* lcd_msg) {
static void _lcd_move_menu_axis() {
START_MENU();
MENU_ITEM(back, MSG_MOVE_AXIS);
MENU_BACK(MSG_MOVE_AXIS);
if (_MOVE_XYZ_ALLOWED) {
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
@ -1531,7 +1536,7 @@ void kill_screen(const char* lcd_msg) {
static void lcd_move_menu() {
START_MENU();
MENU_ITEM(back, MSG_PREPARE);
MENU_BACK(MSG_PREPARE);
if (_MOVE_XYZ_ALLOWED)
MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
@ -1550,7 +1555,7 @@ void kill_screen(const char* lcd_msg) {
static void lcd_control_menu() {
START_MENU();
MENU_ITEM(back, MSG_MAIN);
MENU_BACK(MSG_MAIN);
MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu);
MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu);
MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu);
@ -1637,14 +1642,14 @@ void kill_screen(const char* lcd_msg) {
#define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex)
#endif
_PIDTEMP_FUNCTIONS(0);
_PIDTEMP_FUNCTIONS(0)
#if ENABLED(PID_PARAMS_PER_HOTEND)
#if HOTENDS > 1
_PIDTEMP_FUNCTIONS(1);
_PIDTEMP_FUNCTIONS(1)
#if HOTENDS > 2
_PIDTEMP_FUNCTIONS(2);
_PIDTEMP_FUNCTIONS(2)
#if HOTENDS > 3
_PIDTEMP_FUNCTIONS(3);
_PIDTEMP_FUNCTIONS(3)
#endif //HOTENDS > 3
#endif //HOTENDS > 2
#endif //HOTENDS > 1
@ -1663,7 +1668,7 @@ void kill_screen(const char* lcd_msg) {
//
// ^ Control
//
MENU_ITEM(back, MSG_CONTROL);
MENU_BACK(MSG_CONTROL);
//
// Nozzle:
@ -1795,7 +1800,7 @@ void kill_screen(const char* lcd_msg) {
*/
static void lcd_control_temperature_preheat_pla_settings_menu() {
START_MENU();
MENU_ITEM(back, MSG_TEMPERATURE);
MENU_BACK(MSG_TEMPERATURE);
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed1, 0, 255);
#if TEMP_SENSOR_0 != 0
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &preheatHotendTemp1, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
@ -1816,7 +1821,7 @@ void kill_screen(const char* lcd_msg) {
*/
static void lcd_control_temperature_preheat_abs_settings_menu() {
START_MENU();
MENU_ITEM(back, MSG_TEMPERATURE);
MENU_BACK(MSG_TEMPERATURE);
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed2, 0, 255);
#if TEMP_SENSOR_0 != 0
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &preheatHotendTemp2, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
@ -1840,7 +1845,7 @@ void kill_screen(const char* lcd_msg) {
*/
static void lcd_control_motion_menu() {
START_MENU();
MENU_ITEM(back, MSG_CONTROL);
MENU_BACK(MSG_CONTROL);
#if HAS_BED_PROBE
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
#endif
@ -1890,7 +1895,7 @@ void kill_screen(const char* lcd_msg) {
*/
static void lcd_control_volumetric_menu() {
START_MENU();
MENU_ITEM(back, MSG_CONTROL);
MENU_BACK(MSG_CONTROL);
MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers);
@ -1947,7 +1952,7 @@ void kill_screen(const char* lcd_msg) {
static void lcd_control_retract_menu() {
START_MENU();
MENU_ITEM(back, MSG_CONTROL);
MENU_BACK(MSG_CONTROL);
MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
#if EXTRUDERS > 1
@ -1989,7 +1994,7 @@ void kill_screen(const char* lcd_msg) {
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card)
uint16_t fileCnt = card.getnrfilenames();
START_MENU();
MENU_ITEM(back, MSG_MAIN);
MENU_BACK(MSG_MAIN);
card.getWorkDirName();
if (card.filename[0] == '/') {
#if !PIN_EXISTS(SD_DETECT)
@ -2120,14 +2125,14 @@ void kill_screen(const char* lcd_msg) {
static void lcd_info_board_menu() {
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
START_SCREEN();
STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000
STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION); // Protocol: 1.0
STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000
STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0
#ifdef POWER_SUPPLY
#if (POWER_SUPPLY == 1)
STATIC_ITEM(MSG_INFO_PSU ": ATX"); // Power Supply: ATX
STATIC_ITEM(MSG_INFO_PSU ": ATX", true); // Power Supply: ATX
#elif (POWER_SUPPLY == 2)
STATIC_ITEM(MSG_INFO_PSU ": XBox"); // Power Supply: XBox
STATIC_ITEM(MSG_INFO_PSU ": XBox", true); // Power Supply: XBox
#endif
#endif // POWER_SUPPLY
END_SCREEN();
@ -2141,12 +2146,12 @@ void kill_screen(const char* lcd_msg) {
static void lcd_info_printer_menu() {
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
START_SCREEN();
STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch
STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM
STATIC_ITEM(MACHINE_NAME); // My3DPrinter
STATIC_ITEM(WEBSITE_URL); // www.my3dprinter.com
STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2
STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
STATIC_ITEM(SHORT_BUILD_VERSION, true); // x.x.x-Branch
STATIC_ITEM(STRING_DISTRIBUTION_DATE, true); // YYYY-MM-DD HH:MM
STATIC_ITEM(MACHINE_NAME, true); // My3DPrinter
STATIC_ITEM(WEBSITE_URL, true); // www.my3dprinter.com
STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS), true); // Extruders: 2
END_SCREEN();
}
@ -2157,7 +2162,7 @@ void kill_screen(const char* lcd_msg) {
*/
static void lcd_info_menu() {
START_MENU();
MENU_ITEM(back, MSG_MAIN);
MENU_BACK(MSG_MAIN);
MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, lcd_info_printer_menu); // Printer Info >
MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu); // Board Info >
MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors >
@ -2363,14 +2368,14 @@ void kill_screen(const char* lcd_msg) {
callbackFunc = callback; \
}
menu_edit_type(int, int3, itostr3, 1);
menu_edit_type(float, float3, ftostr3, 1);
menu_edit_type(float, float32, ftostr32, 100);
menu_edit_type(float, float43, ftostr43sign, 1000);
menu_edit_type(float, float5, ftostr5rj, 0.01);
menu_edit_type(float, float51, ftostr51sign, 10);
menu_edit_type(float, float52, ftostr52sign, 100);
menu_edit_type(unsigned long, long5, ftostr5rj, 0.01);
menu_edit_type(int, int3, itostr3, 1)
menu_edit_type(float, float3, ftostr3, 1)
menu_edit_type(float, float32, ftostr32, 100)
menu_edit_type(float, float43, ftostr43sign, 1000)
menu_edit_type(float, float5, ftostr5rj, 0.01)
menu_edit_type(float, float51, ftostr51sign, 10)
menu_edit_type(float, float52, ftostr52sign, 100)
menu_edit_type(unsigned long, long5, ftostr5rj, 0.01)
/**
*
@ -2431,7 +2436,7 @@ void kill_screen(const char* lcd_msg) {
* Menu actions
*
*/
static void menu_action_back() { lcd_goto_previous_menu(); }
static void _menu_action_back() { lcd_goto_previous_menu(); }
static void menu_action_submenu(screenFunc_t func) { lcd_save_previous_menu(); lcd_goto_screen(func); }
static void menu_action_gcode(const char* pgcode) { enqueue_and_echo_commands_P(pgcode); }
static void menu_action_function(screenFunc_t func) { (*func)(); }

2
Marlin/ultralcd_impl_DOGM.h

@ -550,7 +550,7 @@ static void lcd_implementation_status_screen() {
}
// Macros for specific types of menu items
#define lcd_implementation_drawmenu_back(sel, row, pstr) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
#define lcd_implementation_drawmenu_back(sel, row, pstr, dummy) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
#define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
#define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
#define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')

2
Marlin/ultralcd_impl_HD44780.h

@ -911,7 +911,7 @@ static void lcd_implementation_status_screen() {
#endif // SDSUPPORT
#define lcd_implementation_drawmenu_back(sel, row, pstr) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
#define lcd_implementation_drawmenu_back(sel, row, pstr, dummy) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
#define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
#define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
#define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')

Loading…
Cancel
Save