commit
cfa72c3f10
|
|
@ -2035,7 +2035,11 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
||||||
// SERIAL_ECHO(int(verbosity_level));
|
// SERIAL_ECHO(int(verbosity_level));
|
||||||
// SERIAL_ECHOPGM("");
|
// SERIAL_ECHOPGM("");
|
||||||
|
|
||||||
|
#ifdef NEW_XYZCAL
|
||||||
|
{
|
||||||
|
#else //NEW_XYZCAL
|
||||||
while (iteration < 3) {
|
while (iteration < 3) {
|
||||||
|
#endif //NEW_XYZCAL
|
||||||
|
|
||||||
SERIAL_ECHOPGM("Iteration: ");
|
SERIAL_ECHOPGM("Iteration: ");
|
||||||
MYSERIAL.println(int(iteration + 1));
|
MYSERIAL.println(int(iteration + 1));
|
||||||
|
|
|
||||||
|
|
@ -370,7 +370,7 @@ void xyzcal_adjust_pixels(uint8_t* pixels, uint16_t* histo)
|
||||||
{
|
{
|
||||||
uint8_t l;
|
uint8_t l;
|
||||||
uint16_t max_c = histo[0];
|
uint16_t max_c = histo[0];
|
||||||
uint8_t max_l = 0;
|
uint8_t max_l = 1;
|
||||||
for (l = 1; l < 16; l++)
|
for (l = 1; l < 16; l++)
|
||||||
{
|
{
|
||||||
uint16_t c = histo[l];
|
uint16_t c = histo[l];
|
||||||
|
|
@ -384,7 +384,7 @@ void xyzcal_adjust_pixels(uint8_t* pixels, uint16_t* histo)
|
||||||
for (l = 15; l > 8; l--)
|
for (l = 15; l > 8; l--)
|
||||||
if (histo[l] >= 10)
|
if (histo[l] >= 10)
|
||||||
break;
|
break;
|
||||||
uint8_t pix_min = (max_l + 2) << 4;
|
uint8_t pix_min = (max_l + 1) << 4;
|
||||||
uint8_t pix_max = l << 4;
|
uint8_t pix_max = l << 4;
|
||||||
uint8_t pix_dif = pix_max - pix_min;
|
uint8_t pix_dif = pix_max - pix_min;
|
||||||
DBG(_n(" min=%d max=%d dif=%d\n"), pix_min, pix_max, pix_dif);
|
DBG(_n(" min=%d max=%d dif=%d\n"), pix_min, pix_max, pix_dif);
|
||||||
|
|
@ -425,7 +425,7 @@ void xyzcal_draw_pattern_12x12_in_32x32(uint8_t* pattern, uint32_t* pixels, int
|
||||||
|
|
||||||
int16_t xyzcal_match_pattern_12x12_in_32x32(uint16_t* pattern, uint8_t* pixels, uint8_t c, uint8_t r)
|
int16_t xyzcal_match_pattern_12x12_in_32x32(uint16_t* pattern, uint8_t* pixels, uint8_t c, uint8_t r)
|
||||||
{
|
{
|
||||||
uint8_t thr = 32;
|
uint8_t thr = 16;
|
||||||
int16_t match = 0;
|
int16_t match = 0;
|
||||||
for (uint8_t i = 0; i < 12; i++)
|
for (uint8_t i = 0; i < 12; i++)
|
||||||
for (uint8_t j = 0; j < 12; j++)
|
for (uint8_t j = 0; j < 12; j++)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue