From 159c1d68a6efb181adfff1998e856c8b02ee8886 Mon Sep 17 00:00:00 2001
From: 3d-gussner <3d.gussner@gmail.com>
Date: Sat, 28 Mar 2020 10:40:50 +0100
Subject: [PATCH 1/5] Fix missing (hex) in D5 code
---
Firmware/Dcodes.cpp | 2 +-
Firmware/Marlin_main.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Firmware/Dcodes.cpp b/Firmware/Dcodes.cpp
index 79695c9e..9b491a3c 100644
--- a/Firmware/Dcodes.cpp
+++ b/Firmware/Dcodes.cpp
@@ -372,7 +372,7 @@ void dcode_4()
#### Parameters
- `A` - Address (x00000-x3ffff)
- `C` - Count (1-8192)
- - `X` - Data
+ - `X` - Data (hex)
- `E` - Erase
#### Notes
diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp
index e4e40cfb..d8b8957f 100755
--- a/Firmware/Marlin_main.cpp
+++ b/Firmware/Marlin_main.cpp
@@ -8882,7 +8882,7 @@ Sigma_Exit:
#### Parameters
- `A` - Address (x00000-x3ffff)
- `C` - Count (1-8192)
- - `X` - Data
+ - `X` - Data (hex)
- `E` - Erase
#### Notes
From ecd409c44f37bb935c4918e7149a6fcb09ef271f Mon Sep 17 00:00:00 2001
From: 3d-gussner <3d.gussner@gmail.com>
Date: Wed, 1 Apr 2020 16:24:20 +0200
Subject: [PATCH 2/5] Make ALL D-codes available for DEBUG mode until now D3
and D5 needed to be defined separately
---
Firmware/Dcodes.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Firmware/Dcodes.cpp b/Firmware/Dcodes.cpp
index 9b491a3c..7d3d6dce 100644
--- a/Firmware/Dcodes.cpp
+++ b/Firmware/Dcodes.cpp
@@ -97,7 +97,7 @@ void print_mem(uint32_t address, uint16_t count, uint8_t type, uint8_t countperl
}
}
-#ifdef DEBUG_DCODE3
+#if defined DEBUG_DCODE3 || defined DEBUG_DCODES
#define EEPROM_SIZE 0x1000
/*!
### D3 - Read/Write EEPROM D3: Read/Write EEPROM
@@ -360,7 +360,7 @@ void dcode_4()
}
#endif //DEBUG_DCODES
-#ifdef DEBUG_DCODE5
+#if defined DEBUG_DCODE5 || defined DEBUG_DCODES
/*!
### D5 - Read/Write FLASH D5: Read/Write Flash
From f32b6c2912d9647b9cda98c2ac859615b0ab608e Mon Sep 17 00:00:00 2001
From: 3d-gussner <3d.gussner@gmail.com>
Date: Wed, 1 Apr 2020 18:56:34 +0200
Subject: [PATCH 3/5] Forgot to modify Marlin_main
---
Firmware/Marlin_main.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp
index 0931ff57..a6becaa6 100755
--- a/Firmware/Marlin_main.cpp
+++ b/Firmware/Marlin_main.cpp
@@ -8835,7 +8835,7 @@ Sigma_Exit:
case 2:
dcode_2(); break;
#endif //DEBUG_DCODES
-#ifdef DEBUG_DCODE3
+#if defined DEBUG_DCODE3 || defined DEBUG_DCODES
/*!
### D3 - Read/Write EEPROM D3: Read/Write EEPROM
@@ -8876,7 +8876,7 @@ Sigma_Exit:
case 4:
dcode_4(); break;
#endif //DEBUG_DCODES
-#ifdef DEBUG_DCODE5
+#if defined DEBUG_DCODE5 || defined DEBUG_DCODES
/*!
### D5 - Read/Write FLASH D5: Read/Write Flash
From 65a406a2f3f4131a029f385cf4e4af582a6d4396 Mon Sep 17 00:00:00 2001
From: 3d-gussner <3d.gussner@gmail.com>
Date: Tue, 7 Apr 2020 11:22:48 +0200
Subject: [PATCH 4/5] Bugfix for last PR I forgot to change also the - `#ifdef
DEBUG_DCODE_3` to `#if defined DEBUG_DCODE3 || defined DEBUG_DCODES` -
`#ifdef DEBUG_DCODE_5` to `#if defined DEBUG_DCODE5 || defined DEBUG_DCODES`
in the `Dcodes.h` file which I added to `Dcodes.cpp`.
Due to this issue the "Debug" version fails during compiling.
Sorry for that.
---
Firmware/Dcodes.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Firmware/Dcodes.h b/Firmware/Dcodes.h
index 894cba52..856d04ad 100644
--- a/Firmware/Dcodes.h
+++ b/Firmware/Dcodes.h
@@ -6,13 +6,13 @@ extern void dcode_0(); //D0 - Reset
extern void dcode_1(); //D1 - Clear EEPROM
extern void dcode_2(); //D2 - Read/Write RAM
-#ifdef DEBUG_DCODE3
+#if defined DEBUG_DCODE3 || defined DEBUG_DCODES
extern void dcode_3(); //D3 - Read/Write EEPROM
#endif //DEBUG_DCODE3
extern void dcode_4(); //D4 - Read/Write PIN
-#ifdef DEBUG_DCODE5
+#if defined DEBUG_DCODE5 || defined DEBUG_DCODES
extern void dcode_5(); //D5 - Read/Write FLASH
#endif //DEBUG_DCODE5
From c1d05210ff7f36b9b95df4bd947eed9f615c29cd Mon Sep 17 00:00:00 2001
From: 3d-gussner <3d.gussner@gmail.com>
Date: Tue, 7 Apr 2020 11:42:09 +0200
Subject: [PATCH 5/5] Cleanup useless `break;`
---
Firmware/Marlin_main.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp
index 8b3d4a73..95b2501c 100755
--- a/Firmware/Marlin_main.cpp
+++ b/Firmware/Marlin_main.cpp
@@ -8901,7 +8901,6 @@ Sigma_Exit:
*/
case 5:
dcode_5(); break;
- break;
#endif //DEBUG_DCODE5
#ifdef DEBUG_DCODES