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/>.
22 class Player
: public Module
{
26 void on_module_loaded();
27 void on_console_line_received( void* argument
);
28 void on_main_loop( void* argument
);
29 void on_second_tick(void* argument
);
30 void on_get_public_data(void* argument
);
31 void on_set_public_data(void* argument
);
32 void on_gcode_received(void *argument
);
35 void play_command( string parameters
, StreamOutput
* stream
);
36 void progress_command( string parameters
, StreamOutput
* stream
);
37 void abort_command( string parameters
, StreamOutput
* stream
);
38 void suspend_command( string parameters
, StreamOutput
* stream
);
39 void resume_command( string parameters
, StreamOutput
* stream
);
40 string
extract_options(string
& args
);
44 string after_suspend_gcode
;
45 string before_resume_gcode
;
47 StreamOutput
* current_stream
;
48 StreamOutput
* reply_stream
;
50 FILE* current_file_handler
;
52 unsigned long played_cnt
;
53 unsigned long elapsed_secs
;
54 float saved_position
[3]; // only saves XYZ
55 std::map
<uint16_t, float> saved_temperatures
;
57 bool on_boot_gcode_enable
:1;
61 bool was_playing_file
:1;
62 bool leave_heaters_on
:1;
63 bool override_leave_heaters_on
:1;
64 uint8_t suspend_loops
:4;