Display for Laser/CNC mode
Hi,
as we don´t use temperatures in laser/cnc mode i want to display coords instead of them.
we show real coords actual(call them machine coords) and i want to show the coords changed
by G92 (call them workpiece coords) instead of the temperatures.
what should i take care of? is it a "simple" UI change or some more?
as we don´t use temperatures in laser/cnc mode i want to display coords instead of them.
we show real coords actual(call them machine coords) and i want to show the coords changed
by G92 (call them workpiece coords) instead of the temperatures.
what should i take care of? is it a "simple" UI change or some more?
Comments
i´m working on that now, but i´m not shure about the%xx tags.
there are many of them explained but commented and i cannot find how they work.
if i´m correct generating 3 more means to modify the parse function and also add 3 more in uilang etc?
void UIDisplay::parse(const char *txt,bool ram)
uilang has nothing to do with it. Of course, if you want to use them you might need to add new menu entries with these codes and if they should be translateable you also need new entries for that in uilang.
parse takes the original string and just replaces the %xx tags with a dynamic value.
figured out now , but i still have two problems :
1st: i can´t get rid of the marked signs (see picture)
2nd: i added a second set of strings original: UI_TEXT_MAINPAGE6_1_ID (for FFF)
second :UI_TEXT_MAINPAGE6_1_C_ID(for CNC and Laser mode)
is there a possibility to switch over strings in mainpage depending on printer mode?
something like:
if (Printer::mode == PRINTER_MODE_FFF)
UI_PAGE6_T(ui_page1, UI_TEXT_MAINPAGE6_1_ID, UI_TEXT_MAINPAGE6_2_ID, UI_TEXT_MAINPAGE6_3_ID, UI_TEXT_MAINPAGE6_4_ID, UI_TEXT_MAINPAGE6_5_ID, UI_TEXT_MAINPAGE6_6_ID)
else
UI_PAGE6_T(ui_page1, UI_TEXT_MAINPAGE6_1_C_ID, UI_TEXT_MAINPAGE6_2_C_ID, UI_TEXT_MAINPAGE6_3_C_ID, UI_TEXT_MAINPAGE6_4_ID, UI_TEXT_MAINPAGE6_5_ID, UI_TEXT_MAINPAGE6_6_ID)
it doesn´t work that way as the strings are selected in preprocessing , hope you find time to guide me
still hanging on second point from above
what do you mean with menu modes ?
So it´s time to say " Thank you so much for support in 2016"
and my best wishes to you and your family for 2017 .
RAyWB
principially i agree with you, but as i want to change only main page i wrote some placeholders to generate the
complete strings for line 1 to 3 in UIDisplay::parse.
looks like the result i wanted, but still is not perfect , hope i can finish in original behavior the next days.
momentarily code looks like this, (sensor defect and heater decoupling message is not yet implemented):
else if(c2=='6')
{
if(Printer::mode ==PRINTER_MODE_FFF)
{
fvalue = Extruder::getHeatedBedTemperature();
addStringP("\xa");
addFloat(fvalue,4,1);
addStringP("/");
fvalue = heatedBedController.targetTemperatureC;
addFloat(fvalue,3,0);
addStringP("\xb0");
addStringP(" Y:");
fvalue = Printer::realYPosition();
addFloat(fvalue,4,2);
}
else
{
fvalue = Printer::currentPosition[Y_AXIS]+Printer::coordinateOffset[Y_AXIS];
addStringP("Yw:");
addFloat(fvalue,4,2);
addStringP(" Y:");
fvalue = Printer::realYPosition();
addFloat(fvalue,4,2);
}
}
I also want to keep the extrusion entries for the moment as i´m planning to have 4th axis in cnc/laser mode.
Thanks for all your help last year and i hope ican count on future help for this year, you really do a great
job!!
I´ll also finish my hardware soon ,prototype is running since 6 months without a problem.
Are you interested in hardware stuff also?
I´ts a shield useable for due and mega working up to 40V , 6 pololu slots onboard
features like mosfets (up to 16) are on a separate board to keep high current stuff away from
"sensitive" parts.
I went that way because i was not able to follow up the Guide ....
found just filters for 4line and 2 line pages including Actions but nothing i can use for 6-line pages with filter.
so my programming abilities are only "for home use" may be i just don´t understand how it works.
OK,
just for understanding , i have 2 sets of lines , for example set 1 ID from 200 to 205 and set2 ID from 250 to255
can i do something like adding just an Offset of 50 in case of laser/cnc ?
think it should be done here , but i don´t understand where....
if(menuLevel == 0) // Top level menu{
UIMenu *men = (UIMenu*)pgm_read_word(&(ui_pages[menuPos[0]]));
uint16_t nr = pgm_read_word_near(&(men->numEntries));
UIMenuEntry **entries = (UIMenuEntry**)pgm_read_word(&(men->entries));
Think i understood now...
- generate a case
if(menuPos[0] == 0 &&( Printer::mode ==PRINTER_MODE_CNC)) {
col = 0;
r = 0;
if(UI_ROWS > 2) {
text = (char*)Com::translatedF(UI_TEXT_.........);
parse(text,false);
strcpy(cache[r++],uid.printCols);
}
and so on
is that what you ment?
Shame on me , had not latest dev version thats why i couldnt see newest menu structure.
so please mark this task as ANSWERED.
If you are still interested in Laser Warmup , Laser safety door (it´s different from the door included in dev version)
and Implementation of M6 for tool change i can start a pull request hopefully after next weekend
(just need to implement my features in new dev version]
error message:
exit status 1
'zBabystepsMissing' is not a member of 'Printer'
(disappears when activating babysteps)
so i implemented most of my features now but
new communication makes my "terminal" with second arduino not work so i tried to compile with
#define NEW_COMMUNICATION 0
gave error message:
exit status 1
'flashSource' was not declared in this scope
i also work with some kind of "macros" just to execute commands without the need of generating uiactions
worked up to dev version of end december 2016
i use following declaration:
#define UI_MACRO_BUTTON_LOW(pin,macro) if(READ(pin)==0) GCode::executeFString(PSTR(macro));
which now generates following error:
exit status 1
incomplete type 'GCode' used in nested name specifier
any Idea about that ?
Thanks, I´ll try that .
If you find some time can you please Show me up how new communication works?
Thanks,
so what if i just want to recieve some ASCII commands without line number from a Serial Connection?
OK , back to error message
exit status 1
incomplete type 'GCode' used in nested name specifier
if i uncomment "include "gcode.h" in ui.h which should solve that Problem
i get following:
In file included from sketch\ui.h:22:0,
from sketch\Repetier.h:611,
from sketch\BedLeveling.cpp:107:
gcode.h:33: error: expected class-name before '{' token
class SerialGCodeSource: public GCodeSource {
^
gcode.h:47: error: expected class-name before '{' token
class SDCardGCodeSource: public GCodeSource {
^
gcode.h:59: error: expected class-name before '{' token
class FlashGCodeSource: public GCodeSource {
^
In file included from sketch\ui.h:22:0,
from sketch\Repetier.h:611,
from sketch\BedLeveling.cpp:107:
gcode.h:317: error: 'GCodeSource' does not name a type
GCodeSource *source;
^
exit status 1
expected class-name before '{' token
seems to be an issue, , any idea about that?
commented "include "gcode.h" in ui.h again and Playing around found that it´seems to be no more possible to use
functions from GCode:: in uiconfig
for example:
switch (keymask1) {
case 0xFFFE://1
GCode::executeFString(PSTR("M117 moveXY + manual"));
not happy about that, as it was a simple possibility to execute something without
generating ui_Actions.
is there a way to solve that ," issue" seems to be based on new communication
or can you please guide me a way to execute strings?
i uploaded my changes to my Github account .
https://github.com/RAyWB/Repetier_Modified_DUE
feel free to pick what you think to be useful.
all changes marked clearly with //####RAyWB
Base: development branch January 7 2017
Features :
Laser Safety door ,Laser warmup , M6 Tool change , Z-probe added to menu,
Menu shows G92 coords instead of temp in CNC/Laser Mode...
i uploaded only DUE version as i´m running low on Time (went back to finishHardware)
until i add #include"CustomEvents.h" to uiconfig.h
i uncommented #define CUSTOM_EVENTS in configuration so i think it should work without #include"CustomEvents.h" to uiconfig.h
any idea?
for crosstest i took example from Sample Event Systems\FELIX Pro 1.(took CustomEvents.h and CustomEventsImpl.h)
just enabled custom events and tried to use one function as : UI_KEYS_BUTTON_LOW(UI2_BUTTON,UI_ACTION_XY1_BACK);
UI_ACTION_XY1_BACK is declared in CustomEvents.h (#define UI_ACTION_XY1_BACK 1500).
got error message from Compiler:
exit status 1
'UI_ACTION_XY1_BACK' was not declared in this scope
if i add
#if defined(CUSTOM_EVENTS)
#include "CustomEvents.h"
#endif
to top of ui.h this message disappears , but lots of other errors come up so i stopped searching.
hope you´ll find the time and try to use the felix event system from examples, think it needs some work.
for me and my event system adding :
#if defined(CUSTOM_EVENTS)
#include "CustomEvents.h"
#endif
to top of ui.h makes everything work as expected.
i use development version downloaded january 7th and yes,CustomEvents.h is last thing included in repetier.h and CustomEventsImpl.h are last in ui.cpp.
i use UICONFIG_CONTROLLER is that the cause?