Fix G53/CNC_COORDINATE_SYSTEMS compilation, Travis testing (#10227)

This commit is contained in:
Bob-the-Kuhn 2018-03-28 13:14:39 -05:00 committed by Scott Lahteine
parent 749f19e502
commit 9656a82609
3 changed files with 66 additions and 66 deletions

View file

@ -63,13 +63,13 @@ script:
- opt_set TEMP_SENSOR_1 1 - opt_set TEMP_SENSOR_1 1
- opt_set TEMP_SENSOR_BED 1 - opt_set TEMP_SENSOR_BED 1
- opt_set POWER_SUPPLY 1 - opt_set POWER_SUPPLY 1
- opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
- opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING ADVANCED_PAUSE_FEATURE - opt_enable_adv ARC_P_CIRCLES ADVANCED_PAUSE_FEATURE CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
- opt_set ABL_GRID_POINTS_X 16 - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING
- opt_set ABL_GRID_POINTS_Y 16 - opt_set GRID_MAX_POINTS_X 16
- opt_set_adv FANMUX0_PIN 53 - opt_set_adv FANMUX0_PIN 53
- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM} - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
# #
@ -363,8 +363,7 @@ script:
- opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER
- opt_enable_adv ADVANCED_PAUSE_FEATURE LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA PARK_HEAD_ON_PAUSE - opt_enable_adv ADVANCED_PAUSE_FEATURE LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA PARK_HEAD_ON_PAUSE
- opt_set_adv I2C_SLAVE_ADDRESS 63 - opt_set_adv I2C_SLAVE_ADDRESS 63
- opt_set ABL_GRID_POINTS_X 16 - opt_set GRID_MAX_POINTS_X 16
- opt_set ABL_GRID_POINTS_Y 16
- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM} - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
# #
# Test a Sled Z Probe with Linear leveling # Test a Sled Z Probe with Linear leveling

View file

@ -24,13 +24,14 @@
#include "../../module/motion.h" #include "../../module/motion.h"
#if ENABLED(CNC_COORDINATE_SYSTEMS) #if ENABLED(CNC_COORDINATE_SYSTEMS)
#include "../../module/stepper.h"
/** #include "../../module/stepper.h"
/**
* Select a coordinate system and update the workspace offset. * Select a coordinate system and update the workspace offset.
* System index -1 is used to specify machine-native. * System index -1 is used to specify machine-native.
*/ */
bool GcodeSuite::select_coordinate_system(const int8_t _new) { bool GcodeSuite::select_coordinate_system(const int8_t _new) {
if (active_coordinate_system == _new) return false; if (active_coordinate_system == _new) return false;
stepper.synchronize(); stepper.synchronize();
float old_offset[XYZ] = { 0 }, new_offset[XYZ] = { 0 }; float old_offset[XYZ] = { 0 }, new_offset[XYZ] = { 0 };
@ -47,9 +48,9 @@
} }
} }
return true; return true;
} }
/** /**
* G53: Apply native workspace to the current move * G53: Apply native workspace to the current move
* *
* In CNC G-code G53 is a modifier. * In CNC G-code G53 is a modifier.
@ -58,16 +59,16 @@
* *
* Marlin also uses G53 on a line by itself to go back to native space. * Marlin also uses G53 on a line by itself to go back to native space.
*/ */
inline void gcode_G53() { inline void GcodeSuite::G53() {
const int8_t _system = active_coordinate_system; const int8_t _system = active_coordinate_system;
active_coordinate_system = -1; active_coordinate_system = -1;
if (parser.chain()) { // If this command has more following... if (parser.chain()) { // If this command has more following...
process_parsed_command(); process_parsed_command();
active_coordinate_system = _system; active_coordinate_system = _system;
} }
} }
/** /**
* G54-G59.3: Select a new workspace * G54-G59.3: Select a new workspace
* *
* A workspace is an XYZ offset to the machine native space. * A workspace is an XYZ offset to the machine native space.
@ -76,18 +77,18 @@
* *
* G92 is used to set the current workspace's offset. * G92 is used to set the current workspace's offset.
*/ */
void G54_59(uint8_t subcode=0) { void G54_59(uint8_t subcode=0) {
const int8_t _space = parser.codenum - 54 + subcode; const int8_t _space = parser.codenum - 54 + subcode;
if (gcode.select_coordinate_system(_space)) { if (gcode.select_coordinate_system(_space)) {
SERIAL_PROTOCOLLNPAIR("Select workspace ", _space); SERIAL_PROTOCOLLNPAIR("Select workspace ", _space);
report_current_position(); report_current_position();
} }
} }
void GcodeSuite::G54() { G54_59(); } void GcodeSuite::G54() { G54_59(); }
void GcodeSuite::G55() { G54_59(); } void GcodeSuite::G55() { G54_59(); }
void GcodeSuite::G56() { G54_59(); } void GcodeSuite::G56() { G54_59(); }
void GcodeSuite::G57() { G54_59(); } void GcodeSuite::G57() { G54_59(); }
void GcodeSuite::G58() { G54_59(); } void GcodeSuite::G58() { G54_59(); }
void GcodeSuite::G59() { G54_59(parser.subcode); } void GcodeSuite::G59() { G54_59(parser.subcode); }
#endif // CNC_COORDINATE_SYSTEMS #endif // CNC_COORDINATE_SYSTEMS

View file

@ -851,7 +851,7 @@ void MarlinSettings::postprocess() {
_FIELD_TEST(coordinate_system); _FIELD_TEST(coordinate_system);
#if ENABLED(CNC_COORDINATE_SYSTEMS) #if ENABLED(CNC_COORDINATE_SYSTEMS)
EEPROM_WRITE(coordinate_system); // 27 floats EEPROM_WRITE(gcode.coordinate_system); // 27 floats
#else #else
dummy = 0.0f; dummy = 0.0f;
for (uint8_t q = MAX_COORDINATE_SYSTEMS * XYZ; q--;) EEPROM_WRITE(dummy); for (uint8_t q = MAX_COORDINATE_SYSTEMS * XYZ; q--;) EEPROM_WRITE(dummy);