SORTING_DUMP

This commit is contained in:
Alex Voinea 2019-11-26 12:18:11 +02:00
parent b803b2a2dd
commit f87b5a2be7
No known key found for this signature in database
GPG Key ID: F5034E7CFCF2F973
1 changed files with 10 additions and 7 deletions

View File

@ -863,12 +863,13 @@ void CardReader::presort() {
{ {
sort_order[j] = sort_order[j - gap]; sort_order[j] = sort_order[j - gap];
j -= gap; j -= gap;
#ifdef SORTING_DUMP
for (uint16_t z = 0; z < fileCnt; z++) for (uint16_t z = 0; z < fileCnt; z++)
{ {
printf_P(PSTR("%2u "), sort_order[z]); printf_P(PSTR("%2u "), sort_order[z]);
} }
printf_P(PSTR("i%2d j%2d gap%2d orderBckp%2d"), i, j, gap, orderBckp); printf_P(PSTR("i%2d j%2d gap%2d orderBckp%2d\n"), i, j, gap, orderBckp);
MYSERIAL.println(); #endif
if (j < gap) break; if (j < gap) break;
getfilename_simple(positions[sort_order[j - gap]]); getfilename_simple(positions[sort_order[j - gap]]);
name2 = LONGEST_FILENAME; // use the string in-place name2 = LONGEST_FILENAME; // use the string in-place
@ -932,11 +933,13 @@ void CardReader::presort() {
//MYSERIAL.println(int(i)); //MYSERIAL.println(int(i));
for (uint16_t j = 0; j < i; ++j) { for (uint16_t j = 0; j < i; ++j) {
if (!IS_SD_INSERTED) return; if (!IS_SD_INSERTED) return;
for (uint16_t z = 0; z < fileCnt; z++) #ifdef SORTING_DUMP
{ for (uint16_t z = 0; z < fileCnt; z++)
printf_P(PSTR("%2u "), sort_order[z]); {
} printf_P(PSTR("%2u "), sort_order[z]);
MYSERIAL.println(); }
MYSERIAL.println();
#endif
manage_heater(); manage_heater();
const uint16_t o1 = sort_order[j], o2 = sort_order[j + 1]; const uint16_t o1 = sort_order[j], o2 = sort_order[j + 1];