mirror of
https://github.com/synthetos/g2.git
synced 2026-09-22 19:43:53 +08:00
Fixed text mode compile; fixed zero length move ends in cycle regression
This commit is contained in:
@@ -1320,9 +1320,12 @@ stat_t cm_straight_traverse(const float target[], const bool flags[])
|
||||
cm_cycle_start(); // required for homing & other cycles
|
||||
stat_t status = mp_aline(&cm.gm); // send the move to the planner
|
||||
cm_finalize_move();
|
||||
if (status == STAT_MINIMUM_LENGTH_MOVE && !mp_has_runnable_buffer()) {
|
||||
cm_cycle_end();
|
||||
return (STAT_OK);
|
||||
|
||||
if (status == STAT_MINIMUM_LENGTH_MOVE) {
|
||||
if (!mp_has_runnable_buffer()) { // handle condition where zero-length move is last or only move
|
||||
cm_cycle_end(); // ...otherwise cycle will not end properly
|
||||
}
|
||||
status = STAT_OK;
|
||||
}
|
||||
return (status);
|
||||
}
|
||||
@@ -1478,9 +1481,11 @@ stat_t cm_straight_feed(const float target[], const bool flags[])
|
||||
|
||||
cm_finalize_move(); // <-- ONLY safe because we don't care about status...
|
||||
|
||||
if (status == STAT_MINIMUM_LENGTH_MOVE && !mp_has_runnable_buffer()) {
|
||||
cm_cycle_end();
|
||||
return (STAT_OK);
|
||||
if (status == STAT_MINIMUM_LENGTH_MOVE) {
|
||||
if (!mp_has_runnable_buffer()) { // handle condition where zero-length move is last or only move
|
||||
cm_cycle_end(); // ...otherwise cycle will not end properly
|
||||
}
|
||||
status = STAT_OK;
|
||||
}
|
||||
return (status);
|
||||
}
|
||||
|
||||
@@ -949,6 +949,8 @@ stat_t cm_get_tram(nvObj_t *nv); // return if the rotation matrix is non-
|
||||
#define cm_print_mtoe tx_print_stub
|
||||
#define cm_print_mto tx_print_stub
|
||||
|
||||
#define cm_print_tram tx_print_stub
|
||||
|
||||
#define cm_print_am tx_print_stub // axis print functions
|
||||
#define cm_print_fr tx_print_stub
|
||||
#define cm_print_vm tx_print_stub
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.ARMGCC.CPP</ToolchainName>
|
||||
<ProjectGuid>{44ea8fec-55d7-4149-8a78-a574fc26bf51}</ProjectGuid>
|
||||
<avrdevice>ATSAM3X8E</avrdevice>
|
||||
<avrdevice>ATSAM3X8C</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
<Language>CPP</Language>
|
||||
@@ -101,7 +101,7 @@
|
||||
</PercepioTrace>
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<avrtoolserialnumber>J41800036434</avrtoolserialnumber>
|
||||
<avrdeviceexpectedsignature>0x285E0A60</avrdeviceexpectedsignature>
|
||||
<avrdeviceexpectedsignature>0x284E0A60</avrdeviceexpectedsignature>
|
||||
<avrtoolinterfaceclock>2000000</avrtoolinterfaceclock>
|
||||
<custom>
|
||||
<ToolOptions xmlns="">
|
||||
|
||||
+6
-6
@@ -40,15 +40,15 @@
|
||||
|
||||
/****** COMPILE-TIME SETTINGS ******/
|
||||
|
||||
#define __TEXT_MODE // enable text mode support (~14Kb) (also disables help screens)
|
||||
#define __HELP_SCREENS // enable help screens (~3.5Kb)
|
||||
#define __USER_DATA // enable user defined data groups
|
||||
#define __STEP_CORRECTION // enable virtual encoder step correction
|
||||
//#define __TEXT_MODE // enable text mode support (~14Kb) (also disables help screens)
|
||||
//#define __HELP_SCREENS // enable help screens (~3.5Kb)
|
||||
//#define __USER_DATA // enable user defined data groups
|
||||
//#define __STEP_CORRECTION // enable virtual encoder step correction
|
||||
|
||||
/****** DEVELOPMENT SETTINGS ******/
|
||||
|
||||
#define __DIAGNOSTICS // enables various debug functions
|
||||
#define __DIAGNOSTIC_PARAMETERS // enables system diagnostic parameters (_xx) in config_app
|
||||
//#define __DIAGNOSTICS // enables various debug functions
|
||||
//#define __DIAGNOSTIC_PARAMETERS // enables system diagnostic parameters (_xx) in config_app
|
||||
|
||||
/******************************************************************************
|
||||
***** APPLICATION DEFINITIONS ************************************************
|
||||
|
||||
Executable → Regular
+3
-2
@@ -2,8 +2,8 @@
|
||||
* gpio.h - Digital IO handling functions
|
||||
* This file is part of the g2core project
|
||||
*
|
||||
* Copyright (c) 2015 - 2016 Alden S. Hart, Jr.
|
||||
* Copyright (c) 2015 - 2016 Robert Giseburt
|
||||
* Copyright (c) 2015 - 2017 Alden S. Hart, Jr.
|
||||
* Copyright (c) 2015 - 2017 Robert Giseburt
|
||||
*
|
||||
* This file ("the software") is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2 as published by the
|
||||
@@ -155,6 +155,7 @@ stat_t io_set_output(nvObj_t *nv);
|
||||
#define io_print_fn tx_print_stub
|
||||
#define io_print_in tx_print_stub
|
||||
#define io_print_st tx_print_stub
|
||||
#define io_print_domode tx_print_stub
|
||||
#define io_print_out tx_print_stub
|
||||
#endif // __TEXT_MODE
|
||||
|
||||
|
||||
@@ -197,12 +197,12 @@ stat_t mp_aline(GCodeState_t* gm_in)
|
||||
|
||||
// exit if the move has zero movement. At all.
|
||||
if (fp_ZERO(length)) {
|
||||
sr_request_status_report(SR_REQUEST_TIMED_FULL); // Was SR_REQUEST_IMMEDIATE_FULL
|
||||
return (STAT_OK); // preferred over STAT_MINIMUM_LENGTH_MOVE
|
||||
sr_request_status_report(SR_REQUEST_TIMED_FULL);// Was SR_REQUEST_IMMEDIATE_FULL
|
||||
return (STAT_MINIMUM_LENGTH_MOVE); // STAT_MINIMUM_LENGTH_MOVE needed to end cycle
|
||||
}
|
||||
|
||||
// get a cleared buffer and copy in the Gcode model state
|
||||
if ((bf = mp_get_write_buffer()) == NULL) { // never supposed to fail
|
||||
if ((bf = mp_get_write_buffer()) == NULL) { // never supposed to fail
|
||||
return (cm_panic(STAT_FAILED_GET_PLANNER_BUFFER, "aline()"));
|
||||
}
|
||||
memcpy(&bf->gm, gm_in, sizeof(GCodeState_t));
|
||||
@@ -210,11 +210,11 @@ stat_t mp_aline(GCodeState_t* gm_in)
|
||||
copy_vector(bf->gm.target, target_rotated); // copy the rotated taget in place
|
||||
|
||||
// setup the buffer
|
||||
bf->bf_func = mp_exec_aline; // register the callback to the exec function
|
||||
bf->length = length; // record the length
|
||||
for (uint8_t axis = 0; axis < AXES; axis++) { // compute the unit vector and set flags
|
||||
if ((bf->axis_flags[axis] = flags[axis])) { // yes, this is supposed to be = and not ==
|
||||
bf->unit[axis] = axis_length[axis] / length; // nb: bf-> unit was cleared by mp_get_write_buffer()
|
||||
bf->bf_func = mp_exec_aline; // register the callback to the exec function
|
||||
bf->length = length; // record the length
|
||||
for (uint8_t axis = 0; axis < AXES; axis++) { // compute the unit vector and set flags
|
||||
if ((bf->axis_flags[axis] = flags[axis])) { // yes, this is supposed to be = and not ==
|
||||
bf->unit[axis] = axis_length[axis] / length;// nb: bf-> unit was cleared by mp_get_write_buffer()
|
||||
}
|
||||
}
|
||||
_calculate_jerk(bf); // compute bf->jerk values
|
||||
|
||||
Reference in New Issue
Block a user