Permalink
Browse files

next try.

  • Loading branch information...
1 parent 5877a0f commit e1e0abdfcca21a7ae8508c97433468d8a74de6cc @bkubicek committed Nov 1, 2011
Showing with 8 additions and 6 deletions.
  1. +4 −5 Marlin/Marlin.pde
  2. +4 −1 Marlin/ultralcd.pde
View
@@ -149,6 +149,7 @@ unsigned long axis_steps_per_sqr_second[NUM_AXIS];
uint8_t fanpwm=0;
volatile int feedmultiply=100; //100->1 200->2
+volatile bool feedmultiplychanged=false;
// comm variables
#define MAX_CMD_SIZE 96
#define BUFSIZE 8
@@ -1159,13 +1160,11 @@ inline void process_commands()
break;
case 220: // M220 S<factor in percent>- set speed factor override percentage
{
- if(code_seen('S')) feedmultiply = code_value() ;
-#ifdef ULTRALCD
- if(menu.status==Main_Status)
+ if(code_seen('S'))
{
- encoderpos=feedmultiply;
+ feedmultiply = code_value() ;
+ feedmultiplychanged=true;
}
-#endif
}
break;
#ifdef PIDTEMP
View
@@ -240,14 +240,17 @@ MainMenu::MainMenu()
linechanging=false;
}
+extern volatile bool feedmultiplychanged;
+
void MainMenu::showStatus()
{
#if LCD_HEIGHT==4
static int oldcurrentraw=-1;
static int oldtargetraw=-1;
//force_lcd_update=true;
- if(force_lcd_update) //initial display of content
+ if(force_lcd_update||feedmultiplychanged) //initial display of content
{
+ feedmultiplychanged=false;
encoderpos=feedmultiply;
clear();
lcd.setCursor(0,0);lcd.print("\002123/567\001 ");

0 comments on commit e1e0abd

Please sign in to comment.