ESP3D  3.0
Firmware for ESP boards connected to 3D Printer
lua_interpreter_service.cpp
Go to the documentation of this file.
1 /*
2  lua_interpreter_service.cpp - ESP3D lua interpreter service class
3 
4  Copyright (c) 2014 Luc Lebosse. All rights reserved.
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #include "../../include/esp3d_config.h"
22 
23 #ifdef ESP_LUA_INTERPRETER_FEATURE
25 #include "../../core/settings_esp3d.h"
26 #include "../../core/hal.h"
27 #include <LuaWrapper.h>
28 
29 LuaWrapper luawrapper;
31 
33 {
34  _started = false;
35 }
36 
38 {
39  if(_started) {
40  end();
41  }
42  _started = true;
43  return _started;
44 }
46 {
47  if(!_started) {
48  return;
49  }
50  _started = false;
51 }
52 
53 
55 {
56  //Nothing to do as handled by ticker / task
57 }
58 
59 
61 {
62  end();
63 }
64 
65 
66 #endif //ESP_LUA_INTERPRETER_FEATURE
LuaInterpreter::~LuaInterpreter
~LuaInterpreter()
lua_interpreter_service.h
LuaInterpreter::end
void end()
LuaInterpreter
Definition: lua_interpreter_service.h:24
LuaInterpreter::begin
bool begin()
LuaInterpreter::LuaInterpreter
LuaInterpreter()
LuaInterpreter::handle
void handle()
esp3d_lua_interpreter
LuaInterpreter esp3d_lua_interpreter