Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
c-morley committed Sep 1, 2020
1 parent 74d7ac6 commit c815629
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[EMC]
VERSION = 1.1
MACHINE = LinuxCNC-HAL-SIM-AXIS
#DEBUG = 0x7FFFFFFF
DEBUG = 0x00004000
DEBUG = 0x7FFFFFFF
#DEBUG = 0x00004000
[DISPLAY]
DISPLAY = qtvcp -d qtlathe
PREFERENCE_FILE_PATH = WORKINGFOLDER/qtlathe.pref
Expand Down
6 changes: 4 additions & 2 deletions configs/sim/qtvcp_screens/industrial_lathe_wear/remap.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# ignore_m6()

from stdglue import *
from interpreter import INTERP_OK
from emccanon import MESSAGE
COUNT = 0

Expand All @@ -33,10 +34,11 @@ def ignore_m6(self,**words):
return "Ignore M6 failed: %s" % (e)

def m2_remap(self, **words): # in remap module
print self.remap_level
print 'remap level:'.format(self.remap_level)
print 'call level:',self.call_level
global COUNT
COUNT +=1
print 'run count:{}'.format(COUNT)
print 'Run count:{}'.format(COUNT)

#MESSAGE("remapped m2")
self.execute("m2")
Expand Down
18 changes: 10 additions & 8 deletions src/emc/rs274ngc/interp_convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4282,14 +4282,16 @@ int Interp::convert_stop(block_pointer block, //!< pointer to a block of RS27
) {


if (IS_USER_MCODE(block,settings,4) &&
STEP_REMAPPED_IN_BLOCK(block, STEP_MGROUP4) &&
ONCE_M4) {
printf("*remap conversion-%d*\n",block->m_modes[4]);
return convert_remapped_code(block, settings, STEP_MGROUP4, 'm',
block->m_modes[4]);}

printf("*no remap conversion-%d*\n",block->m_modes[4]);
if (IS_USER_MCODE(block,settings,4) &&
STEP_REMAPPED_IN_BLOCK(block, STEP_MGROUP4) &&
ONCE_M4) {
printf("*remap conversion-%d*\n",block->m_modes[4]);
return convert_remapped_code(block, settings, STEP_MGROUP4, 'm',
block->m_modes[4]);
}else{
CONTROLLING_BLOCK(*settings).builtin_used = !STEP_REMAPPED_IN_BLOCK(block, STEP_MGROUP4);
printf("*no remap conversion-%d*\n",block->m_modes[4]);
}
/* reset stuff here */

/*1*/
Expand Down
1 change: 1 addition & 0 deletions src/emc/rs274ngc/interp_execute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ int Interp::execute_block(block_pointer block, //!< pointer to a block of RS27
printf("*Nope----------------------------------------%d*\n",block->m_modes[4]);
status = convert_stop(block, settings);
}
printf("*returned status:-----------exit-=%d-----ok=%d---------------------=%d\n",INTERP_EXIT,INTERP_OK,status);
if (status == INTERP_EXIT) {
return(INTERP_EXIT);
}
Expand Down

0 comments on commit c815629

Please sign in to comment.