Browse Source

Move M240 to cpp

pull/1/head
Scott Lahteine 7 years ago
parent
commit
ebb9bd5419
  1. 4
      Marlin/src/Marlin.cpp
  2. 10
      Marlin/src/gcode/feature/camera/M240.cpp
  3. 7
      Marlin/src/gcode/gcode.cpp

4
Marlin/src/Marlin.cpp

@ -352,10 +352,6 @@ bool pin_is_protected(const int8_t pin) {
return false;
}
#if defined(CHDK) || HAS_PHOTOGRAPH
#include "gcode/feature/camera/M240.h"
#endif
#if HAS_LCD_CONTRAST
#include "gcode/lcd/M250.h"
#endif

10
Marlin/src/gcode/feature/camera/M240.h → Marlin/src/gcode/feature/camera/M240.cpp

@ -20,11 +20,17 @@
*
*/
#include "../../../inc/MarlinConfig.h"
#if defined(CHDK) || HAS_PHOTOGRAPH
#include "../../gcode.h"
/**
* M240: Trigger a camera by emulating a Canon RC-1
* See http://www.doc-diy.net/photo/rc-1_hacked/
*/
void gcode_M240() {
void GcodeSuite::M240() {
#ifdef CHDK
OUT_WRITE(CHDK, HIGH);
@ -51,3 +57,5 @@ void gcode_M240() {
#endif
}
#endif // CHDK || HAS_PHOTOGRAPH

7
Marlin/src/gcode/gcode.cpp

@ -119,7 +119,6 @@ void GcodeSuite::dwell(millis_t time) {
extern void gcode_M163();
extern void gcode_M164();
extern void gcode_M165();
extern void gcode_M240();
extern void gcode_M250();
extern void gcode_M302();
extern void gcode_M350();
@ -576,10 +575,8 @@ void GcodeSuite::process_next_command() {
#endif
#if defined(CHDK) || HAS_PHOTOGRAPH
case 240: // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
gcode_M240();
break;
#endif // CHDK || PHOTOGRAPH_PIN
case 240: M240(); break; // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
#endif
#if HAS_LCD_CONTRAST
case 250: // M250: Set LCD contrast

Loading…
Cancel
Save