$140, $141, $142 current control
This commit is contained in:
@ -731,8 +731,8 @@
|
||||
#define DEFAULT_X_ACCELERATION (5000.0*60*60) // 5000*60*60 mm/min^2 = 5000 mm/sec^2
|
||||
#define DEFAULT_Y_ACCELERATION (5000.0*60*60) // 5000*60*60 mm/min^2 = 5000 mm/sec^2
|
||||
#define DEFAULT_Z_ACCELERATION (5000.0*60*60) // 5000*60*60 mm/min^2 = 5000 mm/sec^2
|
||||
#define DEFAULT_X_CURRENT 0.4 // amps
|
||||
#define DEFAULT_Y_CURRENT 1.5 // amps
|
||||
#define DEFAULT_X_CURRENT 0.0 // amps
|
||||
#define DEFAULT_Y_CURRENT 0.0 // amps
|
||||
#define DEFAULT_Z_CURRENT 0.0 // amps
|
||||
#define DEFAULT_A_CURRENT 0.0 // amps
|
||||
#define DEFAULT_X_MAX_TRAVEL 200.0 // mm
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include "spindle_control.h"
|
||||
#include "stepper.h"
|
||||
#include "jog.h"
|
||||
#include "current_control.h"
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// COMPILE-TIME ERROR CHECKING OF DEFINE VALUES:
|
||||
|
@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include "grbl.h"
|
||||
#include "current_control.h"
|
||||
|
||||
void isr_init();
|
||||
|
||||
|
@ -218,6 +218,7 @@ void report_grbl_settings() {
|
||||
case 1: report_util_float_setting(val+idx,settings.max_rate[idx],N_DECIMAL_SETTINGVALUE); break;
|
||||
case 2: report_util_float_setting(val+idx,settings.acceleration[idx]/(60*60),N_DECIMAL_SETTINGVALUE); break;
|
||||
case 3: report_util_float_setting(val+idx,-settings.max_travel[idx],N_DECIMAL_SETTINGVALUE); break;
|
||||
case 4: report_util_float_setting(val+idx,settings.current[idx],N_DECIMAL_SETTINGVALUE); break;
|
||||
}
|
||||
}
|
||||
val += AXIS_SETTINGS_INCREMENT;
|
||||
|
@ -117,6 +117,9 @@ void settings_restore(uint8_t restore_flag) {
|
||||
settings.max_travel[X_AXIS] = (-DEFAULT_X_MAX_TRAVEL);
|
||||
settings.max_travel[Y_AXIS] = (-DEFAULT_Y_MAX_TRAVEL);
|
||||
settings.max_travel[Z_AXIS] = (-DEFAULT_Z_MAX_TRAVEL);
|
||||
settings.current[X_AXIS] = DEFAULT_X_CURRENT;
|
||||
settings.current[Y_AXIS] = DEFAULT_Y_CURRENT;
|
||||
settings.current[Z_AXIS] = DEFAULT_Z_CURRENT;
|
||||
|
||||
write_global_settings(false);
|
||||
}
|
||||
@ -231,6 +234,10 @@ uint8_t settings_store_global_setting(uint8_t parameter, float value) {
|
||||
break;
|
||||
case 2: settings.acceleration[parameter] = value*60*60; break; // Convert to mm/min^2 for grbl internal use.
|
||||
case 3: settings.max_travel[parameter] = -value; break; // Store as negative for grbl internal use.
|
||||
case 4:
|
||||
settings.current[parameter] = value;
|
||||
set_current(parameter, settings.current[parameter]);
|
||||
break;
|
||||
}
|
||||
break; // Exit while-loop after setting has been configured and proceed to the EEPROM write call.
|
||||
} else {
|
||||
|
@ -70,7 +70,7 @@
|
||||
// #define SETTING_INDEX_G92 N_COORDINATE_SYSTEM+2 // Coordinate offset (G92.2,G92.3 not supported)
|
||||
|
||||
// Define Grbl axis settings numbering scheme. Starts at START_VAL, every INCREMENT, over N_SETTINGS.
|
||||
#define AXIS_N_SETTINGS 4
|
||||
#define AXIS_N_SETTINGS 5
|
||||
#define AXIS_SETTINGS_START_VAL 100 // NOTE: Reserving settings values >= 100 for axis settings. Up to 255.
|
||||
#define AXIS_SETTINGS_INCREMENT 10 // Must be greater than the number of axis settings
|
||||
|
||||
@ -81,6 +81,7 @@ typedef struct {
|
||||
float max_rate[N_AXIS];
|
||||
float acceleration[N_AXIS];
|
||||
float max_travel[N_AXIS];
|
||||
float current[N_AXIS];
|
||||
|
||||
// Remaining Grbl settings
|
||||
uint8_t pulse_microseconds;
|
||||
|
Reference in New Issue
Block a user