mirror of
https://github.com/synthetos/g2.git
synced 2026-02-06 19:22:44 +08:00
merged g2/edge 100.26
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#ifndef G2CORE_INFO_H_ONCE
|
||||
#define G2CORE_INFO_H_ONCE
|
||||
|
||||
#define G2CORE_FIRMWARE_BUILD 100.23 // Merged dev-227-marlin-compat - see #227 and #244
|
||||
#define G2CORE_FIRMWARE_BUILD 100.26 // Merged fixes for #267 and PR #258
|
||||
#define G2CORE_FIRMWARE_VERSION 0.99
|
||||
|
||||
#ifdef GIT_VERSION
|
||||
|
||||
@@ -1002,14 +1002,14 @@ stat_t _execute_gcode_block(char *active_comment)
|
||||
//--> set retract mode goes here
|
||||
|
||||
switch (gv.next_action) {
|
||||
case NEXT_ACTION_SET_G28_POSITION: { status = cm_set_g28_position(); break;} // G28.1
|
||||
case NEXT_ACTION_GOTO_G28_POSITION: { status = cm_goto_g28_position(gv.target, gf.target); break;} // G28
|
||||
case NEXT_ACTION_SET_G30_POSITION: { status = cm_set_g30_position(); break;} // G30.1
|
||||
case NEXT_ACTION_GOTO_G30_POSITION: { status = cm_goto_g30_position(gv.target, gf.target); break;} // G30
|
||||
case NEXT_ACTION_SET_G28_POSITION: { status = cm_set_g28_position(); break;} // G28.1
|
||||
case NEXT_ACTION_GOTO_G28_POSITION: { status = cm_goto_g28_position(gv.target, gf.target); break;} // G28
|
||||
case NEXT_ACTION_SET_G30_POSITION: { status = cm_set_g30_position(); break;} // G30.1
|
||||
case NEXT_ACTION_GOTO_G30_POSITION: { status = cm_goto_g30_position(gv.target, gf.target); break;} // G30
|
||||
|
||||
case NEXT_ACTION_SEARCH_HOME: { status = cm_homing_cycle_start(gv.target, gf.target); break;} // G28.2
|
||||
case NEXT_ACTION_SET_ABSOLUTE_ORIGIN: { status = cm_set_absolute_origin(gv.target, gf.target); break;} // G28.3
|
||||
case NEXT_ACTION_HOMING_NO_SET: { status = cm_homing_cycle_start_no_set(gv.target, gf.target); break;} // G28.4
|
||||
case NEXT_ACTION_SEARCH_HOME: { status = cm_homing_cycle_start(gv.target, gf.target); break;} // G28.2
|
||||
case NEXT_ACTION_SET_ABSOLUTE_ORIGIN: { status = cm_set_absolute_origin(gv.target, gf.target); break;} // G28.3
|
||||
case NEXT_ACTION_HOMING_NO_SET: { status = cm_homing_cycle_start_no_set(gv.target, gf.target); break;}// G28.4
|
||||
|
||||
case NEXT_ACTION_STRAIGHT_PROBE_ERR: { status = cm_straight_probe(gv.target, gf.target, true, true); break;} // G38.2
|
||||
case NEXT_ACTION_STRAIGHT_PROBE: { status = cm_straight_probe(gv.target, gf.target, true, false); break;} // G38.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -91,7 +91,7 @@
|
||||
#define M1_MICROSTEPS 8 // 1mi 1,2,4,8,16,32
|
||||
#define M1_POLARITY 1 // 1po 0=normal, 1=reversed
|
||||
#define M1_POWER_MODE MOTOR_POWER_MODE // 1pm standard
|
||||
#define M1_POWER_LEVEL 0.375 // 1mp
|
||||
#define M1_POWER_LEVEL 0.375 // 1pl: 0.0=no power, 1.0=max power
|
||||
|
||||
#define M2_MOTOR_MAP AXIS_Y
|
||||
#define M2_STEP_ANGLE 1.8
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
#define M2_MICROSTEPS 8
|
||||
#endif
|
||||
#ifndef M2_STEPS_PER_UNIT
|
||||
#define M2_STEPS_PER_UNIT 0
|
||||
#define M2_STEPS_PER_UNIT 0
|
||||
#endif
|
||||
#ifndef M2_POLARITY
|
||||
#define M2_POLARITY 0
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
// 1=MOTOR_ALWAYS_POWERED,
|
||||
// 2=MOTOR_POWERED_IN_CYCLE,
|
||||
// 3=MOTOR_POWERED_ONLY_WHEN_MOVING
|
||||
#define M1_POWER_LEVEL 0.4 // 0.0 = off, 1.0 = max
|
||||
#define M1_POWER_LEVEL 0.4 // 1pl: 0.0=no power, 1.0=max power
|
||||
#define MOTOR_POWER_TIMEOUT 10.00 // motor power timeout in seconds
|
||||
|
||||
#define M1_MOTOR_MAP AXIS_X // 1ma
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
// Communications and reporting settings
|
||||
|
||||
#define USB_SERIAL_PORTS_EXPOSED 2 // 1=single endpoint usb, 2=dual endpoint usb
|
||||
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
|
||||
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
|
||||
|
||||
@@ -101,21 +102,13 @@
|
||||
#define M2_POWER_MODE MOTOR_POWER_MODE
|
||||
#define M2_POWER_LEVEL 0.500
|
||||
|
||||
#define M3_MOTOR_MAP AXIS_Y
|
||||
#define M3_MOTOR_MAP AXIS_Z
|
||||
#define M3_STEP_ANGLE 1.8
|
||||
#define M3_TRAVEL_PER_REV 40.00
|
||||
#define M3_TRAVEL_PER_REV 1.25
|
||||
#define M3_MICROSTEPS 8
|
||||
#define M3_POLARITY 1
|
||||
#define M3_POLARITY 0
|
||||
#define M3_POWER_MODE MOTOR_POWER_MODE
|
||||
#define M3_POWER_LEVEL 0.500
|
||||
|
||||
#define M4_MOTOR_MAP AXIS_Z
|
||||
#define M4_STEP_ANGLE 1.8
|
||||
#define M4_TRAVEL_PER_REV 1.25
|
||||
#define M4_MICROSTEPS 8
|
||||
#define M4_POLARITY 0
|
||||
#define M4_POWER_MODE MOTOR_POWER_MODE
|
||||
#define M4_POWER_LEVEL 0.750
|
||||
#define M3_POWER_LEVEL 0.750
|
||||
|
||||
// *** axis settings **********************************************************************************
|
||||
|
||||
|
||||
233
g2core/settings/settings_shapeoko2dualY.h
Normal file
233
g2core/settings/settings_shapeoko2dualY.h
Normal file
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
* settings_shapeoko2dualY.h - Shapeoko2 500mm table
|
||||
* This file is part of the g2core project
|
||||
*
|
||||
* Copyright (c) 2010 - 2016 Alden S. Hart, Jr.
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation. You should have received a copy of the GNU General Public
|
||||
* License, version 2 along with the software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* As a special exception, you may use this file as part of a software library without
|
||||
* restriction. Specifically, if other files instantiate templates or use macros or
|
||||
* inline functions from this file, or you compile this file and link it with other
|
||||
* files to produce an executable, this file does not by itself cause the resulting
|
||||
* executable to be covered by the GNU General Public License. This exception does not
|
||||
* however invalidate any other reasons why the executable file might be covered by the
|
||||
* GNU General Public License.
|
||||
*
|
||||
* THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY
|
||||
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
* SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/***********************************************************************/
|
||||
/**** Shapeoko2 500mm profile ******************************************/
|
||||
/***********************************************************************/
|
||||
|
||||
// ***> NOTE: The init message must be a single line with no CRs or LFs
|
||||
#define INIT_MESSAGE "Initializing configs to Shapeoko2 500mm profile"
|
||||
|
||||
//**** GLOBAL / GENERAL SETTINGS ******************************************************
|
||||
|
||||
// Machine configuration settings
|
||||
|
||||
#define JUNCTION_INTEGRATION_TIME 0.75 // cornering - between 0.10 and 2.00 (higher is faster)
|
||||
#define CHORDAL_TOLERANCE 0.01 // chordal tolerance for arcs (in mm)
|
||||
|
||||
#define SOFT_LIMIT_ENABLE 0 // 0=off, 1=on
|
||||
#define HARD_LIMIT_ENABLE 0 // 0=off, 1=on
|
||||
#define SAFETY_INTERLOCK_ENABLE 1 // 0=off, 1=on
|
||||
|
||||
#define SPINDLE_ENABLE_POLARITY 1 // 0=active low, 1=active high
|
||||
#define SPINDLE_DIR_POLARITY 0 // 0=clockwise is low, 1=clockwise is high
|
||||
#define SPINDLE_PAUSE_ON_HOLD true
|
||||
#define SPINDLE_DWELL_TIME 1.0
|
||||
|
||||
#define COOLANT_MIST_POLARITY 1 // 0=active low, 1=active high
|
||||
#define COOLANT_FLOOD_POLARITY 1 // 0=active low, 1=active high
|
||||
#define COOLANT_PAUSE_ON_HOLD false
|
||||
|
||||
// Communications and reporting settings
|
||||
|
||||
#define USB_SERIAL_PORTS_EXPOSED 2 // 1=single endpoint usb, 2=dual endpoint usb
|
||||
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
|
||||
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
|
||||
|
||||
#define TEXT_VERBOSITY TV_VERBOSE // one of: TV_SILENT, TV_VERBOSE
|
||||
#define JSON_VERBOSITY JV_MESSAGES // one of: JV_SILENT, JV_FOOTER, JV_CONFIGS, JV_MESSAGES, JV_LINENUM, JV_VERBOSE
|
||||
#define QUEUE_REPORT_VERBOSITY QR_OFF // one of: QR_OFF, QR_SINGLE, QR_TRIPLE
|
||||
|
||||
#define STATUS_REPORT_VERBOSITY SR_FILTERED // one of: SR_OFF, SR_FILTERED, SR_VERBOSE
|
||||
|
||||
#define STATUS_REPORT_MIN_MS 100 // milliseconds - enforces a viable minimum
|
||||
#define STATUS_REPORT_INTERVAL_MS 250 // milliseconds - set $SV=0 to disable
|
||||
|
||||
//#define STATUS_REPORT_DEFAULTS "line","posx","posy","posz","posa","feed","vel","unit","coor","dist","admo","frmo","momo","stat"
|
||||
#define STATUS_REPORT_DEFAULTS "line","posx","posy","posz","feed","vel","momo","stat"
|
||||
|
||||
// Alternate SRs that report in drawable units
|
||||
//#define STATUS_REPORT_DEFAULTS "line","vel","mpox","mpoy","mpoz","mpoa","coor","ofsa","ofsx","ofsy","ofsz","dist","unit","stat","homz","homy","homx","momo"
|
||||
//#define STATUS_REPORT_DEFAULTS "_ts1","_cs1","_es1","_xs1","_fe1","line","posx","posy","posz","vel","stat"
|
||||
|
||||
// Gcode startup defaults
|
||||
#define GCODE_DEFAULT_UNITS MILLIMETERS // MILLIMETERS or INCHES
|
||||
#define GCODE_DEFAULT_PLANE CANON_PLANE_XY // CANON_PLANE_XY, CANON_PLANE_XZ, or CANON_PLANE_YZ
|
||||
#define GCODE_DEFAULT_COORD_SYSTEM G54 // G54, G55, G56, G57, G58 or G59
|
||||
#define GCODE_DEFAULT_PATH_CONTROL PATH_CONTINUOUS
|
||||
#define GCODE_DEFAULT_DISTANCE_MODE ABSOLUTE_DISTANCE_MODE
|
||||
|
||||
// *** motor settings ************************************************************************************
|
||||
|
||||
#define MOTOR_POWER_MODE MOTOR_POWERED_IN_CYCLE // default motor power mode (see cmMotorPowerMode in stepper.h)
|
||||
#define MOTOR_POWER_TIMEOUT 2.00 // motor power timeout in seconds
|
||||
|
||||
#define M1_MOTOR_MAP AXIS_X // 1ma
|
||||
#define M1_STEP_ANGLE 1.8 // 1sa
|
||||
#define M1_TRAVEL_PER_REV 40.00 // 1tr
|
||||
#define M1_MICROSTEPS 8 // 1mi 1,2,4,8,16,32
|
||||
#define M1_POLARITY 0 // 1po 0=normal, 1=reversed
|
||||
#define M1_POWER_MODE MOTOR_POWER_MODE // 1pm TRUE=low power idle enabled
|
||||
#define M1_POWER_LEVEL 0.500
|
||||
|
||||
#define M2_MOTOR_MAP AXIS_Y
|
||||
#define M2_STEP_ANGLE 1.8
|
||||
#define M2_TRAVEL_PER_REV 40.00
|
||||
#define M2_MICROSTEPS 8
|
||||
#define M2_POLARITY 0
|
||||
#define M2_POWER_MODE MOTOR_POWER_MODE
|
||||
#define M2_POWER_LEVEL 0.500
|
||||
|
||||
#define M3_MOTOR_MAP AXIS_Y
|
||||
#define M3_STEP_ANGLE 1.8
|
||||
#define M3_TRAVEL_PER_REV 40.00
|
||||
#define M3_MICROSTEPS 8
|
||||
#define M3_POLARITY 1
|
||||
#define M3_POWER_MODE MOTOR_POWER_MODE
|
||||
#define M3_POWER_LEVEL 0.500
|
||||
|
||||
#define M4_MOTOR_MAP AXIS_Z
|
||||
#define M4_STEP_ANGLE 1.8
|
||||
#define M4_TRAVEL_PER_REV 1.25
|
||||
#define M4_MICROSTEPS 8
|
||||
#define M4_POLARITY 0
|
||||
#define M4_POWER_MODE MOTOR_POWER_MODE
|
||||
#define M4_POWER_LEVEL 0.750
|
||||
|
||||
// *** axis settings **********************************************************************************
|
||||
|
||||
#define JERK_MAX 5000
|
||||
|
||||
#define X_AXIS_MODE AXIS_STANDARD // xam see canonical_machine.h cmAxisMode for valid values
|
||||
#define X_VELOCITY_MAX 50000 // xvm G0 max velocity in mm/min
|
||||
#define X_FEEDRATE_MAX X_VELOCITY_MAX // xfr G1 max feed rate in mm/min
|
||||
#define X_TRAVEL_MIN 0 // xtn minimum travel for soft limits
|
||||
#define X_TRAVEL_MAX 420 // xtm travel between switches or crashes
|
||||
#define X_JERK_MAX JERK_MAX // xjm jerk * 1,000,000
|
||||
#define X_JERK_HIGH_SPEED 20000 // xjh
|
||||
#define X_HOMING_INPUT 1 // xhi input used for homing or 0 to disable
|
||||
#define X_HOMING_DIRECTION 0 // xhd 0=search moves negative, 1= search moves positive
|
||||
#define X_SEARCH_VELOCITY 3000 // xsv minus means move to minimum switch
|
||||
#define X_LATCH_VELOCITY 100 // xlv mm/min
|
||||
#define X_LATCH_BACKOFF 4 // xlb mm
|
||||
#define X_ZERO_BACKOFF 2 // xzb mm
|
||||
|
||||
#define Y_AXIS_MODE AXIS_STANDARD
|
||||
#define Y_VELOCITY_MAX 50000
|
||||
#define Y_FEEDRATE_MAX Y_VELOCITY_MAX
|
||||
#define Y_TRAVEL_MIN 0
|
||||
#define Y_TRAVEL_MAX 420
|
||||
#define Y_JERK_MAX JERK_MAX
|
||||
#define Y_JERK_HIGH_SPEED 20000
|
||||
#define Y_HOMING_INPUT 3
|
||||
#define Y_HOMING_DIRECTION 0
|
||||
#define Y_SEARCH_VELOCITY 3000
|
||||
#define Y_LATCH_VELOCITY 100
|
||||
#define Y_LATCH_BACKOFF 4
|
||||
#define Y_ZERO_BACKOFF 2
|
||||
|
||||
#define Z_AXIS_MODE AXIS_STANDARD
|
||||
#define Z_VELOCITY_MAX 1200
|
||||
#define Z_FEEDRATE_MAX Z_VELOCITY_MAX
|
||||
#define Z_TRAVEL_MAX 0
|
||||
#define Z_TRAVEL_MIN -95
|
||||
#define Z_JERK_MAX 500
|
||||
#define Z_JERK_HIGH_SPEED 1000
|
||||
#define Z_HOMING_INPUT 6
|
||||
#define Z_HOMING_DIRECTION 1
|
||||
#define Z_SEARCH_VELOCITY (Z_VELOCITY_MAX * 0.66666)
|
||||
#define Z_LATCH_VELOCITY 25
|
||||
#define Z_LATCH_BACKOFF 4
|
||||
#define Z_ZERO_BACKOFF 2
|
||||
|
||||
//*** Input / output settings ***
|
||||
/*
|
||||
IO_MODE_DISABLED
|
||||
IO_ACTIVE_LOW aka NORMALLY_OPEN
|
||||
IO_ACTIVE_HIGH aka NORMALLY_CLOSED
|
||||
|
||||
INPUT_ACTION_NONE
|
||||
INPUT_ACTION_STOP
|
||||
INPUT_ACTION_FAST_STOP
|
||||
INPUT_ACTION_HALT
|
||||
INPUT_ACTION_RESET
|
||||
|
||||
INPUT_FUNCTION_NONE
|
||||
INPUT_FUNCTION_LIMIT
|
||||
INPUT_FUNCTION_INTERLOCK
|
||||
INPUT_FUNCTION_SHUTDOWN
|
||||
INPUT_FUNCTION_PANIC
|
||||
*/
|
||||
// Xmin on v9 board
|
||||
#define DI1_MODE NORMALLY_CLOSED
|
||||
//#define DI1_ACTION INPUT_ACTION_STOP
|
||||
#define DI1_ACTION INPUT_ACTION_NONE
|
||||
#define DI1_FUNCTION INPUT_FUNCTION_LIMIT
|
||||
|
||||
// Xmax
|
||||
#define DI2_MODE NORMALLY_CLOSED
|
||||
//#define DI2_ACTION INPUT_ACTION_STOP
|
||||
#define DI2_ACTION INPUT_ACTION_NONE
|
||||
#define DI2_FUNCTION INPUT_FUNCTION_LIMIT
|
||||
|
||||
// Ymin
|
||||
#define DI3_MODE NORMALLY_CLOSED
|
||||
//#define DI3_ACTION INPUT_ACTION_STOP
|
||||
#define DI3_ACTION INPUT_ACTION_NONE
|
||||
#define DI3_FUNCTION INPUT_FUNCTION_LIMIT
|
||||
|
||||
// Ymax
|
||||
#define DI4_MODE NORMALLY_CLOSED
|
||||
//#define DI4_ACTION INPUT_ACTION_STOP
|
||||
#define DI4_ACTION INPUT_ACTION_NONE
|
||||
#define DI4_FUNCTION INPUT_FUNCTION_LIMIT
|
||||
|
||||
// Zmin
|
||||
#define DI5_MODE IO_ACTIVE_HIGH // Z probe
|
||||
#define DI5_ACTION INPUT_ACTION_NONE
|
||||
#define DI5_FUNCTION INPUT_FUNCTION_NONE
|
||||
|
||||
// Zmax
|
||||
#define DI6_MODE NORMALLY_CLOSED
|
||||
//#define DI6_ACTION INPUT_ACTION_STOP
|
||||
#define DI6_ACTION INPUT_ACTION_NONE
|
||||
#define DI6_FUNCTION INPUT_FUNCTION_LIMIT
|
||||
|
||||
// Amin
|
||||
#define DI7_MODE IO_MODE_DISABLED
|
||||
#define DI7_ACTION INPUT_ACTION_NONE
|
||||
#define DI7_FUNCTION INPUT_FUNCTION_NONE
|
||||
|
||||
// Amax
|
||||
#define DI8_MODE IO_MODE_DISABLED
|
||||
#define DI8_ACTION INPUT_ACTION_NONE
|
||||
#define DI8_FUNCTION INPUT_FUNCTION_NONE
|
||||
|
||||
// Hardware interlock input
|
||||
#define DI9_MODE IO_MODE_DISABLED
|
||||
#define DI9_ACTION INPUT_ACTION_NONE
|
||||
#define DI9_FUNCTION INPUT_FUNCTION_NONE
|
||||
@@ -96,7 +96,7 @@
|
||||
#define M1_MICROSTEPS 32 // 1mi 1,2,4,8
|
||||
#define M1_POLARITY 1 // 1po 0=normal, 1=reversed
|
||||
#define M1_POWER_MODE MOTOR_POWER_MODE // 1pm standard
|
||||
#define M1_POWER_LEVEL 0.4
|
||||
#define M1_POWER_LEVEL 0.4 // 1pl: 0.0=no power, 1.0=max power
|
||||
|
||||
#define M2_MOTOR_MAP AXIS_X
|
||||
#define M2_STEP_ANGLE 1.8
|
||||
@@ -116,7 +116,7 @@
|
||||
#define M3_MICROSTEPS 32 // the max step resolution for a hobby servo is 1/32
|
||||
#define M3_POLARITY 1
|
||||
#define M3_POWER_MODE MOTOR_ALWAYS_POWERED
|
||||
#define M3_POWER_LEVEL 0.50 // this is ignored
|
||||
#define M3_POWER_LEVEL 0.50
|
||||
|
||||
#define M4_MOTOR_MAP AXIS_A
|
||||
#define M4_STEP_ANGLE 1.8
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#define M1_MICROSTEPS 8 // 1mi 1,2,4,8
|
||||
#define M1_POLARITY 1 // REVERSE// 1po 0=normal, 1=reverse
|
||||
#define M1_POWER_MODE MOTOR_POWERED_IN_CYCLE // 1pm standard
|
||||
#define M1_POWER_LEVEL 0.5 // 1mp
|
||||
#define M1_POWER_LEVEL 0.5 // 1pl: 0.0=no power, 1.0=max power
|
||||
|
||||
#define M2_MOTOR_MAP AXIS_Y
|
||||
#define M2_STEP_ANGLE 1.8
|
||||
|
||||
@@ -84,8 +84,11 @@
|
||||
#ifndef TEMP_MIN_RISE_DEGREES_OVER_TIME
|
||||
#define TEMP_MIN_RISE_DEGREES_OVER_TIME (float)10.0
|
||||
#endif
|
||||
#ifndef TEMP_MIN_BED_RISE_DEGREES_OVER_TIME
|
||||
#define TEMP_MIN_BED_RISE_DEGREES_OVER_TIME (float)3.0
|
||||
#endif
|
||||
#ifndef TEMP_MIN_RISE_TIME
|
||||
#define TEMP_MIN_RISE_TIME (float)(60.0 * 1000.0) // 20 seconds
|
||||
#define TEMP_MIN_RISE_TIME (float)(60.0 * 1000.0) // one minute
|
||||
#endif
|
||||
#ifndef TEMP_MIN_RISE_DEGREES_FROM_TARGET
|
||||
#define TEMP_MIN_RISE_DEGREES_FROM_TARGET (float)10.0
|
||||
@@ -230,8 +233,8 @@ void ADCPin<kADC2_PinNumber>::interrupt() {
|
||||
|
||||
// Heated bed
|
||||
Thermistor<kADC0_PinNumber> thermistor3 {
|
||||
/*T1:*/ 20.0, /*T2:*/ 190.0, /*T3:*/ 255.0,
|
||||
/*R1:*/ 140000.0, /*R2:*/ 490.0, /*R3:*/ 109.0, /*pullup_resistance:*/ 4700, /*inline_resistance:*/ 4700
|
||||
/*T1:*/ 20.0, /*T2:*/ 42.0, /*T3:*/ 76.0,
|
||||
/*R1:*/ 140000.0, /*R2:*/ 36755.0, /*R3:*/ 10000.0, /*pullup_resistance:*/ 4700, /*inline_resistance:*/ 4700
|
||||
};
|
||||
#if ADC0_AVAILABLE == 1
|
||||
namespace Motate {
|
||||
@@ -331,11 +334,12 @@ struct PID {
|
||||
bool _at_set_point;
|
||||
|
||||
Timeout _rise_time_timeout; // used to keep track of if we are increasing temperature fast enough
|
||||
float _min_rise_over_time; // the amount of degrees that it must rise in the given time
|
||||
float _rise_time_checkpoint; // when we start the timer, we set _rise_time_checkpoint to the minimum goal
|
||||
|
||||
bool _enable; // set true to enable this heater
|
||||
|
||||
PID(float P, float I, float D, float startSetPoint = 0.0) : _p_factor{P/100.0f}, _i_factor{I/100.0f}, _d_factor{D/100.0f}, _set_point{startSetPoint}, _at_set_point{false} {};
|
||||
PID(float P, float I, float D, float min_rise_over_time, float startSetPoint = 0.0) : _p_factor{P/100.0f}, _i_factor{I/100.0f}, _d_factor{D/100.0f}, _set_point{startSetPoint}, _at_set_point{false}, _min_rise_over_time(min_rise_over_time) {};
|
||||
|
||||
float getNewOutput(float input) {
|
||||
// If the input is < 0, the sensor failed
|
||||
@@ -380,7 +384,7 @@ struct PID {
|
||||
|
||||
if (!_rise_time_timeout.isSet() && (_set_point > (input + TEMP_MIN_RISE_DEGREES_FROM_TARGET))) {
|
||||
_rise_time_timeout.set(TEMP_MIN_RISE_TIME);
|
||||
_rise_time_checkpoint = min(input + TEMP_MIN_RISE_DEGREES_OVER_TIME, _set_point + TEMP_SETPOINT_HYSTERESIS);
|
||||
_rise_time_checkpoint = min(input + _min_rise_over_time, _set_point + TEMP_SETPOINT_HYSTERESIS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,9 +441,9 @@ struct PID {
|
||||
// NOTICE, the JSON alters incoming values for these!
|
||||
// {he1p:9} == 9.0/100.0 here
|
||||
|
||||
PID pid1 { 9.0, 0.11, 400.0 }; // default values
|
||||
PID pid2 { 7.5, 0.12, 400.0 }; // default values
|
||||
PID pid3 { 7.5, 0.12, 400.0 }; // default values
|
||||
PID pid1 { 9.0, 0.11, 400.0, TEMP_MIN_RISE_DEGREES_OVER_TIME }; // default values
|
||||
PID pid2 { 7.5, 0.12, 400.0, TEMP_MIN_RISE_DEGREES_OVER_TIME }; // default values
|
||||
PID pid3 { 7.5, 0.12, 400.0, TEMP_MIN_BED_RISE_DEGREES_OVER_TIME }; // default values
|
||||
Timeout pid_timeout;
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ bool checkForNotActive(devflags_t flags_to_check) { return !(flags_to_check & DE
|
||||
bool checkForCtrlAndData(devflags_t flags_to_check) { return (flags_to_check & (DEV_IS_CTRL|DEV_IS_DATA)) == (DEV_IS_CTRL|DEV_IS_DATA); }
|
||||
bool checkForCtrlAndPrimary(devflags_t flags_to_check) { return (flags_to_check & (DEV_IS_CTRL|DEV_IS_PRIMARY)) == (DEV_IS_CTRL|DEV_IS_PRIMARY); }
|
||||
|
||||
|
||||
struct xioDeviceWrapperBase { // C++ base class for device primitives
|
||||
// connection and device management
|
||||
uint8_t caps; // bitfield for capabilities flags (these are persistent)
|
||||
@@ -721,8 +720,8 @@ struct LineRXBuffer : RXBuffer<_size, owner_type, char> {
|
||||
|
||||
_last_line_length = 0;
|
||||
}
|
||||
else if (!_at_start_of_line) { // We only mark ends_line for the first end-line char, and if
|
||||
ends_line = true; // _at_start_of_line is already true, this is not the first.
|
||||
else if (!_at_start_of_line) { // We only mark ends_line for the first end-line char, and if
|
||||
ends_line = true; // _at_start_of_line is already true, this is not the first.
|
||||
}
|
||||
}
|
||||
// prevent going further if we are ignoring
|
||||
@@ -732,12 +731,12 @@ struct LineRXBuffer : RXBuffer<_size, owner_type, char> {
|
||||
}
|
||||
// Classify the line if it's a single character
|
||||
else if (_at_start_of_line &&
|
||||
((c == '!') ||
|
||||
(c == '~') ||
|
||||
(c == ENQ) || // request ENQ/ack
|
||||
(c == CHAR_RESET) || // ^X - reset (aka cancel, terminate)
|
||||
(c == CHAR_ALARM) || // ^D - request job kill (end of transmission)
|
||||
(c == '%' && cm_has_hold()) // flush (only in feedhold or part of control header)
|
||||
((c == '!') || // feedhold
|
||||
(c == '~') || // cycle start
|
||||
(c == ENQ) || // request ENQ/ack
|
||||
(c == CHAR_RESET) || // ^X - reset (aka cancel, terminate)
|
||||
(c == CHAR_ALARM) || // ^D - request job kill (end of transmission)
|
||||
(c == '%' && cm_has_hold()) // flush (only in feedhold or part of control header)
|
||||
))
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user