From 53a3772f09e537278a5d97ca10873ff27902f325 Mon Sep 17 00:00:00 2001 From: awenelo <56133692+awenelo@users.noreply.github.com> Date: Thu, 4 Mar 2021 10:14:29 -0500 Subject: [PATCH 1/5] Add satin sheet --- Firmware/eeprom.cpp | 16 ++++++++++------ Firmware/eeprom.h | 8 ++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Firmware/eeprom.cpp b/Firmware/eeprom.cpp index 4f519cae..4c910ac2 100644 --- a/Firmware/eeprom.cpp +++ b/Firmware/eeprom.cpp @@ -107,10 +107,10 @@ if (eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION) == 0xff) eeprom_u //! | 1 | Smooth2 | //! | 2 | Textur1 | //! | 3 | Textur2 | -//! | 4 | Custom1 | -//! | 5 | Custom2 | -//! | 6 | Custom3 | -//! | 7 | Custom4 | +//! | 4 | Satin 1 | +//! | 5 | Satin 2 | +//! | 6 | Custom1 | +//! | 7 | Custom2 | //! //! @param[in] index //! @param[out] sheetName @@ -126,6 +126,10 @@ void eeprom_default_sheet_name(uint8_t index, SheetName &sheetName) { strcpy_P(sheetName.c, PSTR("Textur")); } + else if (index < 4) + { + strcpy_P(sheetName.c, PSTR("Satin ")); + } else { strcpy_P(sheetName.c, PSTR("Custom")); @@ -152,10 +156,10 @@ void eeprom_default_sheet_name(uint8_t index, SheetName &sheetName) sheetName.c[6] = '2'; break; case 6: - sheetName.c[6] = '3'; + sheetName.c[6] = '1'; break; case 7: - sheetName.c[6] = '4'; + sheetName.c[6] = '2'; break; default: break; diff --git a/Firmware/eeprom.h b/Firmware/eeprom.h index 2590d0f2..c1d5e256 100644 --- a/Firmware/eeprom.h +++ b/Firmware/eeprom.h @@ -276,19 +276,19 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | 0x0D71 3441 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 4th sheet - Z offset | ^ | D3 Ax0d71 C2 | 0x0D73 3443 | uint8 | ^ | 00h 0 | ffh 255 | 4th sheet - bed temp | ^ | D3 Ax0d73 C1 | 0x0D74 3444 | uint8 | ^ | 00h 0 | ffh 255 | 4th sheet - PINDA temp | ^ | D3 Ax0d74 C1 -| 0x0D75 3445 | char | _5th Sheet block_ | 437573746f6d31| ffffffffffffff | 5th sheet - Name: _Custom1_ | ^ | D3 Ax0d75 C7 +| 0x0D75 3445 | char | _5th Sheet block_ | 437573746f6d31| ffffffffffffff | 5th sheet - Name: _Satin 1_ | ^ | D3 Ax0d75 C7 | 0x0D7C 3452 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 5th sheet - Z offset | ^ | D3 Ax0d7c C2 | 0x0D7E 3454 | uint8 | ^ | 00h 0 | ffh 255 | 5th sheet - bed temp | ^ | D3 Ax0d7e C1 | 0x0D7F 3455 | uint8 | ^ | 00h 0 | ffh 255 | 5th sheet - PINDA temp | ^ | D3 Ax0d7f C1 -| 0x0D80 3456 | char | _6th Sheet block_ | 437573746f6d32| ffffffffffffff | 6th sheet - Name: _Custom2_ | ^ | D3 Ax0d80 C7 +| 0x0D80 3456 | char | _6th Sheet block_ | 437573746f6d32| ffffffffffffff | 6th sheet - Name: _Satin 2_ | ^ | D3 Ax0d80 C7 | 0x0D87 3463 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 6th sheet - Z offset | ^ | D3 Ax0d87 C2 | 0x0D89 3465 | uint8 | ^ | 00h 0 | ffh 255 | 6th sheet - bed temp | ^ | D3 Ax0d89 C1 | 0x0D8A 3466 | uint8 | ^ | 00h 0 | ffh 255 | 6th sheet - PINDA temp | ^ | D3 Ax0d8a C1 -| 0x0D8B 3467 | char | _7th Sheet block_ | 437573746f6d33| ffffffffffffff | 7th sheet - Name: _Custom3_ | ^ | D3 Ax0d8b C7 +| 0x0D8B 3467 | char | _7th Sheet block_ | 437573746f6d33| ffffffffffffff | 7th sheet - Name: _Custom1_ | ^ | D3 Ax0d8b C7 | 0x0D92 3474 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 7th sheet - Z offset | ^ | D3 Ax0d92 C2 | 0x0D94 3476 | uint8 | ^ | 00h 0 | ffh 255 | 7th sheet - bed temp | ^ | D3 Ax0d94 C1 | 0x0D95 3477 | uint8 | ^ | 00h 0 | ffh 255 | 7th sheet - PINDA temp | ^ | D3 Ax0d95 C1 -| 0x0D96 3478 | char | _8th Sheet block_ | 437573746f6d34| ffffffffffffff | 8th sheet - Name: _Custom4_ | ^ | D3 Ax0d96 C7 +| 0x0D96 3478 | char | _8th Sheet block_ | 437573746f6d34| ffffffffffffff | 8th sheet - Name: _Custom2_ | ^ | D3 Ax0d96 C7 | 0x0D9D 3485 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 8th sheet - Z offset | ^ | D3 Ax0d9d C2 | 0x0D9F 3487 | uint8 | ^ | 00h 0 | ffh 255 | 8th sheet - bed temp | ^ | D3 Ax0d9f C1 | 0x0DA0 3488 | uint8 | ^ | 00h 0 | ffh 255 | 8th sheet - PINDA temp | ^ | D3 Ax0da0 C1 From c777199d34a652c6882f14d5d04275be878f5ec5 Mon Sep 17 00:00:00 2001 From: awenelo <56133692+awenelo@users.noreply.github.com> Date: Sat, 6 Mar 2021 13:26:28 -0500 Subject: [PATCH 2/5] Simplify sheet numbering --- Firmware/eeprom.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Firmware/eeprom.cpp b/Firmware/eeprom.cpp index 4c910ac2..51d9037f 100644 --- a/Firmware/eeprom.cpp +++ b/Firmware/eeprom.cpp @@ -135,7 +135,9 @@ void eeprom_default_sheet_name(uint8_t index, SheetName &sheetName) strcpy_P(sheetName.c, PSTR("Custom")); } - switch (index) + sheetName.c[6] = '0' + ((index % 2)+1); + +/* switch (index) { case 0: sheetName.c[6] = '1'; @@ -163,7 +165,7 @@ void eeprom_default_sheet_name(uint8_t index, SheetName &sheetName) break; default: break; - } + }*/ sheetName.c[7] = '\0'; } From 144fc197a55279841d7b3a80a26f29bb9b343ce8 Mon Sep 17 00:00:00 2001 From: awenelo <56133692+awenelo@users.noreply.github.com> Date: Sat, 6 Mar 2021 14:20:06 -0500 Subject: [PATCH 3/5] Fix index number --- Firmware/eeprom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/eeprom.cpp b/Firmware/eeprom.cpp index 51d9037f..3e011a03 100644 --- a/Firmware/eeprom.cpp +++ b/Firmware/eeprom.cpp @@ -126,7 +126,7 @@ void eeprom_default_sheet_name(uint8_t index, SheetName &sheetName) { strcpy_P(sheetName.c, PSTR("Textur")); } - else if (index < 4) + else if (index < 6) { strcpy_P(sheetName.c, PSTR("Satin ")); } From 09b3632d4344f52d767023556ce090f5832aa517 Mon Sep 17 00:00:00 2001 From: awenelo <56133692+awenelo@users.noreply.github.com> Date: Sun, 7 Mar 2021 09:44:33 -0500 Subject: [PATCH 4/5] Final changes + cleanup --- Firmware/eeprom.cpp | 31 ------------------------------- Firmware/eeprom.h | 4 ++-- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/Firmware/eeprom.cpp b/Firmware/eeprom.cpp index 3e011a03..a8ac5f51 100644 --- a/Firmware/eeprom.cpp +++ b/Firmware/eeprom.cpp @@ -136,37 +136,6 @@ void eeprom_default_sheet_name(uint8_t index, SheetName &sheetName) } sheetName.c[6] = '0' + ((index % 2)+1); - -/* switch (index) - { - case 0: - sheetName.c[6] = '1'; - break; - case 1: - sheetName.c[6] = '2'; - break; - case 2: - sheetName.c[6] = '1'; - break; - case 3: - sheetName.c[6] = '2'; - break; - case 4: - sheetName.c[6] = '1'; - break; - case 5: - sheetName.c[6] = '2'; - break; - case 6: - sheetName.c[6] = '1'; - break; - case 7: - sheetName.c[6] = '2'; - break; - default: - break; - }*/ - sheetName.c[7] = '\0'; } diff --git a/Firmware/eeprom.h b/Firmware/eeprom.h index c1d5e256..5d13d03f 100644 --- a/Firmware/eeprom.h +++ b/Firmware/eeprom.h @@ -276,11 +276,11 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | 0x0D71 3441 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 4th sheet - Z offset | ^ | D3 Ax0d71 C2 | 0x0D73 3443 | uint8 | ^ | 00h 0 | ffh 255 | 4th sheet - bed temp | ^ | D3 Ax0d73 C1 | 0x0D74 3444 | uint8 | ^ | 00h 0 | ffh 255 | 4th sheet - PINDA temp | ^ | D3 Ax0d74 C1 -| 0x0D75 3445 | char | _5th Sheet block_ | 437573746f6d31| ffffffffffffff | 5th sheet - Name: _Satin 1_ | ^ | D3 Ax0d75 C7 +| 0x0D75 3445 | char | _5th Sheet block_ | 536174696e2031| ffffffffffffff | 5th sheet - Name: _Satin 1_ | ^ | D3 Ax0d75 C7 | 0x0D7C 3452 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 5th sheet - Z offset | ^ | D3 Ax0d7c C2 | 0x0D7E 3454 | uint8 | ^ | 00h 0 | ffh 255 | 5th sheet - bed temp | ^ | D3 Ax0d7e C1 | 0x0D7F 3455 | uint8 | ^ | 00h 0 | ffh 255 | 5th sheet - PINDA temp | ^ | D3 Ax0d7f C1 -| 0x0D80 3456 | char | _6th Sheet block_ | 437573746f6d32| ffffffffffffff | 6th sheet - Name: _Satin 2_ | ^ | D3 Ax0d80 C7 +| 0x0D80 3456 | char | _6th Sheet block_ | 536174696e2032| ffffffffffffff | 6th sheet - Name: _Satin 2_ | ^ | D3 Ax0d80 C7 | 0x0D87 3463 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 6th sheet - Z offset | ^ | D3 Ax0d87 C2 | 0x0D89 3465 | uint8 | ^ | 00h 0 | ffh 255 | 6th sheet - bed temp | ^ | D3 Ax0d89 C1 | 0x0D8A 3466 | uint8 | ^ | 00h 0 | ffh 255 | 6th sheet - PINDA temp | ^ | D3 Ax0d8a C1 From 9b21ebd376b6c63989d9d32c16b4f2a2dfb1bee3 Mon Sep 17 00:00:00 2001 From: awenelo <56133692+awenelo@users.noreply.github.com> Date: Sun, 7 Mar 2021 12:14:03 -0500 Subject: [PATCH 5/5] Fix numbering for custum sheet hex values --- Firmware/eeprom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/eeprom.h b/Firmware/eeprom.h index 5d13d03f..d99d2632 100644 --- a/Firmware/eeprom.h +++ b/Firmware/eeprom.h @@ -284,11 +284,11 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | 0x0D87 3463 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 6th sheet - Z offset | ^ | D3 Ax0d87 C2 | 0x0D89 3465 | uint8 | ^ | 00h 0 | ffh 255 | 6th sheet - bed temp | ^ | D3 Ax0d89 C1 | 0x0D8A 3466 | uint8 | ^ | 00h 0 | ffh 255 | 6th sheet - PINDA temp | ^ | D3 Ax0d8a C1 -| 0x0D8B 3467 | char | _7th Sheet block_ | 437573746f6d33| ffffffffffffff | 7th sheet - Name: _Custom1_ | ^ | D3 Ax0d8b C7 +| 0x0D8B 3467 | char | _7th Sheet block_ | 437573746f6d31| ffffffffffffff | 7th sheet - Name: _Custom1_ | ^ | D3 Ax0d8b C7 | 0x0D92 3474 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 7th sheet - Z offset | ^ | D3 Ax0d92 C2 | 0x0D94 3476 | uint8 | ^ | 00h 0 | ffh 255 | 7th sheet - bed temp | ^ | D3 Ax0d94 C1 | 0x0D95 3477 | uint8 | ^ | 00h 0 | ffh 255 | 7th sheet - PINDA temp | ^ | D3 Ax0d95 C1 -| 0x0D96 3478 | char | _8th Sheet block_ | 437573746f6d34| ffffffffffffff | 8th sheet - Name: _Custom2_ | ^ | D3 Ax0d96 C7 +| 0x0D96 3478 | char | _8th Sheet block_ | 437573746f6d32| ffffffffffffff | 8th sheet - Name: _Custom2_ | ^ | D3 Ax0d96 C7 | 0x0D9D 3485 | uint16 | ^ | 00 00h 0 | ff ffh 65535 | 8th sheet - Z offset | ^ | D3 Ax0d9d C2 | 0x0D9F 3487 | uint8 | ^ | 00h 0 | ffh 255 | 8th sheet - bed temp | ^ | D3 Ax0d9f C1 | 0x0DA0 3488 | uint8 | ^ | 00h 0 | ffh 255 | 8th sheet - PINDA temp | ^ | D3 Ax0da0 C1