Browse Source

PFW-1386 Address should accept hexidecimal values

Now these are equal:
M707 A255 C1
M707 A0xFF C1

Both address inputs are interpreted as FF
Guðni Már Gilbert 2 years ago
parent
commit
d78c575399
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Firmware/Marlin_main.cpp

+ 2 - 2
Firmware/Marlin_main.cpp

@@ -8711,7 +8711,7 @@ Sigma_Exit:
         if ( MMU2::mmu2.Enabled() )
         if ( MMU2::mmu2.Enabled() )
         {
         {
             if( code_seen('A') ) {
             if( code_seen('A') ) {
-                addr = code_value_uint8();
+                addr = uint8_t(strtol(strchr_pointer+1, NULL, 0));
             }
             }
             if( code_seen('C') ) {
             if( code_seen('C') ) {
                 nrbytes = code_value_uint8();
                 nrbytes = code_value_uint8();
@@ -8742,7 +8742,7 @@ Sigma_Exit:
         if ( MMU2::mmu2.Enabled() )
         if ( MMU2::mmu2.Enabled() )
         {
         {
             if( code_seen('A') ) {
             if( code_seen('A') ) {
-                addr = code_value_uint8();
+                addr = uint8_t(strtol(strchr_pointer+1, NULL, 0));
             }
             }
             if( code_seen('X') ) {
             if( code_seen('X') ) {
                 data = code_value_uint8();
                 data = code_value_uint8();