Import %on feature from 0.92.3

Unike $Ne which give current extruder if more than 1 extruder, %on give
1 even only 1 extruder
pull/71/head
Luc 2015-03-13 17:37:28 +08:00
rodzic c167ac1dc1
commit 790001a78d
2 zmienionych plików z 16 dodań i 0 usunięć

Wyświetl plik

@ -1514,6 +1514,11 @@ void UIDisplay::parse(const char *txt,bool ram)
addInt(Printer::feedrateMultiply, 3);
break;
}
if(c2 == 'n')
{
addInt(Extruder::current->id + 1, 1);
break;
}
// Extruder output level
if(c2 >= '0' && c2 <= '9') ivalue = pwm_pos[c2 - '0'];
#if HAVE_HEATED_BED

Wyświetl plik

@ -18,6 +18,15 @@
#if !defined(_UI_MENU_H)
#define _UI_MENU_H
/*moved to uilang.h
#define cUP "\001"
#define cDEG "\002"
#define cSEL "\003"
#define cUNSEL "\004"
#define cTEMP "\005"
#define cFOLD "\006"
#define cARROW "\176"
*/
/*
The menu configuration uses dynamic strings. These dynamic strings can contain
a placeholder for special values. During print these placeholder are exchanged
@ -93,6 +102,8 @@ random stuff
%oC : Output level current extruder
%ob : Output level heated bed
%PN : Printer name
%on : current extruder number (1,2,3...)
%Ne : current extruder number (1,2,3...) if Num extruder >1 , else nothing
stops
%sx : State of x min endstop.