axis steps per unit excluded from M500, version changed

This commit is contained in:
PavelSindler 2017-07-10 17:30:47 +02:00
parent 2e57e48227
commit f89ba2c46a
3 changed files with 27 additions and 5 deletions

View File

@ -5,7 +5,7 @@
#include "Configuration_prusa.h"
// Firmware version
#define FW_version "3.0.12-RC2"
#define FW_version "3.0.12"
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
#define FW_PRUSA3D_MAGIC_LEN 10

View File

@ -43,7 +43,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
// wrong data being written to the variables.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
#define EEPROM_VERSION "V1"
#define EEPROM_VERSION "V2"
#ifdef EEPROM_SETTINGS
void Config_StoreSettings()
@ -51,7 +51,7 @@ void Config_StoreSettings()
char ver[4]= "000";
int i=EEPROM_OFFSET;
EEPROM_WRITE_VAR(i,ver); // invalidate data first
EEPROM_WRITE_VAR(i,axis_steps_per_unit);
//EEPROM_WRITE_VAR(i,axis_steps_per_unit);
EEPROM_WRITE_VAR(i,max_feedrate);
EEPROM_WRITE_VAR(i,max_acceleration_units_per_sq_second);
EEPROM_WRITE_VAR(i,acceleration);
@ -274,7 +274,7 @@ void Config_RetrieveSettings()
if (strncmp(ver,stored_ver,3) == 0)
{
// version number match
EEPROM_READ_VAR(i,axis_steps_per_unit);
//EEPROM_READ_VAR(i,axis_steps_per_unit);
EEPROM_READ_VAR(i,max_feedrate);
EEPROM_READ_VAR(i,max_acceleration_units_per_sq_second);

View File

@ -2083,12 +2083,21 @@ BedSkewOffsetDetectionResultType improve_bed_offset_and_skew(int8_t method, int8
for (uint8_t mesh_point = 0; mesh_point < 3; ++ mesh_point)
if (pts[mesh_point * 2 + 1] < Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH)
too_far_mask |= 1 << mesh_point;
result = calculate_machine_skew_and_offset_LS(pts, 9, bed_ref_points, vec_x, vec_y, cntr, verbosity_level);
if (verbosity_level >= 20) {
SERIAL_ECHOPGM("Distance from min before calculate_machine skew and offset LS:");
MYSERIAL.print(int(too_far_mask));
}
result = calculate_machine_skew_and_offset_LS(pts, 9, bed_ref_points, vec_x, vec_y, cntr, verbosity_level);
if (result < 0) {
SERIAL_ECHOLNPGM("Calculation of the machine skew and offset failed.");
goto canceled;
}
// In case of success, update the too_far_mask from the calculated points.
too_far_mask = 0;
if(verbosity_level >= 20) SERIAL_ECHOPGM("Reseting too far mask.");
for (uint8_t mesh_point = 0; mesh_point < 3; ++ mesh_point) {
float y = vec_x[1] * pgm_read_float(bed_ref_points+mesh_point*2) + vec_y[1] * pgm_read_float(bed_ref_points+mesh_point*2+1) + cntr[1];
distance_from_min[mesh_point] = (y - Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH);
@ -2447,6 +2456,19 @@ void count_xyz_details() {
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y + 0)),
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y + 4))
};
SERIAL_ECHOPGM("cntr[0]:");
MYSERIAL.println(cntr[0]);
SERIAL_ECHOPGM("cntr[1]:");
MYSERIAL.println(cntr[1]);
SERIAL_ECHOPGM("vec_x[0]:");
MYSERIAL.println(vec_x[0]);
SERIAL_ECHOPGM("vec_x[1]:");
MYSERIAL.println(vec_x[1]);
SERIAL_ECHOPGM("vec_y[0]:");
MYSERIAL.println(vec_y[0]);
SERIAL_ECHOPGM("vec_y[1]:");
MYSERIAL.println(vec_y[1]);
a2 = -1 * asin(vec_y[0] / MACHINE_AXIS_SCALE_Y);
/* SERIAL_ECHOLNPGM("par:");
MYSERIAL.println(vec_y[0]);