2 this file is part of smoothie (http://smoothieware.org/). the motion control part is heavily based on grbl (https://github.com/simen/grbl).
3 smoothie is free software: you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation, either version 3 of the license, or (at your option) any later version.
4 smoothie is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. see the gnu general public license for more details.
5 you should have received a copy of the gnu general public license along with smoothie. if not, see <http://www.gnu.org/licenses/>.
21 class Switch
: public Module
{
24 Switch(uint16_t name
);
26 void on_module_loaded();
27 void on_config_reload(void* argument
);
28 void on_gcode_received(void* argument
);
29 void on_gcode_execute(void* argument
);
30 void on_main_loop(void* argument
);
31 void on_get_public_data(void* argument
);
32 void on_set_public_data(void* argument
);
33 uint32_t pinpoll_tick(uint32_t dummy
);
34 enum OUTPUT_TYPE
{PWM
, DIGITAL
};
37 void send_gcode(string msg
, StreamOutput
* stream
);
38 bool match_input_on_gcode(const Gcode
* gcode
) const;
39 bool match_input_off_gcode(const Gcode
* gcode
) const;
41 uint16_t name_checksum
;
43 uint16_t input_pin_behavior
;
45 char input_on_command_letter
;
46 char input_off_command_letter
;
47 uint16_t input_on_command_code
;
48 uint16_t input_off_command_code
;
52 OUTPUT_TYPE output_type
;
54 string output_on_command
;
55 string output_off_command
;