|
@@ -5,6 +5,9 @@
|
|
|
#include <stdio.h>
|
|
|
#include <avr/pgmspace.h>
|
|
|
|
|
|
+#define SHOW_TEMP_ADC_VALUES
|
|
|
+#include "temperature.h"
|
|
|
+
|
|
|
|
|
|
#define DBG(args...) printf_P(args)
|
|
|
|
|
@@ -150,7 +153,7 @@ void dcode_3()
|
|
|
#include <avr/wdt.h>
|
|
|
#include "bootapp.h"
|
|
|
|
|
|
-
|
|
|
+#if 0
|
|
|
#define FLASHSIZE 0x40000
|
|
|
|
|
|
#define RAMSIZE 0x2000
|
|
@@ -169,9 +172,10 @@ extern float current_temperature_pinda;
|
|
|
extern float axis_steps_per_unit[NUM_AXIS];
|
|
|
|
|
|
|
|
|
-
|
|
|
+#define LOG(args...) printf(args)
|
|
|
+#endif
|
|
|
#define LOG(args...)
|
|
|
-*/
|
|
|
+
|
|
|
#ifdef DEBUG_DCODES
|
|
|
|
|
|
void dcode__1()
|
|
@@ -227,7 +231,7 @@ void dcode_2()
|
|
|
count = parse_hex(strchr_pointer + 1, data, 16);
|
|
|
if (count > 0)
|
|
|
{
|
|
|
- for (int i = 0; i < count; i++)
|
|
|
+ for (uint16_t i = 0; i < count; i++)
|
|
|
*((uint8_t*)(address + i)) = data[i];
|
|
|
LOG("%d bytes written to RAM at address %04x", count, address);
|
|
|
}
|
|
@@ -380,7 +384,7 @@ void dcode_8()
|
|
|
{
|
|
|
uint16_t offs = 0;
|
|
|
if (i > 0) offs = eeprom_read_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + (i - 1));
|
|
|
- float foffs = ((float)offs) / axis_steps_per_unit[Z_AXIS];
|
|
|
+ float foffs = ((float)offs) / cs.axis_steps_per_unit[Z_AXIS];
|
|
|
offs = 1000 * foffs;
|
|
|
printf_P(PSTR("temp_pinda=%dC temp_shift=%dum\n"), 35 + i * 5, offs);
|
|
|
}
|
|
@@ -423,10 +427,6 @@ const char* dcode_9_ADC_name(uint8_t i)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-extern int current_temperature_raw[EXTRUDERS];
|
|
|
-extern int current_temperature_bed_raw;
|
|
|
-extern int current_temperature_raw_pinda;
|
|
|
-
|
|
|
#ifdef AMBIENT_THERMISTOR
|
|
|
extern int current_temperature_raw_ambient;
|
|
|
#endif
|
|
@@ -606,16 +606,16 @@ void dcode_2130()
|
|
|
else if (strncmp(strchr_pointer + 7, "mres", 4) == 0)
|
|
|
{
|
|
|
uint8_t mres = strchr_pointer[11] - '0';
|
|
|
- if ((mres >= 0) && (mres <= 8))
|
|
|
+ if (mres <= 8)
|
|
|
{
|
|
|
st_synchronize();
|
|
|
uint16_t res = tmc2130_get_res(axis);
|
|
|
uint16_t res_new = tmc2130_mres2usteps(mres);
|
|
|
tmc2130_set_res(axis, res_new);
|
|
|
if (res_new > res)
|
|
|
- axis_steps_per_unit[axis] *= (res_new / res);
|
|
|
+ cs.axis_steps_per_unit[axis] *= (res_new / res);
|
|
|
else
|
|
|
- axis_steps_per_unit[axis] /= (res / res_new);
|
|
|
+ cs.axis_steps_per_unit[axis] /= (res / res_new);
|
|
|
}
|
|
|
}
|
|
|
else if (strncmp(strchr_pointer + 7, "wave", 4) == 0)
|