Merge branch 'ZeusWPI:main' into main

This commit is contained in:
Pieter Vander Vennet 2021-09-15 21:10:41 +02:00 committed by GitHub
commit 2975428752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

10
README.md Normal file
View file

@ -0,0 +1,10 @@
Get started:
```
# Fetch/update submodules:
git submodule update --init --recursive
# To set up a build in directory `build`:
cmake -B build
# To build in directory `build`:
cmake --build build
```

View file

@ -26,7 +26,7 @@
int frametime = 1000 / FPS;
std::unordered_map<lua_State*, InterpreterConfig*> statemap;
std::atomic<std::uint64_t> framecounter = 0;
std::atomic<std::uint64_t> framecounter = {0};
ws2811_t ledstring =
{
@ -211,10 +211,8 @@ int main(int argc, char** argv)
.length = 10,
.enabled = true
};
std::thread t = spawn_lua_tread("print(\"hi\")\nled(0, 0, 0, 0)\ndelay(0)\nled(0, 0, 0, 0)\nprint(\"hi\")", config);
std::thread t = spawn_lua_tread("while true do\nprint(\"begin\")\nled(1, 0, 0, 0)\ndelay(1000)\nled(1, 0, 255, 0)\ndelay(1000)\nprint(\"done\")\nend", config);
t.join();
httplib::Server svr;
svr.Get("/hi", [](const httplib::Request &, httplib::Response &res) {