From aa2135ecad899b10225fd87bd6d6fc6475d4813f Mon Sep 17 00:00:00 2001 From: Alden Hart Date: Tue, 27 Sep 2016 12:32:02 -0400 Subject: [PATCH 01/10] Updated arcs to agree with G18 motion in v8 edge-0.97 --- g2core/g2core.cppproj | 4 ++-- g2core/plan_arc.cpp | 50 +++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 27 deletions(-) mode change 100755 => 100644 g2core/plan_arc.cpp diff --git a/g2core/g2core.cppproj b/g2core/g2core.cppproj index e25a188c..c227a946 100644 --- a/g2core/g2core.cppproj +++ b/g2core/g2core.cppproj @@ -73,7 +73,7 @@ SWD com.atmel.avrdbg.tool.atmelice - J41800004259 + J41800019454 Atmel-ICE True @@ -100,7 +100,7 @@ True true - J41800004259 + J41800019454 0x284E0A60 2000000 diff --git a/g2core/plan_arc.cpp b/g2core/plan_arc.cpp old mode 100755 new mode 100644 index f7c3296f..052a6871 --- a/g2core/plan_arc.cpp +++ b/g2core/plan_arc.cpp @@ -173,9 +173,8 @@ stat_t cm_arc_feed(const float target[], const bool target_f[], // target en if (fabs(arc.radius) < MIN_ARC_RADIUS) { // radius value must be > minimum radius return (STAT_ARC_RADIUS_OUT_OF_TOLERANCE); } - - // test that center format absolute distance mode arcs have both offsets specified - } else { + } + else { // test that center format absolute distance mode arcs have both offsets specified if (cm.gm.arc_distance_mode == ABSOLUTE_MODE) { if (!(offset_f[arc.plane_axis_0] && offset_f[arc.plane_axis_1])) { // if one or both offsets are missing return (STAT_ARC_OFFSETS_MISSING_FOR_SELECTED_PLANE); @@ -214,18 +213,25 @@ stat_t cm_arc_feed(const float target[], const bool target_f[], // target en // *** now get down to the rest of the work setting up the arc for execution *** cm.gm.motion_mode = motion_mode; - cm_set_work_offsets(&cm.gm); // capture the fully resolved offsets to gm - memcpy(&arc.gm, &cm.gm, sizeof(GCodeState_t)); // copy GCode context to arc singleton - some will be overwritten to run segments - copy_vector(arc.position, cm.gmx.position); // set initial arc position from gcode model + cm_set_work_offsets(&cm.gm); // capture the fully resolved offsets to gm + memcpy(&arc.gm, &cm.gm, sizeof(GCodeState_t)); // copy GCode context to arc singleton - some will be overwritten to run segments + copy_vector(arc.position, cm.gmx.position); // set initial arc position from gcode model + // setup offsets arc.offset[OFS_I] = _to_millimeters(offset[OFS_I]); // copy offsets with conversion to canonical form (mm) arc.offset[OFS_J] = _to_millimeters(offset[OFS_J]); arc.offset[OFS_K] = _to_millimeters(offset[OFS_K]); if (arc.gm.arc_distance_mode == ABSOLUTE_MODE) { // adjust offsets if in absolute mode - arc.offset[OFS_I] -= cm.gmx.position[AXIS_X]; - arc.offset[OFS_J] -= cm.gmx.position[AXIS_Y]; - arc.offset[OFS_K] -= cm.gmx.position[AXIS_Z]; + arc.offset[OFS_I] -= arc.position[AXIS_X]; + arc.offset[OFS_J] -= arc.position[AXIS_Y]; + arc.offset[OFS_K] -= arc.position[AXIS_Z]; + } + + if ((fp_ZERO(arc.offset[OFS_I])) && // it's an error if no offsets are provided + (fp_ZERO(arc.offset[OFS_J])) && + (fp_ZERO(arc.offset[OFS_K]))) { + return (cm_alarm(STAT_ARC_OFFSETS_MISSING_FOR_SELECTED_PLANE, "arc offsets missing or zero")); } // compute arc runtime values @@ -235,12 +241,12 @@ stat_t cm_arc_feed(const float target[], const bool target_f[], // target en stat_t status = _test_arc_soft_limits(); if (status != STAT_OK) { cm.gm.motion_mode = MOTION_MODE_CANCEL_MOTION_MODE; - copy_vector(cm.gm.target, cm.gmx.position); // reset model position + copy_vector(cm.gm.target, arc.position); // reset model position return (cm_alarm(status, "arc soft_limits")); // throw an alarm } - cm_cycle_start(); // if not already started - arc.run_state = BLOCK_ACTIVE; // enable arc to be run from the callback + cm_cycle_start(); // if not already started + arc.run_state = BLOCK_ACTIVE; // enable arc to be run from the callback cm_finalize_move(); return (STAT_OK); } @@ -273,7 +279,7 @@ static stat_t _compute_arc(const bool radius_f) } // Test arc specification for correctness according to: - // http://linuxcnc.org/docs/html/gcode/gcode.html#sec:G2-G3-Arc + // https://github.com/synthetos/g2/wiki/Gcodes#g2-g3-arc-at-feed-rate // "It is an error if: when the arc is projected on the selected plane, the distance from // the current point to the center differs from the distance from the end point to the // center by more than (.05 inch/.5 mm) OR ((.0005 inch/.005mm) AND .1% of radius)." @@ -302,19 +308,13 @@ static stat_t _compute_arc(const bool radius_f) } else { if (arc.angular_travel > 0) { arc.angular_travel -= 2*M_PI; } } - // apply XZ plane (G18) correction - if (arc.gm.select_plane == CANON_PLANE_XZ) { - if (arc.angular_travel >= 0) { arc.angular_travel -= 2*M_PI; } - else { arc.angular_travel += 2*M_PI; } - } // add in travel for rotations if (arc.angular_travel >= 0) { arc.angular_travel += 2*M_PI * arc.rotations; } else { arc.angular_travel -= 2*M_PI * arc.rotations; } - + } // Compute full-circle arcs - } else { - if (cm.gm.motion_mode == MOTION_MODE_CCW_ARC) { arc.rotations *= -1; } - if (arc.gm.select_plane == CANON_PLANE_XZ) { arc.rotations *= -1; } + else { + if (arc.gm.motion_mode == MOTION_MODE_CCW_ARC) { arc.rotations *= -1; } arc.angular_travel = 2 * M_PI * arc.rotations; } @@ -428,8 +428,8 @@ static stat_t _compute_arc(const bool radius_f) static void _compute_arc_offsets_from_radius() { // Calculate the change in position along each selected axis - float x = cm.gm.target[arc.plane_axis_0] - cm.gmx.position[arc.plane_axis_0]; - float y = cm.gm.target[arc.plane_axis_1] - cm.gmx.position[arc.plane_axis_1]; + float x = arc.gm.target[arc.plane_axis_0] - arc.position[arc.plane_axis_0]; + float y = arc.gm.target[arc.plane_axis_1] - arc.position[arc.plane_axis_1]; // *** From Forrest Green - Other Machine Co, 3/27/14 // If the distance between endpoints is greater than the arc diameter, disc will be @@ -446,7 +446,7 @@ static void _compute_arc_offsets_from_radius() float h_x2_div_d = (disc > 0) ? -sqrt(disc) / hypotf(x,y) : 0; // Invert the sign of h_x2_div_d if circle is counter clockwise (see header notes) - if (cm.gm.motion_mode == MOTION_MODE_CCW_ARC) { + if (arc.gm.motion_mode == MOTION_MODE_CCW_ARC) { h_x2_div_d = -h_x2_div_d; } From 1e8188c7bd2d1c2733370954f97915966e5a835c Mon Sep 17 00:00:00 2001 From: Alden Hart Date: Sun, 2 Oct 2016 11:20:24 -0400 Subject: [PATCH 02/10] Updated Atmel-ICE --- g2core/g2core.cppproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g2core/g2core.cppproj b/g2core/g2core.cppproj index c227a946..8ae08008 100644 --- a/g2core/g2core.cppproj +++ b/g2core/g2core.cppproj @@ -73,7 +73,7 @@ SWD com.atmel.avrdbg.tool.atmelice - J41800019454 + J41800029761 Atmel-ICE True @@ -100,7 +100,7 @@ True true - J41800019454 + J41800029761 0x284E0A60 2000000 From a5048e2998e24b6b58316473bffb4640c43184a7 Mon Sep 17 00:00:00 2001 From: Alden Hart Date: Mon, 3 Oct 2016 09:32:00 -0400 Subject: [PATCH 03/10] Testing run for arcs. No functional changes, just formatting --- g2core/g2core.cppproj | 4 ++-- g2core/plan_exec.cpp | 5 +---- g2core/plan_line.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 10 deletions(-) mode change 100755 => 100644 g2core/plan_exec.cpp mode change 100755 => 100644 g2core/plan_line.cpp diff --git a/g2core/g2core.cppproj b/g2core/g2core.cppproj index 8ae08008..c227a946 100644 --- a/g2core/g2core.cppproj +++ b/g2core/g2core.cppproj @@ -73,7 +73,7 @@ SWD com.atmel.avrdbg.tool.atmelice - J41800029761 + J41800019454 Atmel-ICE True @@ -100,7 +100,7 @@ True true - J41800029761 + J41800019454 0x284E0A60 2000000 diff --git a/g2core/plan_exec.cpp b/g2core/plan_exec.cpp old mode 100755 new mode 100644 index 5627476f..bfc16c88 --- a/g2core/plan_exec.cpp +++ b/g2core/plan_exec.cpp @@ -120,9 +120,8 @@ stat_t mp_plan_move() if (block->exit_velocity > block->cruise_velocity) { __asm__("BKPT"); // exit > cruise after calculate_block } - if (block->head_length < 0.00001 && block->body_length < 0.00001 && block->tail_length < 0.00001) { - __asm__("BKPT"); // zero or negaitve length block + __asm__("BKPT"); // zero or negative length block } bf->buffer_state = MP_BUFFER_PLANNED; @@ -157,7 +156,6 @@ stat_t mp_exec_move() // rpt_exception(42, "mp_exec_move() buffer is not prepped"); // ^^^ CAUSES A CRASH. We can't rpt_exception from here! st_prep_null(); - return (STAT_NOOP); } if (bf->nx->buffer_state < MP_BUFFER_PREPPED) { @@ -170,7 +168,6 @@ stat_t mp_exec_move() if (cm.motion_state == MOTION_RUN) { // __asm__("BKPT"); // we are running but don't have a block planned } - // We need to have it planned. We don't want to do this here, as it // might already be happening in a lower interrupt. st_request_plan_move(); diff --git a/g2core/plan_line.cpp b/g2core/plan_line.cpp old mode 100755 new mode 100644 index 9737de72..caf56522 --- a/g2core/plan_line.cpp +++ b/g2core/plan_line.cpp @@ -411,12 +411,12 @@ static mpBuf_t* _plan_block(mpBuf_t* bf) // +++++ if (bf->buffer_state == MP_BUFFER_EMPTY) { - // _debug_trap("Exec apparently cleared this block while we were planning it."); + // _debug_trap("Exec apparently cleared this block while we were planning it."); break; // exit the loop, we've hit and passed the running buffer } - // if (fp_ZERO(bf->exit_velocity) && !fp_ZERO(bf->exit_vmax)) { - // _debug_trap(); // why zero? - // } + // if (fp_ZERO(bf->exit_velocity) && !fp_ZERO(bf->exit_vmax)) { + // _debug_trap(); // why zero? + // } // We might back plan into the running or planned buffer, so we have to check. if (bf->buffer_state < MP_BUFFER_PREPPED) { From 510f015a4b4faa1bd908f1ea32287f9dcab5707a Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Mon, 10 Oct 2016 14:27:08 -0500 Subject: [PATCH 04/10] Attempt to fix #123. --- g2core/canonical_machine.h | 1 + g2core/plan_exec.cpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/g2core/canonical_machine.h b/g2core/canonical_machine.h index 7804d79d..85d3db45 100755 --- a/g2core/canonical_machine.h +++ b/g2core/canonical_machine.h @@ -324,6 +324,7 @@ typedef struct GCodeState { // Gcode model state - used by model, pl // G82, G83 G84, G85, G86, G87, G88, G89 float target[AXES]; // XYZABC where the move should go + float target_comp[AXES]; // summation compensation (Kahan) overflow value float work_offset[AXES]; // offset from the work coordinate system (for reporting only) float feed_rate; // F - normalized to millimeters/minute or in inverse time mode diff --git a/g2core/plan_exec.cpp b/g2core/plan_exec.cpp index 5627476f..84c57d5b 100755 --- a/g2core/plan_exec.cpp +++ b/g2core/plan_exec.cpp @@ -896,8 +896,17 @@ static stat_t _exec_aline_segment() copy_vector(mr.gm.target, mr.waypoint[mr.section]); } else { float segment_length = mr.segment_velocity * mr.segment_time; + // see https://en.wikipedia.org/wiki/Kahan_summation_algorithm + // for the summation compensation description for (uint8_t a=0; a Date: Mon, 17 Oct 2016 15:47:59 -0500 Subject: [PATCH 05/10] Fix #173 - (Motate update) UART will now honor CTS as flow control. --- Motate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Motate b/Motate index 73dbb3ce..1540f1af 160000 --- a/Motate +++ b/Motate @@ -1 +1 @@ -Subproject commit 73dbb3ce43f28cb3ac3c9175b3569dd3d6c93d5b +Subproject commit 1540f1af7fd2213a704fc8585513effae041f9f1 From 715fee6dbc9e03ad452e0af3b9fa7db5f0e682e0 Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Mon, 17 Oct 2016 15:55:36 -0500 Subject: [PATCH 06/10] 100.12 // Fix UART flow control --- g2core/g2core_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g2core/g2core_info.h b/g2core/g2core_info.h index 1c960a61..d81a3420 100644 --- a/g2core/g2core_info.h +++ b/g2core/g2core_info.h @@ -21,7 +21,7 @@ #ifndef G2CORE_INFO_H_ONCE #define G2CORE_INFO_H_ONCE -#define G2CORE_FIRMWARE_BUILD 100.11 // Power Management Fixes +#define G2CORE_FIRMWARE_BUILD 100.12 // Fix UART flow control #ifdef GIT_VERSION #define G2CORE_FIRMWARE_BUILD_STRING GIT_VERSION #else From 5e3b0c709645da3cddf30afaba6b560be7d9c405 Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Fri, 28 Oct 2016 22:36:27 -0500 Subject: [PATCH 07/10] (Backport) Fixes for Archim, fixed kSerial_(RX|TX|RTS|CTS)PinNumber constant naming on all boards. --- g2core/board/Archim.mk | 2 +- g2core/board/Archim/Archim-pinout.h | 16 +++--- g2core/board/Archim/board_xio.cpp | 57 +++++++++++-------- g2core/board/Archim/board_xio.h | 23 ++++---- g2core/board/Archim/hardware.cpp | 49 +++++++++++++--- g2core/board/ArduinoDue/board_xio.cpp | 4 +- g2core/board/ArduinoDue/board_xio.h | 2 +- g2core/board/ArduinoDue/gShield-pinout.h | 8 +-- .../board/ArduinoDue/shopbotShield-pinout.h | 4 +- g2core/board/G2v9/board_xio.cpp | 4 +- g2core/board/G2v9/board_xio.h | 2 +- g2core/board/G2v9/motate_pin_assignments.h | 8 +-- g2core/board/printrboardg2/board_xio.cpp | 4 +- g2core/board/printrboardg2/board_xio.h | 2 +- .../printrboardg2/motate_pin_assignments.h | 8 +-- .../printrboardg2/printrboardG2v3-pinout.h | 8 +-- g2core/board/sbv300/board_xio.cpp | 4 +- g2core/board/sbv300/board_xio.h | 2 +- g2core/board/sbv300/motate_pin_assignments.h | 8 +-- 19 files changed, 129 insertions(+), 86 deletions(-) diff --git a/g2core/board/Archim.mk b/g2core/board/Archim.mk index bf8bb2c8..7a2c46ae 100755 --- a/g2core/board/Archim.mk +++ b/g2core/board/Archim.mk @@ -33,7 +33,7 @@ ifeq ("$(BASE_BOARD)","archim") CHIP_LOWERCASE = sam3x8e BOARD_PATH = ./board/Archim - SOURCE_DIRS += ${BOARD_PATH} + SOURCE_DIRS += ${BOARD_PATH} device/step_dir_driver PLATFORM_BASE = ${MOTATE_PATH}/platform/atmel_sam diff --git a/g2core/board/Archim/Archim-pinout.h b/g2core/board/Archim/Archim-pinout.h index 4bab1531..1d49ac1a 100755 --- a/g2core/board/Archim/Archim-pinout.h +++ b/g2core/board/Archim/Archim-pinout.h @@ -84,15 +84,15 @@ namespace Motate { // NOT ALL OF THESE PINS ARE ON ALL PLATFORMS // Undefined pins will be equivalent to Motate::NullPin, and return 1 for Pin<>::isNull(); -pin_number kSerial_RX = 0; -pin_number kSerial_TX = 1; -// pin_number kSerial_RTS = 8; // added later -// pin_number kSerial_CTS = 9; // added later +pin_number kSerial_RXPinNumber = 0; +pin_number kSerial_TXPinNumber = 1; +pin_number kSerial_RTSPinNumber = 2; // added later +pin_number kSerial_CTSPinNumber = 3; // added later -pin_number kSerial0_RX = 0; -pin_number kSerial0_TX = 1; -// pin_number kSerial0_RTS = 8; // added later -// pin_number kSerial0_CTS = 9; // added later +pin_number kSerial0_RXPinNumber = 0; +pin_number kSerial0_TXPinNumber = 1; +pin_number kSerial0_RTSPinNumber = 2; // added later +pin_number kSerial0_CTSPinNumber = 3; // added later pin_number kI2C_SDAPinNumber = 20; pin_number kI2C_SCLPinNumber = 21; diff --git a/g2core/board/Archim/board_xio.cpp b/g2core/board/Archim/board_xio.cpp index 0e6ce2b1..ff0846e1 100755 --- a/g2core/board/Archim/board_xio.cpp +++ b/g2core/board/Archim/board_xio.cpp @@ -32,48 +32,59 @@ #include "board_xio.h" //******** USB ******** +#if XIO_HAS_USB const Motate::USBSettings_t Motate::USBSettings = { /*gVendorID = */ 0x1d50, /*gProductID = */ 0x606d, /*gProductVersion = */ G2CORE_FIRMWARE_VERSION, /*gAttributes = */ kUSBConfigAttributeSelfPowered, - /*gPowerConsumption = */ 500}; -/*gProductVersion = */ // 0.1, + /*gPowerConsumption = */ 500 +}; +/*gProductVersion = */ //0.1, -// Motate::USBDevice< Motate::USBCDC > usb; -Motate::USBDevice usb; +//Motate::USBDevice< Motate::USBCDC > usb; +Motate::USBDevice< Motate::USBCDC, Motate::USBCDC > usb; -decltype(usb.mixin<0>::Serial)& SerialUSB = usb.mixin<0>::Serial; -decltype(usb.mixin<1>::Serial)& SerialUSB1 = usb.mixin<1>::Serial; +decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial; +decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial; // 115200 is the default, as well. -// UART Serial {115200, UARTMode::RTSCTSFlowControl}; +//UART Serial {115200, UARTMode::RTSCTSFlowControl}; - -MOTATE_SET_USB_VENDOR_STRING({'S', 'y', 'n', 't', 'h', 'e', 't', 'o', 's'}) -MOTATE_SET_USB_PRODUCT_STRING({'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'}) +MOTATE_SET_USB_VENDOR_STRING( u"Synthetos (http://synthetos.com)" ) +MOTATE_SET_USB_PRODUCT_STRING( u"g2core gQuadratic" ) MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID() - - +#endif // XIO_HAS_USB //******** SPI ******** -// Motate::SPI spi; - +#if XIO_HAS_SPI +Motate::SPI spi; +#endif //******** UART ******** -// Motate::UART Serial {115200, -// Motate::UARTMode::RTSCTSFlowControl}; +#if XIO_HAS_UART +Motate::UART Serial {115200, Motate::UARTMode::RTSCTSFlowControl}; +#endif - - -void board_xio_init(void) { +void board_hardware_init(void) // called 1st +{ +#if XIO_HAS_USB // Init USB - usb.attach(); // USB setup. Runs in "background" as the rest of this executes + usb.attach(); // USB setup. Runs in "background" as the rest of this executes +#endif // XIO_HAS_USB +} - // Init SPI (handled internally for now) +void board_xio_init(void) // called later than board_hardware_init (there are thing in between) +{ + // Init SPI +#if XIO_HAS_SPI + // handled internally for now +#endif // Init UART - // Serial.init(); -} \ No newline at end of file +#if XIO_HAS_UART + Serial.init(); +#endif +} diff --git a/g2core/board/Archim/board_xio.h b/g2core/board/Archim/board_xio.h index d40e88b3..102698d3 100755 --- a/g2core/board/Archim/board_xio.h +++ b/g2core/board/Archim/board_xio.h @@ -30,6 +30,7 @@ #define board_xio_h //******** USB ******** +#if XIO_HAS_USB #include "MotateUSB.h" #include "MotateUSBCDC.h" @@ -37,23 +38,23 @@ extern Motate::USBDevice usb; extern decltype(usb.mixin<0>::Serial)& SerialUSB; extern decltype(usb.mixin<1>::Serial)& SerialUSB1; - +#endif // XIO_HAS_USB //******** SPI ******** -//#include "MotateSPI.h" -// extern Motate::SPI spi; - - +#if XIO_HAS_SPI +#include "MotateSPI.h" +extern Motate::SPI spi; +#endif //******** UART ******** -#define XIO_HAS_UART 0 -//#include "MotateUART.h" -// extern Motate::UART Serial; - - +#if XIO_HAS_UART +#include "MotateUART.h" +extern Motate::UART Serial; +#endif //******* Generic Functions ******* -void board_xio_init(void); +void board_hardware_init(void); // called 1st +void board_xio_init(void); // called later #endif // board_xio_h diff --git a/g2core/board/Archim/hardware.cpp b/g2core/board/Archim/hardware.cpp index 19731b3a..11d740ef 100755 --- a/g2core/board/Archim/hardware.cpp +++ b/g2core/board/Archim/hardware.cpp @@ -55,6 +55,15 @@ void hw_hard_reset(void) Motate::System::reset(/*boootloader: */ false); // arg=0 resets the system } +/* + * hardware_periodic() - callback from the controller loop - TIME CRITICAL. + */ + +stat_t hardware_periodic() +{ + return STAT_OK; +} + void hw_flash_loader(void) { Motate::System::reset(/*boootloader: */ true); // arg=1 erases FLASH and enters FLASH loader @@ -89,7 +98,27 @@ void _get_id(char *id) stat_t hw_get_fbs(nvObj_t *nv) { nv->valuetype = TYPE_STRING; - ritorno(nv_copy_string(nv, "build")); + ritorno(nv_copy_string(nv, G2CORE_FIRMWARE_BUILD_STRING)); + return (STAT_OK); +} + +/* + * hw_get_fbc() - get configuration settings file + */ + +stat_t hw_get_fbc(nvObj_t *nv) +{ + nv->valuetype = TYPE_STRING; +#ifdef SETTINGS_FILE +#define settings_file_string1(s) #s +#define settings_file_string2(s) settings_file_string1(s) + ritorno(nv_copy_string(nv, settings_file_string2(SETTINGS_FILE))); +#undef settings_file_string1 +#undef settings_file_string2 +#else + ritorno(nv_copy_string(nv, "")); +#endif + return (STAT_OK); } @@ -131,20 +160,22 @@ stat_t hw_set_hv(nvObj_t *nv) #ifdef __TEXT_MODE -static const char fmt_fb[] = "[fb] firmware build%18.2f\n"; -static const char fmt_fbs[] = "[fbs] firmware build \"%32s\"\n"; +static const char fmt_fb[] = "[fb] firmware build %18.2f\n"; +static const char fmt_fbs[] = "[fbs] firmware build \"%s\"\n"; +static const char fmt_fbc[] = "[fbc] firmware config \"%s\"\n"; static const char fmt_fv[] = "[fv] firmware version%16.2f\n"; static const char fmt_cv[] = "[cv] configuration version%11.2f\n"; static const char fmt_hp[] = "[hp] hardware platform%15.2f\n"; static const char fmt_hv[] = "[hv] hardware version%16.2f\n"; static const char fmt_id[] = "[id] g2core ID%21s\n"; -void hw_print_fb(nvObj_t *nv) { text_print(nv, fmt_fb);} // TYPE_FLOAT +void hw_print_fb(nvObj_t *nv) { text_print(nv, fmt_fb);} // TYPE_FLOAT void hw_print_fbs(nvObj_t *nv) { text_print(nv, fmt_fbs);} // TYPE_STRING -void hw_print_fv(nvObj_t *nv) { text_print(nv, fmt_fv);} // TYPE_FLOAT -void hw_print_cv(nvObj_t *nv) { text_print(nv, fmt_cv);} // TYPE_FLOAT -void hw_print_hp(nvObj_t *nv) { text_print(nv, fmt_hp);} // TYPE_FLOAT -void hw_print_hv(nvObj_t *nv) { text_print(nv, fmt_hv);} // TYPE_FLOAT -void hw_print_id(nvObj_t *nv) { text_print(nv, fmt_id);} // TYPE_STRING +void hw_print_fbc(nvObj_t *nv) { text_print(nv, fmt_fbc);} // TYPE_STRING +void hw_print_fv(nvObj_t *nv) { text_print(nv, fmt_fv);} // TYPE_FLOAT +void hw_print_cv(nvObj_t *nv) { text_print(nv, fmt_cv);} // TYPE_FLOAT +void hw_print_hp(nvObj_t *nv) { text_print(nv, fmt_hp);} // TYPE_FLOAT +void hw_print_hv(nvObj_t *nv) { text_print(nv, fmt_hv);} // TYPE_FLOAT +void hw_print_id(nvObj_t *nv) { text_print(nv, fmt_id);} // TYPE_STRING #endif //__TEXT_MODE diff --git a/g2core/board/ArduinoDue/board_xio.cpp b/g2core/board/ArduinoDue/board_xio.cpp index 8df11bc4..04d9a326 100755 --- a/g2core/board/ArduinoDue/board_xio.cpp +++ b/g2core/board/ArduinoDue/board_xio.cpp @@ -47,7 +47,7 @@ decltype(usb.mixin<0>::Serial)& SerialUSB = usb.mixin<0>::Serial; decltype(usb.mixin<1>::Serial)& SerialUSB1 = usb.mixin<1>::Serial; // 115200 is the default, as well. -// UART Serial {115200, UARTMode::RTSCTSFlowControl}; +// UART Serial {115200, UARTMode::RTSCTSFlowControl}; MOTATE_SET_USB_VENDOR_STRING({'S', 'y', 'n', 't', 'h', 'e', 't', 'o', 's'}) @@ -64,7 +64,7 @@ Motate::SPI spi; //******** UART ******** #if XIO_HAS_UART -Motate::UART Serial{ +Motate::UART Serial{ 115200, Motate::UARTMode::RTSCTSFlowControl}; #endif diff --git a/g2core/board/ArduinoDue/board_xio.h b/g2core/board/ArduinoDue/board_xio.h index 207a564c..a7bf7959 100755 --- a/g2core/board/ArduinoDue/board_xio.h +++ b/g2core/board/ArduinoDue/board_xio.h @@ -49,7 +49,7 @@ extern Motate::SPI spi; //******** UART ******** #if XIO_HAS_UART #include "MotateUART.h" -extern Motate::UART Serial; +extern Motate::UART Serial; #endif diff --git a/g2core/board/ArduinoDue/gShield-pinout.h b/g2core/board/ArduinoDue/gShield-pinout.h index 94f258da..314ef41e 100755 --- a/g2core/board/ArduinoDue/gShield-pinout.h +++ b/g2core/board/ArduinoDue/gShield-pinout.h @@ -89,10 +89,10 @@ namespace Motate { // NOT ALL OF THESE PINS ARE ON ALL PLATFORMS // Undefined pins will be equivalent to Motate::NullPin, and return 1 for Pin<>::isNull(); -pin_number kSerial_RX = 0; -pin_number kSerial_TX = 1; -// pin_number kSerial_RTS = 8; // added later -// pin_number kSerial_CTS = 9; // added later +pin_number kSerial_RXPinNumber = 0; +pin_number kSerial_TXPinNumber = 1; +// pin_number kSerial_RTSPinNumber = 8; // added later +// pin_number kSerial_CTSPinNumber = 9; // added later pin_number kSerial0_RX = 0; pin_number kSerial0_TX = 1; diff --git a/g2core/board/ArduinoDue/shopbotShield-pinout.h b/g2core/board/ArduinoDue/shopbotShield-pinout.h index fadf485d..b9ba361e 100755 --- a/g2core/board/ArduinoDue/shopbotShield-pinout.h +++ b/g2core/board/ArduinoDue/shopbotShield-pinout.h @@ -82,8 +82,8 @@ namespace Motate { // NOT ALL OF THESE PINS ARE ON ALL PLATFORMS // Undefined pins will be equivalent to Motate::NullPin, and return 1 for Pin<>::isNull(); -pin_number kSerial_RX = 0; -pin_number kSerial_TX = 1; +pin_number kSerial_RXPinNumber = 0; +pin_number kSerial_TXPinNumber = 1; pin_number kSerial0_RX = 0; pin_number kSerial0_TX = 1; diff --git a/g2core/board/G2v9/board_xio.cpp b/g2core/board/G2v9/board_xio.cpp index 8df11bc4..04d9a326 100755 --- a/g2core/board/G2v9/board_xio.cpp +++ b/g2core/board/G2v9/board_xio.cpp @@ -47,7 +47,7 @@ decltype(usb.mixin<0>::Serial)& SerialUSB = usb.mixin<0>::Serial; decltype(usb.mixin<1>::Serial)& SerialUSB1 = usb.mixin<1>::Serial; // 115200 is the default, as well. -// UART Serial {115200, UARTMode::RTSCTSFlowControl}; +// UART Serial {115200, UARTMode::RTSCTSFlowControl}; MOTATE_SET_USB_VENDOR_STRING({'S', 'y', 'n', 't', 'h', 'e', 't', 'o', 's'}) @@ -64,7 +64,7 @@ Motate::SPI spi; //******** UART ******** #if XIO_HAS_UART -Motate::UART Serial{ +Motate::UART Serial{ 115200, Motate::UARTMode::RTSCTSFlowControl}; #endif diff --git a/g2core/board/G2v9/board_xio.h b/g2core/board/G2v9/board_xio.h index 207a564c..a7bf7959 100755 --- a/g2core/board/G2v9/board_xio.h +++ b/g2core/board/G2v9/board_xio.h @@ -49,7 +49,7 @@ extern Motate::SPI spi; //******** UART ******** #if XIO_HAS_UART #include "MotateUART.h" -extern Motate::UART Serial; +extern Motate::UART Serial; #endif diff --git a/g2core/board/G2v9/motate_pin_assignments.h b/g2core/board/G2v9/motate_pin_assignments.h index c1f50dfa..4239e8e0 100755 --- a/g2core/board/G2v9/motate_pin_assignments.h +++ b/g2core/board/G2v9/motate_pin_assignments.h @@ -39,10 +39,10 @@ namespace Motate { // NOT ALL OF THESE PINS ARE ON ALL PLATFORMS // Undefined pins will be equivalent to Motate::NullPin, and return 1 for Pin<>::isNull(); -pin_number kSerial_RX = 0; -pin_number kSerial_TX = 1; -pin_number kSerial_RTS = 8; // added later -pin_number kSerial_CTS = 9; // added later +pin_number kSerial_RXPinNumber = 0; +pin_number kSerial_TXPinNumber = 1; +pin_number kSerial_RTSPinNumber = 8; // added later +pin_number kSerial_CTSPinNumber = 9; // added later pin_number kSerial0_RX = 0; pin_number kSerial0_TX = 1; diff --git a/g2core/board/printrboardg2/board_xio.cpp b/g2core/board/printrboardg2/board_xio.cpp index 8122e268..709b0e57 100755 --- a/g2core/board/printrboardg2/board_xio.cpp +++ b/g2core/board/printrboardg2/board_xio.cpp @@ -48,7 +48,7 @@ decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial; decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial; // 115200 is the default, as well. -//UART Serial {115200, UARTMode::RTSCTSFlowControl}; +//UART Serial {115200, UARTMode::RTSCTSFlowControl}; MOTATE_SET_USB_VENDOR_STRING( {'S' ,'y', 'n', 't', 'h', 'e', 't', 'o', 's'} ) MOTATE_SET_USB_PRODUCT_STRING( {'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'} ) @@ -63,7 +63,7 @@ Motate::SPI spi; //******** UART ******** #if XIO_HAS_UART -Motate::UART Serial {115200, Motate::UARTMode::RTSCTSFlowControl}; +Motate::UART Serial {115200, Motate::UARTMode::RTSCTSFlowControl}; #endif void board_hardware_init(void) // called 1st diff --git a/g2core/board/printrboardg2/board_xio.h b/g2core/board/printrboardg2/board_xio.h index fc241226..8164ad3c 100755 --- a/g2core/board/printrboardg2/board_xio.h +++ b/g2core/board/printrboardg2/board_xio.h @@ -48,7 +48,7 @@ extern Motate::SPI spi; //******** UART ******** #if XIO_HAS_UART #include "MotateUART.h" -extern Motate::UART Serial; +extern Motate::UART Serial; #endif //******* Generic Functions ******* diff --git a/g2core/board/printrboardg2/motate_pin_assignments.h b/g2core/board/printrboardg2/motate_pin_assignments.h index f3d1e433..d82bcb26 100755 --- a/g2core/board/printrboardg2/motate_pin_assignments.h +++ b/g2core/board/printrboardg2/motate_pin_assignments.h @@ -40,10 +40,10 @@ namespace Motate { // Undefined pins will be equivalent to Motate::NullPin, and return 1 for Pin<>::isNull(); -pin_number kSerial_RX = 0; -pin_number kSerial_TX = 1; -pin_number kSerial_RTS = 2; // added later -pin_number kSerial_CTS = 3; // added later +pin_number kSerial_RXPinNumber = 0; +pin_number kSerial_TXPinNumber = 1; +pin_number kSerial_RTSPinNumber = 2; // added later +pin_number kSerial_CTSPinNumber = 3; // added later pin_number kSerial0_RX = 0; pin_number kSerial0_TX = 1; diff --git a/g2core/board/printrboardg2/printrboardG2v3-pinout.h b/g2core/board/printrboardg2/printrboardG2v3-pinout.h index d2183fdc..85df15db 100755 --- a/g2core/board/printrboardg2/printrboardG2v3-pinout.h +++ b/g2core/board/printrboardg2/printrboardG2v3-pinout.h @@ -130,14 +130,14 @@ _MAKE_MOTATE_PIN(kADC0_PinNumber, 'A', 4); // BED_ADC _MAKE_MOTATE_PIN(kOutput1_PinNumber, 'A', 5); // DO_1 (Extruder1_PWM) _MAKE_MOTATE_PIN(kOutput3_PinNumber, 'A', 6); // DO_3 (Fan1B_PWM) _MAKE_MOTATE_PIN(kOutputSAFE_PinNumber, 'A', 7); // DO_9 (SAFE_PULSES - output from MCU) -_MAKE_MOTATE_PIN(kSerial_RX, 'A', 8); // UART_RX -_MAKE_MOTATE_PIN(kSerial_TX, 'A', 9); // UART_TX +_MAKE_MOTATE_PIN(kSerial_RXPinNumber, 'A', 8); // UART_RX +_MAKE_MOTATE_PIN(kSerial_TXPinNumber, 'A', 9); // UART_TX _MAKE_MOTATE_PIN(kInput5_PinNumber, 'A', 10); // DI_5 (ZMin) _MAKE_MOTATE_PIN(kInput4_PinNumber, 'A', 11); // DI_4 (YMax) _MAKE_MOTATE_PIN(kUnassigned4, 'A', 12); // USART_RX (not used) _MAKE_MOTATE_PIN(kUnassigned5, 'A', 13); // USART_TX (not used) -_MAKE_MOTATE_PIN(kSerial_RTS, 'A', 14); // UART_RTS -_MAKE_MOTATE_PIN(kSerial_CTS, 'A', 15); // UART_CTS +_MAKE_MOTATE_PIN(kSerial_RTSPinNumber, 'A', 14); // UART_RTS +_MAKE_MOTATE_PIN(kSerial_CTSPinNumber, 'A', 15); // UART_CTS _MAKE_MOTATE_PIN(kSocket1_DirPinNumber, 'A', 16); // M1_DIR _MAKE_MOTATE_PIN(kUnassigned6, 'A', 17); // nc _MAKE_MOTATE_PIN(kSocket1_InterruptPinNumber, 'A', 18); // INTERRUPT_OUT diff --git a/g2core/board/sbv300/board_xio.cpp b/g2core/board/sbv300/board_xio.cpp index f586f285..712a89e9 100755 --- a/g2core/board/sbv300/board_xio.cpp +++ b/g2core/board/sbv300/board_xio.cpp @@ -48,7 +48,7 @@ decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial; decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial; // 115200 is the default, as well. -//UART Serial {115200, UARTMode::RTSCTSFlowControl}; +//UART Serial {115200, UARTMode::RTSCTSFlowControl}; MOTATE_SET_USB_VENDOR_STRING( {'S' ,'y', 'n', 't', 'h', 'e', 't', 'o', 's'} ) @@ -65,7 +65,7 @@ Motate::SPI spi; //******** UART ******** #if XIO_HAS_UART -Motate::UART Serial{ +Motate::UART Serial{ 115200, Motate::UARTMode::RTSCTSFlowControl}; #endif diff --git a/g2core/board/sbv300/board_xio.h b/g2core/board/sbv300/board_xio.h index 01919f1c..40b42a09 100755 --- a/g2core/board/sbv300/board_xio.h +++ b/g2core/board/sbv300/board_xio.h @@ -48,7 +48,7 @@ extern decltype(usb.mixin<1>::Serial)& SerialUSB1; //******** UART ******** //#include "MotateUART.h" -// extern Motate::UART Serial; +// extern Motate::UART Serial; diff --git a/g2core/board/sbv300/motate_pin_assignments.h b/g2core/board/sbv300/motate_pin_assignments.h index 9268f79b..de1a5dc7 100755 --- a/g2core/board/sbv300/motate_pin_assignments.h +++ b/g2core/board/sbv300/motate_pin_assignments.h @@ -39,10 +39,10 @@ namespace Motate { // NOT ALL OF THESE PINS ARE ON ALL PLATFORMS // Undefined pins will be equivalent to Motate::NullPin, and return 1 for Pin<>::isNull(); -pin_number kSerial_RX = -1; -pin_number kSerial_TX = -1; -pin_number kSerial_RTS = -1; // added later -pin_number kSerial_CTS = -1; // added later +pin_number kSerial_RXPinNumber = -1; +pin_number kSerial_TXPinNumber = -1; +pin_number kSerial_RTSPinNumber = -1; // added later +pin_number kSerial_CTSPinNumber = -1; // added later pin_number kSerial0_RX = -1; pin_number kSerial0_TX = -1; From 1643999b809ac8007f73868d033bf0afe15a4c7f Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Fri, 28 Oct 2016 21:48:32 -0500 Subject: [PATCH 08/10] Removing F_CPU and all uses of it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s not longer accurate and mostly unused. It’s use by PWM was inaccurate. --- g2core/board/Archim/hardware.h | 2 -- g2core/board/ArduinoDue/hardware.h | 2 -- g2core/board/G2v9/hardware.h | 2 -- g2core/board/gquadratic/hardware.h | 2 -- g2core/board/gquintic/hardware.h | 2 -- g2core/board/printrboardg2/hardware.h | 2 -- g2core/board/sbv300/hardware.h | 2 -- g2core/pwm.cpp | 8 ++++---- g2core/stepper.cpp | 6 +++--- g2core/stepper.h | 2 +- 10 files changed, 8 insertions(+), 22 deletions(-) diff --git a/g2core/board/Archim/hardware.h b/g2core/board/Archim/hardware.h index 7b3f05c4..d66cae7d 100755 --- a/g2core/board/Archim/hardware.h +++ b/g2core/board/Archim/hardware.h @@ -82,8 +82,6 @@ using Motate::OutputPin; * Global System Defines * *************************/ -#undef F_CPU // CPU clock - set for delays -#define F_CPU 84000000UL #define MILLISECONDS_PER_TICK 1 // MS for system tick (systick * N) #define SYS_ID_DIGITS 12 // actual digits in system ID (up to 16) #define SYS_ID_LEN 16 // total length including dashes and NUL diff --git a/g2core/board/ArduinoDue/hardware.h b/g2core/board/ArduinoDue/hardware.h index ed513965..1b5bbe6b 100755 --- a/g2core/board/ArduinoDue/hardware.h +++ b/g2core/board/ArduinoDue/hardware.h @@ -84,8 +84,6 @@ using Motate::OutputPin; * Global System Defines * *************************/ -#undef F_CPU // CPU clock - set for delays -#define F_CPU 84000000UL #define MILLISECONDS_PER_TICK 1 // MS for system tick (systick * N) #define SYS_ID_DIGITS 12 // actual digits in system ID (up to 16) #define SYS_ID_LEN 16 // total length including dashes and NUL diff --git a/g2core/board/G2v9/hardware.h b/g2core/board/G2v9/hardware.h index 68fa77a5..835dfc44 100755 --- a/g2core/board/G2v9/hardware.h +++ b/g2core/board/G2v9/hardware.h @@ -84,8 +84,6 @@ using Motate::OutputPin; * Global System Defines * *************************/ -#undef F_CPU // CPU clock - set for delays -#define F_CPU 84000000UL #define MILLISECONDS_PER_TICK 1 // MS for system tick (systick * N) #define SYS_ID_DIGITS 12 // actual digits in system ID (up to 16) #define SYS_ID_LEN 16 // total length including dashes and NUL diff --git a/g2core/board/gquadratic/hardware.h b/g2core/board/gquadratic/hardware.h index fa05771c..9784b4d6 100755 --- a/g2core/board/gquadratic/hardware.h +++ b/g2core/board/gquadratic/hardware.h @@ -85,8 +85,6 @@ using Motate::OutputPin; * Global System Defines * *************************/ -#undef F_CPU // CPU clock - set for delays -#define F_CPU 84000000UL #define MILLISECONDS_PER_TICK 1 // MS for system tick (systick * N) #define SYS_ID_DIGITS 12 // actual digits in system ID (up to 16) #define SYS_ID_LEN 16 // total length including dashes and NUL diff --git a/g2core/board/gquintic/hardware.h b/g2core/board/gquintic/hardware.h index 78943c2d..2f3fc969 100755 --- a/g2core/board/gquintic/hardware.h +++ b/g2core/board/gquintic/hardware.h @@ -83,8 +83,6 @@ using Motate::OutputPin; * Global System Defines * *************************/ -#undef F_CPU // CPU clock - set for delays -#define F_CPU 84000000UL #define MILLISECONDS_PER_TICK 1 // MS for system tick (systick * N) #define SYS_ID_DIGITS 12 // actual digits in system ID (up to 16) #define SYS_ID_LEN 16 // total length including dashes and NUL diff --git a/g2core/board/printrboardg2/hardware.h b/g2core/board/printrboardg2/hardware.h index 91af3784..6046c789 100755 --- a/g2core/board/printrboardg2/hardware.h +++ b/g2core/board/printrboardg2/hardware.h @@ -82,8 +82,6 @@ using Motate::OutputPin; * Global System Defines * *************************/ -#undef F_CPU // CPU clock - set for delays -#define F_CPU 84000000UL #define MILLISECONDS_PER_TICK 1 // MS for system tick (systick * N) #define SYS_ID_DIGITS 12 // actual digits in system ID (up to 16) #define SYS_ID_LEN 16 // total length including dashes and NUL diff --git a/g2core/board/sbv300/hardware.h b/g2core/board/sbv300/hardware.h index 8b930d1e..0e576ab4 100755 --- a/g2core/board/sbv300/hardware.h +++ b/g2core/board/sbv300/hardware.h @@ -82,8 +82,6 @@ using Motate::OutputPin; * Global System Defines * *************************/ -#undef F_CPU // CPU clock - set for delays -#define F_CPU 84000000UL #define MILLISECONDS_PER_TICK 1 // MS for system tick (systick * N) #define SYS_ID_DIGITS 12 // actual digits in system ID (up to 16) #define SYS_ID_LEN 16 // total length including dashes and NUL diff --git a/g2core/pwm.cpp b/g2core/pwm.cpp index f141ea8d..82248fdf 100755 --- a/g2core/pwm.cpp +++ b/g2core/pwm.cpp @@ -45,8 +45,8 @@ static Motate::PWMOutputPin secondary_pwm_pin; //#define PWM_TIMER_TYPE TC1_struct // PWM uses TC1's #define PWM_TIMER_t TC1_t // PWM uses TC1's #define PWM_TIMER_DISABLE 0 // turn timer off (clock = 0 Hz) -#define PWM_MAX_FREQ (F_CPU/256) // max frequency with 8-bits duty cycle precision -#define PWM_MIN_FREQ (F_CPU/64/65536) // min frequency with supported prescaling +//#define PWM_MAX_FREQ (F_CPU/256) // max frequency with 8-bits duty cycle precision +//#define PWM_MIN_FREQ (F_CPU/64/65536) // min frequency with supported prescaling // channel specific defines /* CLKSEL is used to configure default PWM clock operating ranges @@ -95,8 +95,8 @@ void pwm_init() {} stat_t pwm_set_freq(uint8_t chan, float freq) { if (chan > PWMS) { return (STAT_NO_SUCH_DEVICE);} - if (freq < PWM_MIN_FREQ) { return (STAT_INPUT_LESS_THAN_MIN_VALUE);} - if (freq > PWM_MAX_FREQ) { return (STAT_INPUT_EXCEEDS_MAX_VALUE);} + //if (freq < PWM_MIN_FREQ) { return (STAT_INPUT_LESS_THAN_MIN_VALUE);} + //if (freq > PWM_MAX_FREQ) { return (STAT_INPUT_EXCEEDS_MAX_VALUE);} if (chan == PWM_1) { spindle_pwm_pin.setFrequency(freq); diff --git a/g2core/stepper.cpp b/g2core/stepper.cpp index e3017a6c..142153e4 100644 --- a/g2core/stepper.cpp +++ b/g2core/stepper.cpp @@ -51,7 +51,7 @@ static stRunSingleton_t st_run; static void _load_move(void); // handy macro -#define _f_to_period(f) (uint16_t)((float)F_CPU / (float)f) +//#define _f_to_period(f) (uint16_t)((float)F_CPU / (float)f) /**** Setup motate ****/ @@ -655,7 +655,7 @@ stat_t st_prep_line(float travel_steps[], float following_error[], float segment // - dda_ticks is the integer number of DDA clock ticks needed to play out the segment // - ticks_X_substeps is the maximum depth of the DDA accumulator (as a negative number) - st_pre.dda_period = _f_to_period(FREQUENCY_DDA); // FYI: this is a constant + //st_pre.dda_period = _f_to_period(FREQUENCY_DDA); // FYI: this is a constant st_pre.dda_ticks = (int32_t)(segment_time * 60 * FREQUENCY_DDA);// NB: converts minutes to seconds st_pre.dda_ticks_X_substeps = st_pre.dda_ticks * DDA_SUBSTEPS; @@ -750,7 +750,7 @@ void st_prep_command(void *bf) void st_prep_dwell(float microseconds) { st_pre.block_type = BLOCK_TYPE_DWELL; - st_pre.dda_period = _f_to_period(FREQUENCY_DWELL); + //st_pre.dda_period = _f_to_period(FREQUENCY_DWELL); st_pre.dda_ticks = (uint32_t)((microseconds/1000000) * FREQUENCY_DWELL); st_pre.buffer_state = PREP_BUFFER_OWNED_BY_LOADER; // signal that prep buffer is ready } diff --git a/g2core/stepper.h b/g2core/stepper.h index 0a973ad7..6c1967dd 100644 --- a/g2core/stepper.h +++ b/g2core/stepper.h @@ -413,7 +413,7 @@ typedef struct stPrepSingleton { struct mpBuffer *bf; // static pointer to relevant buffer blockType block_type; // move type (requires planner.h) - uint16_t dda_period; // DDA or dwell clock period setting + //uint16_t dda_period; // DDA or dwell clock period setting (No longer used) uint32_t dda_ticks; // DDA or dwell ticks for the move uint32_t dda_ticks_X_substeps; // DDA ticks scaled by substep factor stPrepMotor_t mot[MOTORS]; // prep time motor structs From ff92bdd01fb182a436079c237c717ad65e372d7a Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Fri, 28 Oct 2016 22:15:42 -0500 Subject: [PATCH 09/10] Fix capitalization errors in g2v9 configs. --- g2core/board/G2v9.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g2core/board/G2v9.mk b/g2core/board/G2v9.mk index 79084ecd..a99f333c 100755 --- a/g2core/board/G2v9.mk +++ b/g2core/board/G2v9.mk @@ -6,7 +6,7 @@ # make BOARD=g2v9k # You can also choose a CONFIG from boards.mk: -# make CONFIG=ShapeokoDualY BOARD=G2v9k +# make CONFIG=ShapeokoDualY BOARD=g2v9k From 41c82c0405ed06a0fe4fae21e8f6b0c88b33551f Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Fri, 28 Oct 2016 22:44:35 -0500 Subject: [PATCH 10/10] Fixed some changes for the gquintic branch that accidentally leaked into the Archim fixes. --- g2core/board/Archim/board_xio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g2core/board/Archim/board_xio.cpp b/g2core/board/Archim/board_xio.cpp index ff0846e1..11599fb7 100755 --- a/g2core/board/Archim/board_xio.cpp +++ b/g2core/board/Archim/board_xio.cpp @@ -51,8 +51,8 @@ decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial; // 115200 is the default, as well. //UART Serial {115200, UARTMode::RTSCTSFlowControl}; -MOTATE_SET_USB_VENDOR_STRING( u"Synthetos (http://synthetos.com)" ) -MOTATE_SET_USB_PRODUCT_STRING( u"g2core gQuadratic" ) +MOTATE_SET_USB_VENDOR_STRING({'S', 'y', 'n', 't', 'h', 'e', 't', 'o', 's'}) +MOTATE_SET_USB_PRODUCT_STRING({'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'}) MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID() #endif // XIO_HAS_USB