1.1 --- a/c++/rgb-assembler/rgb-assembler.cpp Sat Dec 23 23:34:21 2017 +0100
1.2 +++ b/c++/rgb-assembler/rgb-assembler.cpp Sat Dec 23 23:42:46 2017 +0100
1.3 @@ -4,13 +4,12 @@
1.4 #include <locale.h>
1.5 #include <cstring>
1.6 #include <unordered_map>
1.7 -#include <chrono>
1.8 -#include <thread>
1.9
1.10 #include "types.h"
1.11 #include "memory.h"
1.12 #include "Command.h"
1.13 #include "commands/Goto.h"
1.14 +#include "commands/Sleep.h"
1.15
1.16 using namespace std;
1.17
1.18 @@ -114,6 +113,7 @@
1.19
1.20 unordered_map<command_t, shared_ptr < Command>> commands = {
1.21 {CMD_GOTO, make_shared<commands::Goto>()},
1.22 + {CMD_SLEEP, make_shared<commands::Sleep>()},
1.23 };
1.24
1.25 for (address_t i = 0; i < MEMORY_SIZE;) {
1.26 @@ -131,13 +131,6 @@
1.27 }
1.28
1.29 switch (command) {
1.30 - case CMD_SLEEP:
1.31 - {
1.32 - sleep_t delay = read<sleep_t>(memory, i);
1.33 - wprintf(L"SLEEP %*d ms\n", 4, delay);
1.34 - this_thread::sleep_for(chrono::milliseconds(delay));
1.35 - break;
1.36 - }
1.37 case CMD_COLOR:
1.38 {
1.39 led_t led = read<led_t>(memory, i);