Browse Source

If no "B" parameter given, get 1 byte

Scott Lahteine 9 years ago
parent
commit
aaeadf0cbd
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/Marlin_main.cpp

+ 1
- 1
Marlin/Marlin_main.cpp View File

5038
    */
5038
    */
5039
   inline void gcode_M156() {
5039
   inline void gcode_M156() {
5040
     uint8_t addr = code_seen('A') ? code_value_short() : 0;
5040
     uint8_t addr = code_seen('A') ? code_value_short() : 0;
5041
-    int bytes    = code_seen('B') ? code_value_short() : 0;
5041
+    int bytes    = code_seen('B') ? code_value_short() : 1;
5042
 
5042
 
5043
     if (addr && bytes > 0 && bytes <= 32) {
5043
     if (addr && bytes > 0 && bytes <= 32) {
5044
       i2c.address(addr);
5044
       i2c.address(addr);

Loading…
Cancel
Save