Browse Source

Reorganize includes and declarations

pull/1/head
Scott Lahteine 6 years ago
parent
commit
b063b1b722
  1. 4
      Marlin/src/lcd/HD44780/ultralcd_common_HD44780.h
  2. 49
      Marlin/src/lcd/menu/menu.cpp
  3. 7
      Marlin/src/lcd/menu/menu.h
  4. 2
      Marlin/src/lcd/menu/menu_delta_calibrate.cpp
  5. 4
      Marlin/src/lcd/menu/menu_temperature.cpp
  6. 7
      Marlin/src/lcd/ultralcd.cpp

4
Marlin/src/lcd/HD44780/ultralcd_common_HD44780.h

@ -50,8 +50,6 @@
#endif
#endif
extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array.
////////////////////////////////////
// Setup button and encode mappings for each panel (into 'buttons' variable
//
@ -61,6 +59,8 @@ extern volatile uint8_t buttons; //an extended version of the last checked butt
#if ENABLED(ULTIPANEL)
extern volatile uint8_t buttons;
//
// Setup other button mappings of each panel
//

49
Marlin/src/lcd/menu/menu.cpp

@ -25,34 +25,32 @@
#if ENABLED(ULTIPANEL)
#include "menu.h"
#include "../ultralcd.h"
#include "../../module/planner.h"
#include "../../module/motion.h"
#include "../../module/probe.h"
#include "../../module/printcounter.h"
#include "../../gcode/gcode.h"
#include "../../gcode/queue.h"
#include "../../module/configuration_store.h"
#include "../../module/tool_change.h"
#include "../../Marlin.h"
#include "../../sd/cardreader.h"
#if ENABLED(EEPROM_SETTINGS)
#include "../../module/configuration_store.h"
#endif
#if WATCH_HOTENDS || WATCH_THE_BED
#include "../../module/temperature.h"
#endif
#include <stdarg.h>
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#include "../../module/probe.h"
#endif
#if ENABLED(SDSUPPORT)
#include "../../sd/cardreader.h"
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) || ENABLED(AUTO_BED_LEVELING_UBL)
#include "../../feature/bedlevel/bedlevel.h"
#endif
////////////////////////////////////////////
///////////// Global Variables /////////////
////////////////////////////////////////////
// Buttons
volatile uint8_t buttons;
#if ENABLED(REPRAPWORLD_KEYPAD)
volatile uint8_t buttons_reprapworld_keypad;
#endif
// Menu Navigation
int8_t encoderTopLine;
typedef struct {
@ -70,12 +68,9 @@ int32_t minEditValue, maxEditValue;
screenFunc_t callbackFunc;
bool liveEdit;
// Prevent recursion into screen handlers
bool no_reentry = false;
// Initialized by settings.load()
int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2];
uint8_t lcd_preheat_fan_speed[2];
////////////////////////////////////////////
//////// Menu Navigation & History /////////
////////////////////////////////////////////
@ -110,7 +105,7 @@ void lcd_goto_previous_menu_no_defer() {
}
////////////////////////////////////////////
/////////////// Menu Actions ///////////////
/////////// Common Menu Actions ////////////
////////////////////////////////////////////
void _menu_action_back() { lcd_goto_previous_menu(); }
@ -355,14 +350,14 @@ void lcd_completion_feedback(const bool good/*=true*/) {
else lcd_buzz(20, 440);
}
inline void line_to_current_z() {
planner.buffer_line(current_position, MMM_TO_MMS(manual_feedrate_mm_m[Z_AXIS]), active_extruder);
}
#if HAS_LINE_TO_Z
void line_to_z(const float &z) {
void line_to_z(const float &z) {
current_position[Z_AXIS] = z;
line_to_current_z();
}
planner.buffer_line(current_position, MMM_TO_MMS(manual_feedrate_mm_m[Z_AXIS]), active_extruder);
}
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)

7
Marlin/src/lcd/menu/menu.h

@ -348,7 +348,6 @@ void menu_move();
void lcd_move_z();
void lcd_synchronize(PGM_P const msg=NULL);
void line_to_z(const float &z);
void _lcd_draw_homing();
void watch_temp_callback_E0();
@ -359,6 +358,12 @@ void watch_temp_callback_E4();
void watch_temp_callback_E5();
void watch_temp_callback_bed();
#define HAS_LINE_TO_Z (ENABLED(DELTA) || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING) || ENABLED(LEVEL_BED_CORNERS))
#if HAS_LINE_TO_Z
void line_to_z(const float &z);
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)
void lcd_enqueue_command(const char * const cmd);
void lcd_enqueue_commands_P(PGM_P const cmd);

2
Marlin/src/lcd/menu/menu_delta_calibrate.cpp

@ -45,6 +45,8 @@ void _man_probe_pt(const float &rx, const float &ry) {
#if ENABLED(DELTA_AUTO_CALIBRATION)
#include "../../gcode/gcode.h"
float lcd_probe_pt(const float &rx, const float &ry) {
_man_probe_pt(rx, ry);
KEEPALIVE_STATE(PAUSED_FOR_USER);

4
Marlin/src/lcd/menu/menu_temperature.cpp

@ -35,6 +35,10 @@
#include "../../module/motion.h"
#endif
// Initialized by settings.load()
int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2];
uint8_t lcd_preheat_fan_speed[2];
//
// "Temperature" submenu items
//

7
Marlin/src/lcd/ultralcd.cpp

@ -74,6 +74,9 @@
#include "../libs/buzzer.h"
#endif
// Buttons
volatile uint8_t buttons;
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
uint8_t lcd_sd_status;
#endif
@ -219,6 +222,10 @@ bool lcd_blink() {
///////////// Keypad Handling //////////////
////////////////////////////////////////////
#if ENABLED(REPRAPWORLD_KEYPAD)
volatile uint8_t buttons_reprapworld_keypad;
#endif
#if ENABLED(ADC_KEYPAD)
#define KEYPAD_HOME EN_REPRAPWORLD_KEYPAD_F1

Loading…
Cancel
Save