Merge pull request #5188 from thinkyhead/rc_extended_host_support

Extended host support: M155 Auto temp report, M115 capabilities
This commit is contained in:
Scott Lahteine 2016-11-12 15:38:06 -06:00 committed by GitHub
commit 60cc9342a4
24 changed files with 591 additions and 308 deletions

View File

@ -106,7 +106,7 @@ script:
- opt_enable FIX_MOUNTED_PROBE Z_SAFE_HOMING
- build_marlin
#
# ...with AUTO_BED_LEVELING_LINEAR, Z_MIN_PROBE_REPEATABILITY_TEST, & DEBUG_LEVELING_FEATURE
# ...with AUTO_BED_LEVELING_LINEAR, Z_MIN_PROBE_REPEATABILITY_TEST, and DEBUG_LEVELING_FEATURE
#
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
- opt_set ABL_GRID_POINTS_X 16
@ -119,9 +119,9 @@ script:
- opt_enable Z_PROBE_SLED
- build_marlin
#
# ...with AUTO_BED_LEVELING_LINEAR & DEBUG_LEVELING_FEATURE
# ...with AUTO_BED_LEVELING_LINEAR, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, and EEPROM_CHITCHAT
#
- opt_enable AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE
- opt_enable AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
- build_marlin
#
# Test a Servo Probe
@ -130,9 +130,10 @@ script:
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
- build_marlin
#
# ...with AUTO_BED_LEVELING_3POINT & DEBUG_LEVELING_FEATURE
# ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
#
- opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE
- opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
- opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES
- build_marlin
#
# Test MESH_BED_LEVELING feature, with LCD

View File

@ -28,12 +28,6 @@
#ifndef CONDITIONALS_POST_H
#define CONDITIONALS_POST_H
#if ENABLED(EMERGENCY_PARSER)
#define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410"
#else
#define EMERGENCY_PARSER_CAPABILITIES ""
#endif
/**
* Axis lengths and center
*/

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -175,7 +175,7 @@
* M112 - Emergency stop.
* M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE)
* M114 - Report current position.
* M115 - Report capabilities.
* M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT)
* M117 - Display a message on the controller screen. (Requires an LCD)
* M119 - Report endstops status.
* M120 - Enable endstops detection.
@ -188,6 +188,7 @@
* M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
* M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
* M150 - Set BlinkM Color R<red> U<green> B<blue>. Values 0-255. (Requires BLINKM)
* M155 - Auto-report temperatures with interval of S<seconds>. (Requires AUTO_REPORT_TEMPERATURES)
* M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER)
* M164 - Save the mix as a virtual extruder. (Requires MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS)
* M165 - Set the proportions for a mixing extruder. Use parameters ABCDHI to set the mixing factors. (Requires MIXING_EXTRUDER)
@ -214,6 +215,8 @@
* M226 - Wait until a pin is in a given state: "M226 P<pin> S<state>"
* M240 - Trigger a camera to take a photograph. (Requires CHDK or PHOTOGRAPH_PIN)
* M250 - Set LCD contrast: "M250 C<contrast>" (0-63). (Requires LCD support)
* M260 - i2c Send Data (Requires EXPERIMENTAL_I2CBUS)
* M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS)
* M280 - Set servo position absolute: "M280 P<index> S<angle|µs>". (Requires servos)
* M300 - Play beep sound S<frequency Hz> P<duration ms>
* M301 - Set PID parameters P I and D. (Requires PIDTEMP)
@ -865,11 +868,20 @@ void setup_homepin(void) {
#if HAS_CASE_LIGHT
void setup_case_light() {
digitalWrite(CASE_LIGHT_PIN,
#if ENABLED(CASE_LIGHT_DEFAULT_ON)
OUT_WRITE(CASE_LIGHT_PIN, HIGH);
255
#else
OUT_WRITE(CASE_LIGHT_PIN, LOW);
0
#endif
);
analogWrite(CASE_LIGHT_PIN,
#if ENABLED(CASE_LIGHT_DEFAULT_ON)
255
#else
0
#endif
);
}
#endif
@ -5141,6 +5153,31 @@ inline void gcode_M105() {
SERIAL_EOL;
}
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
static uint8_t auto_report_temp_interval;
static millis_t next_temp_report_ms;
/**
* M155: Set temperature auto-report interval. M155 S<seconds>
*/
inline void gcode_M155() {
if (code_seen('S')) {
auto_report_temp_interval = code_value_byte();
NOMORE(auto_report_temp_interval, 60);
next_temp_report_ms = millis() + 1000UL * auto_report_temp_interval;
}
}
inline void auto_report_temperatures() {
if (auto_report_temp_interval && ELAPSED(millis(), next_temp_report_ms)) {
next_temp_report_ms = millis() + 1000UL * auto_report_temp_interval;
print_heaterstates();
}
}
#endif // AUTO_REPORT_TEMPERATURES
#if FAN_COUNT > 0
/**
@ -5751,7 +5788,71 @@ inline void gcode_M114() { report_current_position(); }
* M115: Capabilities string
*/
inline void gcode_M115() {
SERIAL_PROTOCOLPGM(MSG_M115_REPORT);
SERIAL_PROTOCOLLNPGM(MSG_M115_REPORT);
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
// EEPROM (M500, M501)
SERIAL_PROTOCOLPGM("Cap:");
#if ENABLED(EEPROM_SETTINGS)
SERIAL_PROTOCOLLNPGM("EEPROM:1");
#else
SERIAL_PROTOCOLLNPGM("EEPROM:0");
#endif
// AUTOREPORT_TEMP (M155)
SERIAL_PROTOCOLPGM("Cap:");
#if ENABLED(AUTO_REPORT_TEMPERATURES)
SERIAL_PROTOCOLLNPGM("AUTOREPORT_TEMP:1");
#else
SERIAL_PROTOCOLLNPGM("AUTOREPORT_TEMP:0");
#endif
// PROGRESS (M530 S L, M531 <file>, M532 X L)
SERIAL_PROTOCOLPGM("Cap:");
SERIAL_PROTOCOLPGM("PROGRESS:0");
// AUTOLEVEL (G29)
SERIAL_PROTOCOLPGM("Cap:");
#if HAS_ABL
SERIAL_PROTOCOLLNPGM("AUTOLEVEL:1");
#else
SERIAL_PROTOCOLLNPGM("AUTOLEVEL:0");
#endif
// Z_PROBE (G30)
SERIAL_PROTOCOLPGM("Cap:");
#if HAS_BED_PROBE
SERIAL_PROTOCOLLNPGM("Z_PROBE:1");
#else
SERIAL_PROTOCOLLNPGM("Z_PROBE:0");
#endif
// SOFTWARE_POWER (G30)
SERIAL_PROTOCOLPGM("Cap:");
#if HAS_POWER_SWITCH
SERIAL_PROTOCOLLNPGM("SOFTWARE_POWER:1");
#else
SERIAL_PROTOCOLLNPGM("SOFTWARE_POWER:0");
#endif
// TOGGLE_LIGHTS (M355)
SERIAL_PROTOCOLPGM("Cap:");
#if HAS_CASE_LIGHT
SERIAL_PROTOCOLLNPGM("TOGGLE_LIGHTS:1");
#else
SERIAL_PROTOCOLLNPGM("TOGGLE_LIGHTS:0");
#endif
// EMERGENCY_PARSER (M108, M112, M410)
SERIAL_PROTOCOLPGM("Cap:");
#if ENABLED(EMERGENCY_PARSER)
SERIAL_PROTOCOLLNPGM("EMERGENCY_PARSER:1");
#else
SERIAL_PROTOCOLLNPGM("EMERGENCY_PARSER:0");
#endif
#endif // EXTENDED_CAPABILITIES_REPORT
}
/**
@ -5791,59 +5892,6 @@ inline void gcode_M121() { endstops.enable_globally(false); }
#endif // BLINKM
#if ENABLED(EXPERIMENTAL_I2CBUS)
/**
* M155: Send data to a I2C slave device
*
* This is a PoC, the formating and arguments for the GCODE will
* change to be more compatible, the current proposal is:
*
* M155 A<slave device address base 10> ; Sets the I2C slave address the data will be sent to
*
* M155 B<byte-1 value in base 10>
* M155 B<byte-2 value in base 10>
* M155 B<byte-3 value in base 10>
*
* M155 S1 ; Send the buffered data and reset the buffer
* M155 R1 ; Reset the buffer without sending data
*
*/
inline void gcode_M155() {
// Set the target address
if (code_seen('A')) i2c.address(code_value_byte());
// Add a new byte to the buffer
if (code_seen('B')) i2c.addbyte(code_value_byte());
// Flush the buffer to the bus
if (code_seen('S')) i2c.send();
// Reset and rewind the buffer
else if (code_seen('R')) i2c.reset();
}
/**
* M156: Request X bytes from I2C slave device
*
* Usage: M156 A<slave device address base 10> B<number of bytes>
*/
inline void gcode_M156() {
if (code_seen('A')) i2c.address(code_value_byte());
uint8_t bytes = code_seen('B') ? code_value_byte() : 1;
if (i2c.addr && bytes && bytes <= TWIBUS_BUFFER_SIZE) {
i2c.relay(bytes);
}
else {
SERIAL_ERROR_START;
SERIAL_ERRORLN("Bad i2c request");
}
}
#endif // EXPERIMENTAL_I2CBUS
/**
* M200: Set filament diameter and set E axis units to cubic units
*
@ -6190,6 +6238,59 @@ inline void gcode_M226() {
} // code_seen('P')
}
#if ENABLED(EXPERIMENTAL_I2CBUS)
/**
* M260: Send data to a I2C slave device
*
* This is a PoC, the formating and arguments for the GCODE will
* change to be more compatible, the current proposal is:
*
* M260 A<slave device address base 10> ; Sets the I2C slave address the data will be sent to
*
* M260 B<byte-1 value in base 10>
* M260 B<byte-2 value in base 10>
* M260 B<byte-3 value in base 10>
*
* M260 S1 ; Send the buffered data and reset the buffer
* M260 R1 ; Reset the buffer without sending data
*
*/
inline void gcode_M260() {
// Set the target address
if (code_seen('A')) i2c.address(code_value_byte());
// Add a new byte to the buffer
if (code_seen('B')) i2c.addbyte(code_value_byte());
// Flush the buffer to the bus
if (code_seen('S')) i2c.send();
// Reset and rewind the buffer
else if (code_seen('R')) i2c.reset();
}
/**
* M261: Request X bytes from I2C slave device
*
* Usage: M261 A<slave device address base 10> B<number of bytes>
*/
inline void gcode_M261() {
if (code_seen('A')) i2c.address(code_value_byte());
uint8_t bytes = code_seen('B') ? code_value_byte() : 1;
if (i2c.addr && bytes && bytes <= TWIBUS_BUFFER_SIZE) {
i2c.relay(bytes);
}
else {
SERIAL_ERROR_START;
SERIAL_ERRORLN("Bad i2c request");
}
}
#endif // EXPERIMENTAL_I2CBUS
#if HAS_SERVOS
/**
@ -7099,33 +7200,30 @@ inline void gcode_M907() {
#endif // HAS_MICROSTEPS
#if HAS_CASE_LIGHT
/**
* M355: Turn case lights on/off
*
* S<int> change state on/off or sets PWM
* M355: Turn case lights on/off and set brightness
*
* S<bool> Turn case light on or off
* P<byte> Set case light brightness (PWM pin required)
*/
inline void gcode_M355() {
static bool case_light_on
#if ENABLED(CASE_LIGHT_DEFAULT_ON)
= true
#else
;
#endif
static uint8_t case_light_brightness = 255;
if (code_seen('P')) case_light_brightness = code_value_byte();
if (code_seen('S')) {
case_light_on = code_value_bool();
digitalWrite(CASE_LIGHT_PIN, case_light_on ? HIGH : LOW);
analogWrite(CASE_LIGHT_PIN, case_light_on ? case_light_brightness : 0);
}
SERIAL_ECHO_START;
SERIAL_ECHOPGM("Case lights ");
byte light_pwm = code_value_byte();
switch (light_pwm) {
case 0: // Disable lights
SERIAL_ECHOPGM("off");
break;
case 1: // Enable lights
light_pwm = 255;
SERIAL_ECHOPGM("on");
break;
default: // Enable lights PWM
SERIAL_ECHOPAIR("set to: ", (int)map(light_pwm, 0, 255, 0, 100));
SERIAL_CHAR('%');
break;
}
analogWrite(CASE_LIGHT_PIN, light_pwm);
SERIAL_EOL;
}
case_light_on ? SERIAL_ECHOLNPGM("on") : SERIAL_ECHOLNPGM("off");
}
#endif // HAS_CASE_LIGHT
@ -7846,6 +7944,12 @@ void process_next_command() {
KEEPALIVE_STATE(NOT_BUSY);
return; // "ok" already printed
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
case 155: // M155: Set temperature auto-report interval
gcode_M155();
break;
#endif
case 109: // M109: Wait for hotend temperature to reach target
gcode_M109();
break;
@ -7956,18 +8060,6 @@ void process_next_command() {
#endif // BLINKM
#if ENABLED(EXPERIMENTAL_I2CBUS)
case 155: // M155: Send data to an i2c slave
gcode_M155();
break;
case 156: // M156: Request data from an i2c slave
gcode_M156();
break;
#endif //EXPERIMENTAL_I2CBUS
#if ENABLED(MIXING_EXTRUDER)
case 163: // M163: Set a component weight for mixing extruder
gcode_M163();
@ -8090,6 +8182,18 @@ void process_next_command() {
break;
#endif // HAS_LCD_CONTRAST
#if ENABLED(EXPERIMENTAL_I2CBUS)
case 260: // M260: Send data to an i2c slave
gcode_M260();
break;
case 261: // M261: Request data from an i2c slave
gcode_M261();
break;
#endif // EXPERIMENTAL_I2CBUS
#if ENABLED(PREVENT_COLD_EXTRUSION)
case 302: // M302: Allow cold extrudes (set the minimum extrude temperature)
gcode_M302();
@ -9669,7 +9773,13 @@ void idle(
#endif
) {
lcd_update();
host_keepalive();
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
auto_report_temperatures();
#endif
manage_inactivity(
#if ENABLED(FILAMENT_CHANGE_FEATURE)
no_stepper_sleep

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -814,22 +814,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -843,4 +843,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -816,22 +816,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -845,4 +845,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -810,22 +810,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -839,4 +839,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -810,22 +810,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -839,4 +839,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -810,22 +810,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -839,4 +839,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -815,22 +815,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -844,4 +844,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -810,22 +810,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -839,4 +839,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -808,22 +808,22 @@
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
* ; It uses multiple M155 commands with one B<base 10> arg
* M155 A99 ; Target slave address
* M155 B77 ; M
* M155 B97 ; a
* M155 B114 ; r
* M155 B108 ; l
* M155 B105 ; i
* M155 B110 ; n
* M155 S1 ; Send the current buffer
* ; It uses multiple M260 commands with one B<base 10> arg
* M260 A99 ; Target slave address
* M260 B77 ; M
* M260 B97 ; a
* M260 B114 ; r
* M260 B108 ; l
* M260 B105 ; i
* M260 B110 ; n
* M260 S1 ; Send the current buffer
*
* ; Example #2
* ; Request 6 bytes from slave device with address 0x63 (99)
* M156 A99 B5
* M261 A99 B5
*
* ; Example #3
* ; Example serial output of a M156 request
* ; Example serial output of a M261 request
* echo:i2c-reply: from:99 bytes:5 data:hello
*/
@ -837,4 +837,14 @@
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H

View File

@ -129,7 +129,7 @@
#define MSG_INVALID_EXTRUDER "Invalid extruder"
#define MSG_INVALID_SOLENOID "Invalid solenoid"
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID EMERGENCY_PARSER_CAPABILITIES "\n"
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID
#define MSG_COUNT_X " Count X: "
#define MSG_COUNT_A " Count A: "
#define MSG_ERR_KILLED "Printer halted. kill() called!"

View File

@ -77,8 +77,6 @@ void TWIBus::addstring(char str[]) {
}
void TWIBus::send() {
if (!this->addr) return;
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("send"), this->addr);
#endif

View File

@ -43,11 +43,11 @@ typedef void (*twiRequestFunc_t)();
* an experimental feature and it's inner workings as well as public facing
* interface are prune to change in the future.
*
* The two main consumers of this class are M155 and M156, where M155 allows
* The two main consumers of this class are M260 and M261, where M260 allows
* Marlin to send a I2C packet to a device (please be aware that no repeated
* starts are possible), this can be done in caching method by calling multiple
* times M155 B<byte-1 value in base 10> or a one liner M155, have a look at
* the gcode_M155() function for more information. M156 allows Marlin to
* times M260 B<byte-1 value in base 10> or a one liner M260, have a look at
* the gcode_M260() function for more information. M261 allows Marlin to
* request data from a device, the received data is then relayed into the serial
* line for host interpretation.
*