Commit 92f156b2 authored by MagoKimbra's avatar MagoKimbra

Merge remote-tracking branch 'refs/remotes/origin/master' into dev

parents dd38e09c c1e40d24
...@@ -154,7 +154,7 @@ static unsigned char blink = 0; // Variable for visualization of fan rotation in ...@@ -154,7 +154,7 @@ static unsigned char blink = 0; // Variable for visualization of fan rotation in
static char currentfont = 0; static char currentfont = 0;
static void lcd_setFont(char font_nr) { static void lcd_setFont(char font_nr) {
switch (font_nr) { switch(font_nr) {
case FONT_STATUSMENU : {u8g.setFont(FONT_STATUSMENU_NAME); currentfont = FONT_STATUSMENU;}; break; case FONT_STATUSMENU : {u8g.setFont(FONT_STATUSMENU_NAME); currentfont = FONT_STATUSMENU;}; break;
case FONT_MENU : {u8g.setFont(FONT_MENU_NAME); currentfont = FONT_MENU;}; break; case FONT_MENU : {u8g.setFont(FONT_MENU_NAME); currentfont = FONT_MENU;}; break;
case FONT_SPECIAL : {u8g.setFont(FONT_SPECIAL_NAME); currentfont = FONT_SPECIAL;}; break; case FONT_SPECIAL : {u8g.setFont(FONT_SPECIAL_NAME); currentfont = FONT_SPECIAL;}; break;
...@@ -468,7 +468,6 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co ...@@ -468,7 +468,6 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co
pstr++; pstr++;
} }
while (n--) lcd_print(' '); while (n--) lcd_print(' ');
lcd_print(pre_char);
u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT); u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
lcd_print(post_char); lcd_print(post_char);
lcd_print(' '); lcd_print(' ');
......
...@@ -519,10 +519,10 @@ static void lcd_tune_fixstep() { ...@@ -519,10 +519,10 @@ static void lcd_tune_fixstep() {
#endif #endif
} }
#if ENABLED(THERMAL_PROTECTION_HOTENDS) /**
/**
* Watch temperature callbacks * Watch temperature callbacks
*/ */
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
#if TEMP_SENSOR_0 != 0 #if TEMP_SENSOR_0 != 0
void watch_temp_callback_E0() { start_watching_heater(0); } void watch_temp_callback_E0() { start_watching_heater(0); }
#endif #endif
...@@ -1728,10 +1728,7 @@ static void menu_action_function(menuFunc_t func) { (*func)(); } ...@@ -1728,10 +1728,7 @@ static void menu_action_function(menuFunc_t func) { (*func)(); }
#endif // SDSUPPORT #endif // SDSUPPORT
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { static void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { *ptr = !(*ptr); }
*ptr = !(*ptr);
}
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback) { static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback) {
menu_action_setting_edit_bool(pstr, ptr); menu_action_setting_edit_bool(pstr, ptr);
(*callback)(); (*callback)();
......
...@@ -22,15 +22,21 @@ ...@@ -22,15 +22,21 @@
static void ST7920_SWSPI_SND_8BIT(uint8_t val) { static void ST7920_SWSPI_SND_8BIT(uint8_t val) {
uint8_t i; uint8_t i;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
digitalWrite(ST7920_CLK_PIN, 0); WRITE(ST7920_CLK_PIN,0);
digitalWrite(ST7920_DAT_PIN, val&0x80); #if F_CPU == 20000000
__asm__("nop\n\t");
#endif
WRITE(ST7920_DAT_PIN,val&0x80);
val<<=1; val<<=1;
digitalWrite(ST7920_CLK_PIN,1); WRITE(ST7920_CLK_PIN,1);
#if F_CPU == 20000000
__asm__("nop\n\t""nop\n\t");
#endif
} }
} }
#define ST7920_CS() {digitalWrite(ST7920_CS_PIN, 1); u8g_10MicroDelay();} #define ST7920_CS() {WRITE(ST7920_CS_PIN,1);u8g_10MicroDelay();}
#define ST7920_NCS() {digitalWrite(ST7920_CS_PIN,0);} #define ST7920_NCS() {WRITE(ST7920_CS_PIN,0);}
#define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();} #define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
#define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();} #define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();}
#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();} #define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();}
...@@ -105,7 +111,7 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g ...@@ -105,7 +111,7 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g
class U8GLIB_ST7920_128X64_RRD : public U8GLIB { class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
public: public:
U8GLIB_ST7920_128X64_RRD(int dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) {} U8GLIB_ST7920_128X64_RRD(uint8_t dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) {}
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment