using namespace std;
+// static as it is shared by all screens
+std::vector<std::string> PanelScreen::command_queue;
+
PanelScreen::PanelScreen() {}
PanelScreen::~PanelScreen() {}
void PanelScreen::on_main_loop()
{
// for each command in queue send it
- for (auto cmd : command_queue) {
+ for (auto& cmd : command_queue) {
struct SerialMessage message;
message.message = cmd;
message.stream = &(StreamOutput::NullStream);
void send_gcode(std::string g);
void send_gcode(const char *gm_code, char parameter, float value);
void send_command(const char *gcstr);
- std::vector<std::string> command_queue;
+ static std::vector<std::string> command_queue;
PanelScreen *parent;
};