Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support inches, fahrenheit, and kelvin #3985

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ script:
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR SERVO_ENDSTOP_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
- build_marlin
#
# Test EEPROM_SETTINGS & EEPROM_CHITCHAT
# Test EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER, INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
#
- 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
#
# Test DUAL_X_CARRIAGE
Expand Down
10 changes: 10 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

//
// G20/G21 Inch mode support
//
//#define INCH_MODE_SUPPORT

//
// M149 Set temperature units support
//
//#define TEMPERATURE_UNITS_SUPPORT

// @section temperature

// Preheat Constants
Expand Down
19 changes: 1 addition & 18 deletions Marlin/M100_Free_Mem_Chk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@ extern void* __brkval;
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.
//
Expand Down Expand Up @@ -176,8 +160,7 @@ void gcode_M100() {
//
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
if (code_seen('C')) {
int x; // x gets the # of locations to corrupt within the memory pool
x = code_value();
int x = code_value_int(); // x gets the # of locations to corrupt within the memory pool
SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
ptr = (unsigned char*) __brkval;
SERIAL_ECHOPAIR("\n__brkval : ", ptr);
Expand Down
9 changes: 6 additions & 3 deletions Marlin/Marlin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

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 disable_all_steppers();

Expand Down Expand Up @@ -288,9 +291,9 @@ extern bool axis_homed[3]; // axis[n].is_homed

// GCode support for external objects
bool code_seen(char);
float code_value();
long code_value_long();
int16_t code_value_short();
int code_value_int();
float code_value_temp_abs();
float code_value_temp_diff();

#if ENABLED(DELTA)
extern float delta[3];
Expand Down
Loading