Commit 0385067a8c7253a2da0895532a812ebbaa04055b

Authored by Calvin Bulla
1 parent d155657d
Exists in master and in 1 other branch dev

Not working - Please help

app/res/devices/_dev_tty.usbmodem411.xml
1 1 <Settings>
2 2 <Color>62, 100, 233, 255</Color>
3 3 <Offset>0, 0</Offset>
  4 +<Intensity>2</Intensity>
4 5 </Settings>
... ...
app/res/devices/_dev_tty.usbmodem641.xml
1 1 <Settings>
2   - <Color>62, 100, 233, 255</Color>
  2 + <Color>164, 100, 110, 255</Color>
3 3 <Offset>0, 0</Offset>
4 4 <Intensity>2</Intensity>
5 5 </Settings>
... ...
app/src/heisenwave.h
... ... @@ -6,4 +6,13 @@
6 6 #define HW_HELO 1
7 7 #define HW_START_STREAM 2
8 8 #define HW_STOP_STREAM 3
9   -#define HW_NEW_FRAME 10
10 9 \ No newline at end of file
  10 +#define HW_SMPL_RATE 4
  11 +#define HW_GET_DATA 5
  12 +#define HW_DTIME_SET 6
  13 +#define HW_DTIME_GET 7
  14 +#define HW_SLEEP 8
  15 +#define HW_STOP_DATA 9
  16 +#define HW_NEW_FRAME 10
  17 +
  18 +// COMMANDS SIZE
  19 +#define HW_DATE_SIZE 4
... ...
app/src/inoChannel.cpp
... ... @@ -7,20 +7,23 @@ inoChannel::inoChannel(const string &amp; device) : device(device) {
7 7 inoChannel::~inoChannel() { }
8 8  
9 9 void inoChannel::setup() {
  10 + startThread();
10 11 }
11 12  
12 13 void inoChannel::exit() {
13   - serial.close();
  14 + waitForThread();
  15 + if(serial.isInitialized()) serial.close();
14 16 }
15 17  
16   -void inoChannel::restart() {
17   - exit();
18   - setup();
  18 +void inoChannel::urgentCommand(const inoCommand & cmd) {
  19 + commandsMtx.lock();
  20 + commands.push_front(cmd);
  21 + commandsMtx.unlock();
19 22 }
20 23  
21 24 void inoChannel::addCommand(const inoCommand & cmd) {
22 25 commandsMtx.lock();
23   - commands.push(cmd);
  26 + commands.push_back(cmd);
24 27 commandsMtx.unlock();
25 28 }
26 29  
... ... @@ -29,40 +32,68 @@ void inoChannel::changeStatus(const string &amp; str) {
29 32 ofNotifyEvent(statusChange, status, this);
30 33 }
31 34  
32   -void inoChannel::identify() {
  35 +void inoChannel::startStream() {
33 36 inoCommand cmd;
34   -
35   - cmd.resize(17, 0);
36   - cmd[0] = HW_HELO;
37   - for(int i = 0; i < 16 && i < device.size(); i++) {
38   - cmd[i+1] = device[i];
39   - }
  37 + cmd.push_back(HW_START_STREAM);
40 38 addCommand(cmd);
41 39 }
42 40  
43   -void inoChannel::startStream() {
  41 +void inoChannel::stopStream() {
44 42 inoCommand cmd;
45   - cmd.push_back(HW_START_STREAM);
  43 + cmd.push_back(HW_STOP_STREAM);
46 44 addCommand(cmd);
47 45 }
48 46  
49   -void inoChannel::stopStream() {
  47 +void inoChannel::sleepArduino() {
50 48 inoCommand cmd;
51   - cmd.push_back(HW_STOP_STREAM);
  49 + cmd.push_back(HW_SLEEP);
52 50 addCommand(cmd);
53 51 }
54 52  
55   -void inoChannel::waitArduino() throw(runtime_error) {
  53 +bool inoChannel::establish() {
  54 + serial.setup(device, 115200);
  55 + serial.flush();
56 56 while(isThreadRunning() && !(serial.available() >= 4));
57 57 if(serial.available() >= 4) {
58 58 unsigned char buf[4];
59 59 serial.readBytes(buf, 4);
60 60 if(buf[0] != 'H' || buf[1] != 'W') {
61 61 // Serial Port is invalid
62   - throw runtime_error("Invalid Port");
  62 + printf("Error %d, %d\n", buf[0], buf[1]);
  63 + serial.close();
  64 + return false;
63 65 }
  66 + printf("Version %d.%d\n", buf[2], buf[3]);
64 67 changeStatus("Connected");
65 68 }
  69 + return true;
  70 +}
  71 +
  72 +void inoChannel::identify() {
  73 + inoCommand cmd;
  74 + cmd.push_back(HW_HELO);
  75 + cmd.push_back(device.size());
  76 + cmd.insert(cmd.begin()+2, device.begin(), device.end());
  77 + urgentCommand(cmd);
  78 +}
  79 +
  80 +void inoChannel::setTime() {
  81 + inoCommand cmd;
  82 + cmd.push_back(HW_DTIME_SET);
  83 + time_t tstamp = time(NULL);
  84 + for(int i = 0; i < HW_DATE_SIZE; i++) {
  85 + uint8_t rv = tstamp >> (i*8);
  86 + cmd.push_back(rv);
  87 + }
  88 + addCommand(cmd);
  89 +}
  90 +
  91 +void inoChannel::setupArduino() throw(runtime_error) {
  92 + // Try to establish communication two times
  93 + // Arduino might be a bit annoying
  94 + if(!(establish() || establish())) {
  95 + throw runtime_error("Unable to init");
  96 + }
66 97 }
67 98  
68 99 void inoChannel::handleInput() throw(runtime_error) {
... ... @@ -73,9 +104,21 @@ void inoChannel::handleInput() throw(runtime_error) {
73 104 while(serial.available() < 256) {
74 105 if(!isThreadRunning()) return;
75 106 }
76   - // serial.readBytes(buffer, 256);
  107 + frameMtx.lock();
  108 + serial.readBytes(buffer, 256);
  109 + //cout << "new buffer" << endl;
  110 + for(int i = 0; i < 256; ++i) {
  111 + printf("[[%d]] %d\n", i, buffer[i]);
  112 + }
  113 + frameMtx.unlock();
77 114 break;
78 115 }
  116 + case 74:
  117 + printf("Looping %lu\n", time(NULL));
  118 + break;
  119 + case 75:
  120 + printf("Im with stupid\n");
  121 + break;
79 122 default:
80 123 throw runtime_error("Unrecognized Message");
81 124 break;
... ... @@ -84,10 +127,11 @@ void inoChannel::handleInput() throw(runtime_error) {
84 127  
85 128 void inoChannel::handleOutput() throw(runtime_error) {
86 129 commandsMtx.lock();
87   - if(commands.size() > 1) {
  130 + if(commands.size() > 0) {
88 131 inoCommand cmd = commands.front();
89 132 if(serial.writeBytes(cmd.data(), cmd.size())) {
90   - commands.pop();
  133 + printf("[%d] %lu bytes\n", cmd[0], cmd.size());
  134 + commands.pop_front();
91 135 } else {
92 136 throw runtime_error("Unable to write");
93 137 }
... ... @@ -96,11 +140,8 @@ void inoChannel::handleOutput() throw(runtime_error) {
96 140 }
97 141  
98 142 void inoChannel::threadedFunction() {
99   - serial.setup(device, 115200);
100   - serial.flush();
101 143 try {
102   - waitArduino();
103   - identify();
  144 + setupArduino();
104 145 while(isThreadRunning()) {
105 146 handleInput();
106 147 handleOutput();
... ... @@ -109,7 +150,12 @@ void inoChannel::threadedFunction() {
109 150 // At this point the channel is lost
110 151 // It should be restarted
111 152 changeStatus("Error");
112   - cerr << "Arduino [" << device << "]: " << ex.what();
  153 + cerr << "Arduino [" << device << "]: " << ex.what() << endl;
113 154 }
114   - serial.close();
  155 +}
  156 +
  157 +void inoChannel::getFrame(unsigned char *frame) {
  158 + frameMtx.lock();
  159 + memcpy(frame, buffer, 256);
  160 + frameMtx.unlock();
115 161 }
... ...
app/src/inoChannel.h
... ... @@ -10,26 +10,36 @@ public:
10 10 ~inoChannel();
11 11 void setup();
12 12 void exit();
13   - void restart();
14 13 void threadedFunction();
15 14  
16   - void identify();
17   - void startStream();
18   - void stopStream();
  15 + void getFrame(unsigned char *frame);
19 16  
20 17 //TODO Enum for Status?
21 18 ofEvent<string> statusChange;
  19 + ofEvent<void> receiveFrame;
  20 +
  21 + // HW Commands
  22 + void startStream();
  23 + void stopStream();
  24 + void identify();
  25 + void setTime();
  26 + void sleepArduino();
22 27  
23 28 private:
24 29 //TODO C++ Newbie question:
25 30 // Is this the proper use of exceptions?
26   - void waitArduino() throw(runtime_error);
  31 + bool establish();
  32 +
  33 + void setupArduino() throw(runtime_error);
27 34 void handleInput() throw(runtime_error);
28 35 void handleOutput() throw(runtime_error);
29 36 inline void changeStatus(const string & str);
30 37 inline void addCommand(const inoCommand & cmd);
  38 + inline void urgentCommand(const inoCommand & cmd);
31 39 ofSerial serial;
32 40 string device;
33   - queue<inoCommand> commands;
  41 + deque<inoCommand> commands;
  42 + unsigned char buffer[256];
34 43 ofMutex commandsMtx;
  44 + ofMutex frameMtx;
35 45 };
... ...
app/src/inoControl.cpp
... ... @@ -10,12 +10,17 @@ inoControl::inoControl(string device) : device(device), channel(device) {
10 10 setupGui();
11 11 setupSettings();
12 12  
13   - buffer = new unsigned char[BUFFER_SIZE];
  13 + buffer = new unsigned char[BUF_TOTAL];
  14 + memset(buffer, 127, BUF_TOTAL);
14 15  
15 16 ofAddListener(
16 17 channel.statusChange,
17 18 this,
18 19 &inoControl::onStatusChanged);
  20 + ofAddListener(
  21 + channel.receiveFrame,
  22 + this,
  23 + &inoControl::onReceiveFrame);
19 24 }
20 25  
21 26 inoControl::~inoControl() {
... ... @@ -61,13 +66,14 @@ void inoControl::toggleConnection(bool &amp; isSet) {
61 66 string statusStr = status;
62 67 if(isSet) {
63 68 if(statusStr == "Setup" || statusStr == "Error") {
64   - channel.startThread();
  69 + channel.setup();
  70 + channel.identify();
  71 + channel.setTime();
65 72 }
66   - channel.startStream();
  73 + //channel.startStream();
67 74 } else {
68   - if(!channel.isThreadRunning()) {
69   - channel.stopStream();
70   - }
  75 + //channel.stopStream();
  76 + //channel.sleepArduino();
71 77 }
72 78 }
73 79  
... ... @@ -95,9 +101,9 @@ void inoControl::drawWave(float zoom) {
95 101 ofNoFill();
96 102 ofSetLineWidth(intensity);
97 103 ofBeginShape();
98   - for(int i = 0; i <= BUFFER_SIZE; i++) {
99   - ofVertex((float)i/BUFFER_SIZE * (float)width,
100   - 300 + sin(8* M_PI* (double)i/BUFFER_SIZE) * 100);
  104 + for(int i = 0; i <= BUF_TOTAL; i++) {
  105 + ofVertex((float)i/BUF_TOTAL * (float)width,
  106 + (float)height - ((float)buffer[i] / 256 * (float)height));
101 107 }
102 108 ofEndShape(false);
103 109  
... ... @@ -108,3 +114,9 @@ void inoControl::resetSettings() {
108 114 settings.loadFromFile(inoControl::defaultSettings);
109 115 }
110 116  
  117 +void inoControl::onReceiveFrame() {
  118 + channel.getFrame(&buffer[bufferIdx]);
  119 + if(++bufferIdx == BUF_COUNT) {
  120 + bufferIdx = 0;
  121 + }
  122 +}
... ...
app/src/inoControl.h
1 1 #pragma once
2 2  
3   -#define BUFFER_SIZE 1024
  3 +#define BUF_FRAME 256
  4 +#define BUF_COUNT 4
  5 +#define BUF_TOTAL (BUF_FRAME * BUF_COUNT)
4 6  
5 7 #include "ofMain.h"
6 8 #include "ofxGui.h"
... ... @@ -14,6 +16,7 @@ public:
14 16 ofxGuiGroup * getGui();
15 17 void toggleConnection(bool & status);
16 18 void onStatusChanged(string & status);
  19 + void onReceiveFrame();
17 20 void resetSettings();
18 21  
19 22 void drawWave(float zoom);
... ... @@ -40,4 +43,6 @@ private:
40 43  
41 44 inoChannel channel;
42 45 unsigned char *buffer;
  46 + int bufferIdx;
  47 + ofMutex bufferMtx;
43 48 };
... ...
app/src/main.cpp
... ... @@ -3,6 +3,7 @@
3 3  
4 4 //========================================================================
5 5 int main( ) {
  6 + ofSetLogLevel(OF_LOG_ERROR);
6 7 ofSetupOpenGL(800, 600, OF_WINDOW);// <-------- setup the GL context
7 8 ofRunApp(new ofApp());
8 9 }
... ...
hw.sublime-project 0 → 100644
... ... @@ -0,0 +1,17 @@
  1 +{
  2 + "folders":
  3 + [
  4 + {
  5 + "name": "Heisenwave",
  6 + "path": "app/src"
  7 + },
  8 + {
  9 + "name": "Arduino - Lib",
  10 + "path": "ino/lib"
  11 + },
  12 + {
  13 + "name": "Arduino - Src",
  14 + "path": "ino/src"
  15 + }
  16 + ]
  17 +}
... ...
hw.sublime-workspace 0 → 100644
... ... @@ -0,0 +1,949 @@
  1 +{
  2 + "auto_complete":
  3 + {
  4 + "selected_items":
  5 + [
  6 + [
  7 + "HW_",
  8 + "HW_DTIME_SET"
  9 + ],
  10 + [
  11 + "lst",
  12 + "lstlisting"
  13 + ],
  14 + [
  15 + "po",
  16 + "points"
  17 + ],
  18 + [
  19 + "li",
  20 + "lineWidth"
  21 + ],
  22 + [
  23 + "point",
  24 + "pointSize"
  25 + ],
  26 + [
  27 + "err",
  28 + "error_callback"
  29 + ],
  30 + [
  31 + "cur",
  32 + "currentPosition"
  33 + ],
  34 + [
  35 + "Ch",
  36 + "CharacterSheet"
  37 + ],
  38 + [
  39 + "Game",
  40 + "GameObject"
  41 + ],
  42 + [
  43 + "cu",
  44 + "currentPosition"
  45 + ],
  46 + [
  47 + "Tu",
  48 + "Turn"
  49 + ],
  50 + [
  51 + "C",
  52 + "CurrentTurn"
  53 + ],
  54 + [
  55 + "Turn",
  56 + "TurnDisplay"
  57 + ],
  58 + [
  59 + "Pl",
  60 + "Players"
  61 + ],
  62 + [
  63 + "v",
  64 + "ViewStates"
  65 + ],
  66 + [
  67 + "Se",
  68 + "SetView"
  69 + ],
  70 + [
  71 + "in",
  72 + "interactable"
  73 + ],
  74 + [
  75 + "Sk",
  76 + "Skill"
  77 + ],
  78 + [
  79 + "c",
  80 + "currentCharacter"
  81 + ],
  82 + [
  83 + "Player",
  84 + "PlayerColor"
  85 + ],
  86 + [
  87 + "Tim",
  88 + "TimerCB"
  89 + ],
  90 + [
  91 + "Sele",
  92 + "SelectionColor"
  93 + ],
  94 + [
  95 + "lea",
  96 + "leavesWidth"
  97 + ],
  98 + [
  99 + "Gam",
  100 + "GameMaster"
  101 + ],
  102 + [
  103 + "Ga",
  104 + "GameMaster"
  105 + ],
  106 + [
  107 + "Terr",
  108 + "TerrainCell"
  109 + ],
  110 + [
  111 + "sle",
  112 + "selector"
  113 + ],
  114 + [
  115 + "Get",
  116 + "GetComponent"
  117 + ],
  118 + [
  119 + "pl",
  120 + "player"
  121 + ],
  122 + [
  123 + "ci",
  124 + "currentSkill"
  125 + ],
  126 + [
  127 + "T",
  128 + "Terrain"
  129 + ],
  130 + [
  131 + "to",
  132 + "tokenPosition"
  133 + ],
  134 + [
  135 + "Ter",
  136 + "TerrainCell"
  137 + ],
  138 + [
  139 + "toek",
  140 + "Tokens"
  141 + ],
  142 + [
  143 + "S",
  144 + "SearchWay"
  145 + ],
  146 + [
  147 + "fl",
  148 + "false"
  149 + ],
  150 + [
  151 + "En",
  152 + "EndTurnButton"
  153 + ],
  154 + [
  155 + "D",
  156 + "DisabledColor"
  157 + ],
  158 + [
  159 + "d",
  160 + "disabledColor"
  161 + ],
  162 + [
  163 + "Disa",
  164 + "disabledColor"
  165 + ],
  166 + [
  167 + "go",
  168 + "goodBtn"
  169 + ],
  170 + [
  171 + "Color",
  172 + "ColorBlock"
  173 + ],
  174 + [
  175 + "Ge",
  176 + "GetComponent"
  177 + ],
  178 + [
  179 + "Hi",
  180 + "HideSkillMenu"
  181 + ],
  182 + [
  183 + "L",
  184 + "Length"
  185 + ],
  186 + [
  187 + "for",
  188 + "foreach"
  189 + ],
  190 + [
  191 + "sk",
  192 + "skill"
  193 + ],
  194 + [
  195 + "Show",
  196 + "ShowSkillMenu"
  197 + ],
  198 + [
  199 + "ski",
  200 + "skill"
  201 + ],
  202 + [
  203 + "To",
  204 + "ToggleSkills"
  205 + ],
  206 + [
  207 + "Sh",
  208 + "ShowSkillMenu"
  209 + ],
  210 + [
  211 + "Ski",
  212 + "SkillConfirm"
  213 + ],
  214 + [
  215 + "Skill",
  216 + "SkillButtons"
  217 + ],
  218 + [
  219 + "pla",
  220 + "playerObject"
  221 + ],
  222 + [
  223 + "Co",
  224 + "Contains"
  225 + ],
  226 + [
  227 + "p",
  228 + "positions"
  229 + ],
  230 + [
  231 + "pos",
  232 + "positions"
  233 + ],
  234 + [
  235 + "Po",
  236 + "Position"
  237 + ],
  238 + [
  239 + "posi",
  240 + "Positions"
  241 + ],
  242 + [
  243 + "im",
  244 + "images"
  245 + ],
  246 + [
  247 + "Col",
  248 + "Columns"
  249 + ],
  250 + [
  251 + "ch",
  252 + "charPrefab"
  253 + ],
  254 + [
  255 + "B",
  256 + "ButtonPrefab"
  257 + ],
  258 + [
  259 + "mo",
  260 + "movingDirection"
  261 + ],
  262 + [
  263 + "m",
  264 + "movingDirection"
  265 + ],
  266 + [
  267 + "sp",
  268 + "speedUp"
  269 + ],
  270 + [
  271 + "movin",
  272 + "movingTime"
  273 + ],
  274 + [
  275 + "spe",
  276 + "speedVal"
  277 + ],
  278 + [
  279 + "spee",
  280 + "speedVal"
  281 + ],
  282 + [
  283 + "Add",
  284 + "AddComponent"
  285 + ],
  286 + [
  287 + "ray",
  288 + "rayHit"
  289 + ],
  290 + [
  291 + "Ra",
  292 + "raycasting"
  293 + ],
  294 + [
  295 + "Ma",
  296 + "MainCamera"
  297 + ],
  298 + [
  299 + "Di",
  300 + "DistanceMax"
  301 + ],
  302 + [
  303 + "Zoo",
  304 + "ZoomCamera"
  305 + ],
  306 + [
  307 + "V",
  308 + "ViewState"
  309 + ],
  310 + [
  311 + "Board",
  312 + "BoardPadding"
  313 + ],
  314 + [
  315 + "Clo",
  316 + "CloudDistance"
  317 + ],
  318 + [
  319 + "Rand",
  320 + "RandomPoint"
  321 + ],
  322 + [
  323 + "clou",
  324 + "cloudZ"
  325 + ],
  326 + [
  327 + "max",
  328 + "maxZ"
  329 + ],
  330 + [
  331 + "Cl",
  332 + "CloudPadding"
  333 + ],
  334 + [
  335 + "Cloud",
  336 + "CloudRange"
  337 + ],
  338 + [
  339 + "t",
  340 + "Translate"
  341 + ],
  342 + [
  343 + "Create",
  344 + "CreateCloud"
  345 + ],
  346 + [
  347 + "le",
  348 + "leftSize"
  349 + ],
  350 + [
  351 + "Si",
  352 + "SizeMax"
  353 + ],
  354 + [
  355 + "Size",
  356 + "SizeMin"
  357 + ],
  358 + [
  359 + "G",
  360 + "GameObject"
  361 + ],
  362 + [
  363 + "g",
  364 + "GameConfig"
  365 + ],
  366 + [
  367 + "Posi",
  368 + "Positions"
  369 + ],
  370 + [
  371 + "root",
  372 + "rootHeight"
  373 + ],
  374 + [
  375 + "lve",
  376 + "leavesWidth"
  377 + ],
  378 + [
  379 + "roo",
  380 + "rootWidth"
  381 + ],
  382 + [
  383 + "leav",
  384 + "leavesWidth"
  385 + ],
  386 + [
  387 + "ro",
  388 + "rootDark"
  389 + ],
  390 + [
  391 + "tree",
  392 + "treeSizeMax"
  393 + ],
  394 + [
  395 + "Ran",
  396 + "Range"
  397 + ],
  398 + [
  399 + "gam",
  400 + "gameObject"
  401 + ],
  402 + [
  403 + "Pos",
  404 + "Position"
  405 + ]
  406 + ]
  407 + },
  408 + "buffers":
  409 + [
  410 + {
  411 + "file": "app/src/inoChannel.cpp",
  412 + "settings":
  413 + {
  414 + "buffer_size": 3413,
  415 + "line_ending": "Unix"
  416 + }
  417 + },
  418 + {
  419 + "file": "app/src/inoChannel.h",
  420 + "settings":
  421 + {
  422 + "buffer_size": 1008,
  423 + "line_ending": "Unix"
  424 + }
  425 + }
  426 + ],
  427 + "build_system": "",
  428 + "build_system_choices":
  429 + [
  430 + ],
  431 + "build_varint": "",
  432 + "command_palette":
  433 + {
  434 + "height": 374.0,
  435 + "last_filter": "",
  436 + "selected_items":
  437 + [
  438 + [
  439 + "glue",
  440 + "Glue - Launch"
  441 + ],
  442 + [
  443 + "ins",
  444 + "Package Control: Install Package"
  445 + ],
  446 + [
  447 + "giti",
  448 + "Gitignore: New gitignore"
  449 + ],
  450 + [
  451 + "rei",
  452 + "Indentation: Reindent Lines"
  453 + ],
  454 + [
  455 + "rein",
  456 + "Indentation: Reindent Lines"
  457 + ],
  458 + [
  459 + "re",
  460 + "Indentation: Reindent Lines"
  461 + ],
  462 + [
  463 + "in",
  464 + "Package Control: Install Package"
  465 + ],
  466 + [
  467 + "ss text",
  468 + "Set Syntax: Plain Text"
  469 + ],
  470 + [
  471 + "ss l",
  472 + "Set Syntax: Lua"
  473 + ],
  474 + [
  475 + "inst",
  476 + "Package Control: Install Package"
  477 + ],
  478 + [
  479 + "pa",
  480 + "Package Control: Discover Packages"
  481 + ],
  482 + [
  483 + "pacl",
  484 + "Package Control: List Packages"
  485 + ]
  486 + ],
  487 + "width": 561.0
  488 + },
  489 + "console":
  490 + {
  491 + "height": 126.0,
  492 + "history":
  493 + [
  494 + "import urllib.request,os,hashlib; h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)"
  495 + ]
  496 + },
  497 + "distraction_free":
  498 + {
  499 + "menu_visible": true,
  500 + "show_minimap": false,
  501 + "show_open_files": false,
  502 + "show_tabs": false,
  503 + "side_bar_visible": false,
  504 + "status_bar_visible": false
  505 + },
  506 + "expanded_folders":
  507 + [
  508 + "/Users/cabul/Workspace/Heisenwave/app/src"
  509 + ],
  510 + "file_history":
  511 + [
  512 + "/Users/cabul/Workspace/Barcelona/Resources/slides/sharing/slides.tex",
  513 + "/Users/cabul/Workspace/Barcelona/TFG/references.bib",
  514 + "/Users/cabul/Workspace/Barcelona/TFG/main.tex",
  515 + "/Users/cabul/Workspace/Barcelona/TFG/chapters/ExperimentalSetup.tex",
  516 + "/Users/cabul/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings",
  517 + "/Users/cabul/Library/Application Support/Sublime Text 3/Packages/User/LaTeX.sublime-settings",
  518 + "/Users/cabul/Library/Application Support/Sublime Text 3/Packages/Default/Preferences.sublime-settings",
  519 + "/Users/cabul/Workspace/Barcelona/TFG/ExperimentalSetup.tex",
  520 + "/Users/cabul/Workspace/Barcelona/TFG/Introduction.tex",
  521 + "/Users/cabul/Workspace/Barcelona/TFG/BenchmarkSuite.tex",
  522 + "/Users/cabul/Workspace/Barcelona/TFG/TestsAnalysis.tex",
  523 + "/Users/cabul/Workspace/Barcelona/TFG/PrefetchOverview.tex",
  524 + "/Users/cabul/Workspace/Barcelona/TFG/Conclusion.tex",
  525 + "/Users/cabul/Workspace/Barcelona/TFG/Bibliography.bib",
  526 + "/Users/cabul/Downloads/testApp.cpp",
  527 + "/Users/cabul/Downloads/voronoi/source/Voronoi.cpp",
  528 + "/Users/cabul/Downloads/voronoi/source/vmath.inl",
  529 + "/Users/cabul/Downloads/voronoi/source/vmath.h",
  530 + "/Users/cabul/Downloads/voronoi/source/vmath.c",
  531 + "/Users/cabul/Downloads/voronoi/source/VEvent.h",
  532 + "/Users/cabul/Downloads/voronoi/source/VEdge.h",
  533 + "/Users/cabul/Downloads/voronoi/source/VParabola.h",
  534 + "/Users/cabul/Downloads/voronoi/source/VParabola.cpp",
  535 + "/Users/cabul/Downloads/voronoi/source/Voronoi.h",
  536 + "/Users/cabul/Downloads/super_serial/super_serial.cpp",
  537 + "/Users/cabul/Downloads/voronoi/source/VPoint.h",
  538 + "/Users/cabul/Downloads/ExampleCode/DCELHalfEdge.cpp",
  539 + "/Users/cabul/Downloads/vrld-hump-672a91b/vector.lua",
  540 + "/Users/cabul/Downloads/vrld-hump-672a91b/class.lua",
  541 + "/Users/cabul/Downloads/vrld-hump-672a91b/vector-light.lua",
  542 + "/Users/cabul/Downloads/vrld-hump-672a91b/timer.lua",
  543 + "/Users/cabul/Desktop/paraver_config/default/General/views/useful.cfg",
  544 + "/Applications/Paraver/cfgs/General/analysis/2dc_ud_ipc.cfg",
  545 + "/Users/cabul/Workspace/APP/simplec/app.sublime-project",
  546 + "/Users/cabul/Workspace/Love/skull/src/main.lua",
  547 + "/Users/cabul/Workspace/Love/skull/love.sublime-project",
  548 + "/Users/cabul/Workspace/Love/skull/Makefile",
  549 + "/Users/cabul/Workspace/Love/skull/src/room.lua",
  550 + "/Users/cabul/Workspace/Love/loveDemo/love.sublime-project",
  551 + "/Users/cabul/Desktop/sim/main.c",
  552 + "/Users/cabul/Desktop/microbench/main.c",
  553 + "/Users/cabul/Desktop/microbench/parser.h",
  554 + "/Users/cabul/Desktop/microbench/parser.c",
  555 + "/Users/cabul/Desktop/microbench/Makefile",
  556 + "/Users/cabul/Desktop/microbench/error.c",
  557 + "/Users/cabul/Desktop/tmp/error.h",
  558 + "/Users/cabul/Workspace/Love/Skull/Makefile",
  559 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameLogic/TurnSystem.cs",
  560 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameLogic/GameMaster.cs",
  561 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/UISystem.cs",
  562 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameLogic/Player.cs",
  563 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameLogic/Skills/Movement.cs",
  564 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameLogic/Skill.cs",
  565 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/Character.cs",
  566 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Environment/PlaceCharacters.cs",
  567 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/PlayerCharacter.cs",
  568 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Core/Singleton.cs",
  569 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/Ghost.cs",
  570 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Environment/MapGenerator.cs",
  571 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Environment/TreeGenerator.cs",
  572 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Environment/CloudGenerator.cs",
  573 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Environment/Environment.cs",
  574 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Environment/CenterOnScreen.cs",
  575 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Shaders/OutlineShader.shader",
  576 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/TerrainCell.cs",
  577 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Shaders/ComicShader.shader",
  578 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/OutlineCube.cs",
  579 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Core/Board.cs",
  580 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameLogic/CharacterSkill.cs",
  581 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/Selector.cs",
  582 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Shaders/CharacterShader.shader",
  583 + "/Users/cabul/Desktop/mail.txt",
  584 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Shaders/SingleColorTransparentTexture.shader",
  585 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Shaders/SingleColorTransparent.shader",
  586 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/CatchCollider.cs",
  587 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameLogic/Action.cs",
  588 + "/Users/cabul/Workspace/Medusa/3squad/Assets/Scripts/GameLogic/RaySelection.cs",
  589 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Environment/CloudBehaviour.cs",
  590 + "/Users/cabul/Workspace/Medusa/3squad/Assets/Scripts/GUI/CameraControl.cs",
  591 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Shaders/SelectionShader.shader",
  592 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameLogic/GameConfig.cs",
  593 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Environment/EnvironmentGenerator.cs",
  594 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/TreeGenerator.cs",
  595 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/BoardGenerator.cs",
  596 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Action.cs",
  597 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameConfiguration.cs",
  598 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GameMaster.cs",
  599 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Plugins/SimpleJSON.cs",
  600 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Shaders/TransparentColor.shader",
  601 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Core/Position.cs",
  602 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/SkillID.cs",
  603 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Player.cs",
  604 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Core/Layer.cs",
  605 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Core/Direction.cs",
  606 + "/Users/cabul/Workspace/Unity/Trisquad/trisquad.sublime-project",
  607 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/GUI/CameraControl.cs",
  608 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Interface/CameraControl.cs",
  609 + "/Users/cabul/Workspace/Medusa/3squad/Assets/Scripts/Skills/Movement.cs",
  610 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts/Core/BoardGenerator.cs",
  611 + "/Users/cabul/Workspace/Medusa/3squad/Assets/Scripts/Skills/ChangePosition.cs",
  612 + "/Users/cabul/Workspace/Medusa/3squad/3squad.sublime-project",
  613 + "/Users/cabul/Workspace/Medusa/3squad/Assets/Scripts/Core/Board.cs",
  614 + "/Users/cabul/Desktop/frases.txt",
  615 + "/Users/cabul/Workspace/CSharp/tmp/hello.cs",
  616 + "/Users/cabul/Workspace/CSharp/tmp/request.cs",
  617 + "/Users/cabul/Workspace/Love2D/pgTerrain/res/map.lua",
  618 + "/Users/cabul/Workspace/Love2D/pgTerrain/res/world.lua"
  619 + ],
  620 + "find":
  621 + {
  622 + "height": 23.0
  623 + },
  624 + "find_in_files":
  625 + {
  626 + "height": 91.0,
  627 + "where_history":
  628 + [
  629 + "/Users/cabul/Workspace/Unity/Trisquad/Assets/Scripts"
  630 + ]
  631 + },
  632 + "find_state":
  633 + {
  634 + "case_sensitive": false,
  635 + "find_history":
  636 + [
  637 + "TODO",
  638 + "reg",
  639 + "remin",
  640 + "spel",
  641 + "spell",
  642 + "(%s:%d) \",__FILE__,__LINE__",
  643 + "trem",
  644 + "ZoomCamera",
  645 + "RotateCamera",
  646 + "ToggleSkills",
  647 + "current",
  648 + "lastSelected",
  649 + "CharacterSkill",
  650 + "Character",
  651 + "PlayerCharacter",
  652 + "cb",
  653 + "CB",
  654 + "cb",
  655 + "CB",
  656 + "TimerCB",
  657 + "all",
  658 + "turns",
  659 + "Color.magenta",
  660 + "Selector",
  661 + "Select",
  662 + "Selector",
  663 + "gameObject",
  664 + "tWidt",
  665 + "sWidth",
  666 + "b2",
  667 + "border",