interating temperature controllers was done wrong. refactoring that error.
[clinton/Smoothieware.git] / src / modules / utils / panel / screens / WatchScreen.h
1 /*
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/>.
6 */
7
8 #ifndef WATCHSCREEN_H
9 #define WATCHSCREEN_H
10
11 #include "PanelScreen.h"
12
13 #include <tuple>
14
15 class WatchScreen : public PanelScreen
16 {
17 public:
18 WatchScreen();
19 ~WatchScreen();
20 void on_refresh();
21 void on_enter();
22 void on_main_loop();
23 void display_menu_line(uint16_t line);
24
25 private:
26 void get_current_status();
27 float get_current_speed();
28 void set_speed();
29 void get_current_pos(float *cp);
30 void get_sd_play_info();
31 const char *get_status();
32 const char *get_network();
33 void *getTemperatures(uint16_t heater_cs);
34 std::vector<uint16_t> temp_controllers;
35
36 uint32_t update_counts;
37 int current_speed;
38 float pos[3];
39 unsigned long elapsed_time;
40 unsigned int sd_pcnt_played;
41 char *ipstr;
42
43 struct {
44 bool speed_changed:1;
45 bool issue_change_speed:1;
46 bool fan_state:1;
47 };
48 };
49
50 #endif