Merge pull request #3985 from thinkyhead/rc_inch_fahrenheit_kelvin
Support inches, fahrenheit, and kelvin
This commit is contained in:
commit
26f8f54c56
@ -105,10 +105,10 @@ script:
|
|||||||
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR SERVO_ENDSTOP_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
|
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR SERVO_ENDSTOP_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
|
||||||
- build_marlin
|
- build_marlin
|
||||||
#
|
#
|
||||||
# Test EEPROM_SETTINGS & EEPROM_CHITCHAT
|
# Test EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER, INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
|
||||||
#
|
#
|
||||||
- restore_configs
|
- restore_configs
|
||||||
- opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT
|
- opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
|
||||||
- build_marlin
|
- build_marlin
|
||||||
#
|
#
|
||||||
# Test DUAL_X_CARRIAGE
|
# Test DUAL_X_CARRIAGE
|
||||||
|
@ -749,6 +749,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -47,22 +47,6 @@ extern void* __brkval;
|
|||||||
extern size_t __heap_start, __heap_end, __flp;
|
extern size_t __heap_start, __heap_end, __flp;
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Declare all the functions we need from Marlin_Main.cpp to do the work!
|
|
||||||
//
|
|
||||||
|
|
||||||
float code_value();
|
|
||||||
long code_value_long();
|
|
||||||
bool code_seen(char);
|
|
||||||
void serial_echopair_P(const char*, float);
|
|
||||||
void serial_echopair_P(const char*, double);
|
|
||||||
void serial_echopair_P(const char*, unsigned long);
|
|
||||||
void serial_echopair_P(const char*, int);
|
|
||||||
void serial_echopair_P(const char*, long);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Utility functions used by M100 to get its work done.
|
// Utility functions used by M100 to get its work done.
|
||||||
//
|
//
|
||||||
@ -176,8 +160,7 @@ void gcode_M100() {
|
|||||||
//
|
//
|
||||||
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
|
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
|
||||||
if (code_seen('C')) {
|
if (code_seen('C')) {
|
||||||
int x; // x gets the # of locations to corrupt within the memory pool
|
int x = code_value_int(); // x gets the # of locations to corrupt within the memory pool
|
||||||
x = code_value();
|
|
||||||
SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
|
SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
|
||||||
ptr = (unsigned char*) __brkval;
|
ptr = (unsigned char*) __brkval;
|
||||||
SERIAL_ECHOPAIR("\n__brkval : ", ptr);
|
SERIAL_ECHOPAIR("\n__brkval : ", ptr);
|
||||||
|
@ -217,6 +217,9 @@ enum AxisEnum {NO_AXIS = -1, X_AXIS = 0, A_AXIS = 0, Y_AXIS = 1, B_AXIS = 1, Z_A
|
|||||||
|
|
||||||
#define _AXIS(AXIS) AXIS ##_AXIS
|
#define _AXIS(AXIS) AXIS ##_AXIS
|
||||||
|
|
||||||
|
typedef enum { LINEARUNIT_MM = 0, LINEARUNIT_INCH = 1 } LinearUnit;
|
||||||
|
typedef enum { TEMPUNIT_C = 0, TEMPUNIT_K = 1, TEMPUNIT_F = 2 } TempUnit;
|
||||||
|
|
||||||
void enable_all_steppers();
|
void enable_all_steppers();
|
||||||
void disable_all_steppers();
|
void disable_all_steppers();
|
||||||
|
|
||||||
@ -288,9 +291,9 @@ extern bool axis_homed[3]; // axis[n].is_homed
|
|||||||
|
|
||||||
// GCode support for external objects
|
// GCode support for external objects
|
||||||
bool code_seen(char);
|
bool code_seen(char);
|
||||||
float code_value();
|
int code_value_int();
|
||||||
long code_value_long();
|
float code_value_temp_abs();
|
||||||
int16_t code_value_short();
|
float code_value_temp_diff();
|
||||||
|
|
||||||
#if ENABLED(DELTA)
|
#if ENABLED(DELTA)
|
||||||
extern float delta[3];
|
extern float delta[3];
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -732,6 +732,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -730,6 +730,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -741,6 +741,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -743,6 +743,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -766,6 +766,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -749,6 +749,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -744,6 +744,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -757,6 +757,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -770,6 +770,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -741,6 +741,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -749,6 +749,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -838,6 +838,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -832,6 +832,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -835,6 +835,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -835,6 +835,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -837,6 +837,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -752,6 +752,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -743,6 +743,16 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
|||||||
//
|
//
|
||||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||||
|
|
||||||
|
//
|
||||||
|
// G20/G21 Inch mode support
|
||||||
|
//
|
||||||
|
//#define INCH_MODE_SUPPORT
|
||||||
|
|
||||||
|
//
|
||||||
|
// M149 Set temperature units support
|
||||||
|
//
|
||||||
|
//#define TEMPERATURE_UNITS_SUPPORT
|
||||||
|
|
||||||
// @section temperature
|
// @section temperature
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
|
@ -1155,9 +1155,9 @@ void Planner::reset_acceleration_rates() {
|
|||||||
|
|
||||||
void Planner::autotemp_M109() {
|
void Planner::autotemp_M109() {
|
||||||
autotemp_enabled = code_seen('F');
|
autotemp_enabled = code_seen('F');
|
||||||
if (autotemp_enabled) autotemp_factor = code_value();
|
if (autotemp_enabled) autotemp_factor = code_value_temp_diff();
|
||||||
if (code_seen('S')) autotemp_min = code_value();
|
if (code_seen('S')) autotemp_min = code_value_temp_abs();
|
||||||
if (code_seen('B')) autotemp_max = code_value();
|
if (code_seen('B')) autotemp_max = code_value_temp_abs();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user