fastclockClient/fastclockClient.sublime-wor...

790 lines
26 KiB
Plaintext
Raw Permalink Normal View History

2018-01-24 16:51:07 +00:00
{
"auto_complete":
{
"selected_items":
[
[
"call",
"callbackUserdata"
],
[
"LL_",
"LL_INFO"
],
[
"is",
"isFastclock"
],
[
"Fastcloc",
"FastclockLoaded"
],
[
"text",
"textMessage"
],
[
"fase",
"false"
],
[
"fast",
"fastclock_message_t"
],
[
"fastcl",
"fastclockUpdateCallback"
]
]
},
"buffers":
[
{
"file": "src/main.c",
"settings":
{
"buffer_size": 3396,
"encoding": "UTF-8",
"line_ending": "Unix"
}
},
{
"file": "/Users/dirk/Library/Application Support/Sublime Text 3/Packages/User/mongoose.sublime-build",
"settings":
{
"buffer_size": 46,
"encoding": "UTF-8",
"line_ending": "Unix",
"name": "untitled.sublime-build"
}
},
{
"file": ".sublime-project",
"settings":
{
"buffer_size": 649,
"encoding": "UTF-8",
"line_ending": "Unix",
"name": "{"
}
},
{
"contents": "// display.c\n\n/*\n * Copyright (c) 2014-2017 Cesanta Software Limited\n * All rights reserved\n */\n\n#include <Arduino.h>\n#include <Adafruit_SSD1306.h>\n\n#include \"common/cs_dbg.h\"\n#include \"fw/src/mgos_app.h\"\n#include \"fw/src/mgos_timers.h\"\n\nAdafruit_SSD1306 *d1 = nullptr, *d2 = nullptr;\n\nstatic void timer_cb(void *arg);\n\nvoid setup(void) {\n // I2C\n d1 = new Adafruit_SSD1306(4 /* RST GPIO */, Adafruit_SSD1306::RES_128_64);\n\n if (d1 != nullptr) {\n d1->begin(SSD1306_SWITCHCAPVCC, 0x3D, true /* reset */);\n d1->display();\n }\n\n // SPI.\n // On ESP8266 SPI and I2C cannot be enabled at the same time by default\n // because their pins overlap.\n // You will need to disable I2C and enable SPI:\n // mos config-set i2c.enable=false spi.enable=true\n d2 = new Adafruit_SSD1306(21 /* DC */, 5 /* RST */, 17 /* CS */,\n Adafruit_SSD1306::RES_128_32);\n\n if (d2 != nullptr) {\n d2->begin(SSD1306_SWITCHCAPVCC, 0 /* unused */, true /* reset */);\n d2->display();\n }\n\n mgos_set_timer(1000 /* ms */, true /* repeat */, timer_cb, NULL);\n}\n\nstatic void show_num(Adafruit_SSD1306 *d, const char *s, int i) {\n d->clearDisplay();\n d->setTextSize(2);\n d->setTextColor(WHITE);\n d->setCursor(d->width() / 4, d->height() / 4);\n d->printf(\"%s%d\", s, i);\n d->display();\n}\n\nstatic void timer_cb(void *arg) {\n static int i = 0, j = 0;\n if (d1 != nullptr) show_num(d1, \"i = \", i);\n if (d2 != nullptr) show_num(d2, \"j = \", j);\n LOG(LL_INFO, (\"i = %d, j = %d\", i, j));\n i++;\n j++;\n (void) arg;\n}\n\n#if 0\nvoid loop(void) {\n /* For now, do not use delay() inside loop, use timers instead. */\n}\n#endif\n\n\n#if 0\n#include <stdio.h>\n\n#include \"common/cs_dbg.h\"\n#include \"fw/src/mgos_app.h\"\n#include \"fw/src/mgos_i2c.h\"\n#include \"fw/src/mgos_mongoose.h\"\n#include \"fw/src/mgos_utils.h\"\n\nstatic struct mgos_i2c *uOLED_i2c;\n\nstatic uint8_t from_hex(const char *s) {\n#define HEXTOI(x) (x >= '0' && x <= '9' ? x - '0' : x - 'W')\n int a = tolower(*(const unsigned char *) s);\n int b = tolower(*(const unsigned char *) (s + 1));\n return (HEXTOI(a) << 4) | HEXTOI(b);\n}\n\nenum mgos_app_init_result uOLED_i2cSetup() {\n\tstruct sys_config_i2c *cfg;\n\n\tuOLED_i2c = mgos_i2c_create(const struct sys_config_i2c *cfg);\n\treturn MGOS_APP_INIT_SUCCESS;\n}\n\nvoid uOLED_send_hexstring(struct mg_str *s) {\n\tbool ret = false;\n\tLOG(LL_INFO, (\"Got: [%.*s]\", (int) s->len, s->p));\n\tif (s->len >= 2) {\n\t int j = 0;\n\t // struct mgos_i2c *i2c = mgos_i2c_get_global();\n\t for (size_t i = 0; i < s->len; i += 2, j++) {\n\t ((uint8_t *) s->p)[j] = from_hex(s->p + i);\n\t }\n\t ret = mgos_i2c_write(uOLED_i2c, s->p[0], s->p + 1, j, true /* stop */);\n\t}\n}\n\n/** \\brief Write a byte over I2C\n\tWrite a byte to I2C device _address_. The DC byte determines whether\n\tthe data being sent is a command or display data. Use either I2C_COMMAND\n\tor I2C_DATA in that parameter. The data byte can be any 8-bit value.\n**/\nvoid uOLED_i2cWrite(byte address, byte dc, byte data)\n{\n\tWire.beginTransmission(address);\n\tWire.write(dc); // If data dc = 0, if command dc = 0x40\n\tWire.write(data);\n\tWire.endTransmission();\n}\n\n#endif\n",
"file": "src/display.c",
"file_size": 3099,
"file_write_time": 131405561000000000,
"settings":
{
"buffer_size": 3099,
"line_ending": "Unix"
}
},
{
"file": "mos.yml",
"settings":
{
"buffer_size": 1716,
"encoding": "UTF-8",
"line_ending": "Unix"
}
},
{
"file": "fs/init.js",
"settings":
{
"buffer_size": 3505,
"encoding": "UTF-8",
"line_ending": "Unix"
}
},
{
"file": "fs/api_fastclock.js",
"settings":
{
"buffer_size": 616,
"encoding": "UTF-8",
"line_ending": "Unix"
}
},
{
"file": "fs/index.htm",
"settings":
{
"buffer_size": 2522,
"encoding": "UTF-8",
"line_ending": "Unix"
}
},
{
"file": "fs/index.html",
"settings":
{
"buffer_size": 2504,
"encoding": "UTF-8",
"line_ending": "Unix"
}
},
{
"file": "fs/js_app.js",
"settings":
{
"buffer_size": 1664,
"encoding": "UTF-8",
"line_ending": "Unix"
}
},
{
"file": "src/fastclock_client.c",
"settings":
{
"buffer_size": 8364,
"encoding": "UTF-8",
"line_ending": "Unix",
"name": "// Fastclock Client"
}
},
{
"file": "doc/fastclock-protocol.md",
"settings":
{
"buffer_size": 4964,
"encoding": "UTF-8",
"line_ending": "Unix",
"name": "# Fastclock Protocol"
}
},
{
"contents": "Sample Markdown Cheat Sheet\n=========================== \n\nThis is a sample markdown file to help you write Markdown quickly :)\n\nIf you use the fabulous [Sublime Text 2/3 editor][ST] along with the [Markdown Preview plugin][MarkdownPreview], open your ST2 Palette with `CMD+⇧+P` then choose `Markdown Preview in browser` to see the result in your browser.\n\n## Text basics\nthis is *italic* and this is **bold** . another _italic_ and another __bold__\n\nthis is `important` text. and percentage signs : % and `%`\n\nThis is a paragraph with a footnote (builtin parser only). [^note-id]\n\nInsert `[ TOC ]` without spaces to generate a table of contents (builtin parsers only).\n\n## Indentation\n> Here is some indented text\n>> even more indented\n\n## Titles\n# Big title (h1)\n## Middle title (h2)\n### Smaller title (h3)\n#### and so on (hX)\n##### and so on (hX)\n###### and so on (hX)\n\n## Example lists (1)\n\n - bullets can be `-`, `+`, or `*`\n - bullet list 1\n - bullet list 2\n - sub item 1\n - sub item 2\n\n with indented text inside\n\n - bullet list 3\n + bullet list 4\n * bullet list 5\n\n## Links\n\nThis is an [example inline link](http://lmgtfy.com/) and [another one with a title](http://lmgtfy.com/ \"Hello, world\").\n\nLinks can also be reference based : [reference 1][ref1] or [reference 2 with title][ref2].\n\nReferences are usually placed at the bottom of the document\n\n## Images\n\nA sample image :\n\n![revolunet logo](http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg \"revolunet logo\")\n\nAs links, images can also use references instead of inline links :\n\n![revolunet logo][revolunet-logo]\n\n\n## Code\n\nIt's quite easy to show code in markdown files.\n\nBackticks can be used to `highlight` some words.\n\nAlso, any indented block is considered a code block. If `enable_highlight` is `true`, syntax highlighting will be included (for the builtin parser - the github parser does this automatically).\n\n <script>\n document.location = 'http://lmgtfy.com/?q=markdown+cheat+sheet';\n </script>\n\n## Math\n\nWhen `enable_mathjax` is `true`, inline math can be included \\\\(\\frac{\\pi}{2}\\\\) $\\pi$\n\nAlternatively, math can be written on its own line:\n\n$$F(\\omega) = \\frac{1}{\\sqrt{2\\pi}} \\int_{-\\infty}^{\\infty} f(t) \\, e^{ - i \\omega t}dt$$\n\n\\\\[\\int_0^1 f(t) \\mathrm{d}t\\\\]\n\n\\\\[\\sum_j \\gamma_j^2/d_j\\\\]\n\n\n\n## GitHub Flavored Markdown\n\nIf you use the Github parser, you can use some of [Github Flavored Markdown][gfm] syntax :\n\n * User/Project@SHA: revolunet/sublimetext-markdown-preview@7da61badeda468b5019869d11000307e07e07401\n * User/Project#Issue: revolunet/sublimetext-markdown-preview#1\n * User : @revolunet\n\nSome Python code :\n\n```python\nimport random\n\nclass CardGame(object):\n \"\"\" a sample python class \"\"\"\n NB_CARDS = 32\n def __init__(self, cards=5):\n self.cards = random.sample(range(self.NB_CARDS), 5)\n print 'ready to play'\n```\n\nSome Javascript code :\n\n```js\nvar config = {\n duration: 5,\n comment: 'WTF'\n}\n// callbacks beauty un action\nasync_call('/path/to/api', function(json) {\n another_call(json, function(result2) {\n another_another_call(result2, function(result3) {\n another_another_another_call(result3, function(result4) {\n alert('And if all went well, i got my result :)');\n });\n });\n });\n})\n```\n\nThe Github Markdown also brings some [nice Emoji support][emoji] : :+1: :heart: :beer:\n\n[^note-id]: This is the text of the note. \n\n## Parsers and Extensions\n\nMarkdown Preview comes with **Python-Markdown** preloaded.\n\n### *Python-Markdown*\n\nThe [Python-Markdown Parser][] provides support for several extensions.\n\n[Python-Markdown Parser]: https://github.com/waylan/Python-Markdown\n\n#### Extra Extensions\n\n* `abbr` -- [Abbreviations][]\n* `attr_list` -- [Attribute Lists][]\n* `def_list` -- [Definition Lists][]\n* `fenced_code` -- [Fenced Code Blocks][]\n* `footnotes` -- [Footno
"settings":
{
"buffer_size": 9004,
"line_ending": "Unix",
"name": "Markdown Cheatsheet",
"scratch": true
}
},
{
"file": "src/fastclock_client.h",
"settings":
{
"buffer_size": 1353,
"encoding": "UTF-8",
"line_ending": "Unix",
"name": "// Fastclock Client"
}
}
],
"build_system": "",
"build_system_choices":
[
],
"build_varint": "",
"command_palette":
{
"height": 287.0,
"last_filter": "mark",
"selected_items":
[
[
"mark",
"Markdown Preview: Preview in Browser"
],
[
"pack",
"Package Control: Install Package"
]
],
"width": 449.0
},
"console":
{
"height": 126.0,
"history":
[
]
},
"distraction_free":
{
"menu_visible": true,
"show_minimap": false,
"show_open_files": false,
"show_tabs": false,
"side_bar_visible": false,
"status_bar_visible": false
},
"expanded_folders":
[
"/Users/dirk/Projects/Mongoose/fastclockClient",
"/Users/dirk/Projects/Mongoose/fastclockClient/build/gen",
"/Users/dirk/Projects/Mongoose/fastclockClient/src"
],
"file_history":
[
"/Users/dirk/Projects/Mongoose/fastclockClient/src/conf_schema.yaml",
"/Users/dirk/Projects/Mongoose/fastclockClient/src/display.c",
"/Users/dirk/Projects/Mongoose/fastclockClient/fs/css_app.css",
"/Users/dirk/Projects/Mongoose/lightning/src/main.c",
"/Users/dirk/Downloads/electron-api.json",
"/Users/dirk/Projects/fhem/index.html",
"/Users/dirk/cloud/documents/Modellbahn/Rillenschiene/Rillenschiene-Schablone-N-v4.svg",
"/Users/dirk/cloud/documents/Modellbahn/Rillenschiene/Rillenschiene-Schablone-N-v3.svg",
"/Users/dirk/Documents/Kitematic/hello-world-nginx/website_files/index.html",
"/Users/dirk/Projects/fr3dl/models/loco.js",
"/Users/dirk/Projects/kivy/test1/weather.kv",
"/Users/dirk/Projects/kivy/test1/main.py",
"/Users/dirk/Desktop/TreffenZeitgleichMitJHV.txt",
"/Users/dirk/Downloads/fremo-members (1).csv",
"/Users/dirk/synced/EigeneDateien/containerschiff/Container/Plan/conv/spantriss.svg",
"/Users/dirk/Downloads/phpbb_auth_0/sv1/class.tx_phpbbauth_sv1.php",
"/Users/dirk/Projects/ember.js/starter-kit-1.0.0/index.html",
"/Users/dirk/Projects/ember.js/starter-kit-1.0.0/css/style.css",
"/Users/dirk/Projects/ember.js/starter-kit-1.0.0/css/normalize.css"
],
"find":
{
"height": 23.0
},
"find_in_files":
{
"height": 0.0,
"where_history":
[
]
},
"find_state":
{
"case_sensitive": false,
"find_history":
[
"Tock",
"handler",
"img/",
"on_wifi_change",
"boolean",
"bool",
"boole"
],
"highlight": true,
"in_selection": false,
"preserve_case": false,
"regex": false,
"replace_history":
[
],
"reverse": false,
"show_context": true,
"use_buffer2": true,
"whole_word": false,
"wrap": true
},
"groups":
[
{
"selected": 4,
"sheets":
[
{
"buffer": 0,
"file": "src/main.c",
"semi_transient": false,
"settings":
{
"buffer_size": 3396,
"regions":
{
},
"selection":
[
[
1272,
1272
]
],
"settings":
{
"syntax": "Packages/C++/C.sublime-syntax",
"tab_size": 2,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 3,
"type": "text"
},
{
"buffer": 1,
"file": "/Users/dirk/Library/Application Support/Sublime Text 3/Packages/User/mongoose.sublime-build",
"semi_transient": false,
"settings":
{
"buffer_size": 46,
"regions":
{
},
"selection":
[
[
46,
46
]
],
"settings":
{
"syntax": "Packages/JavaScript/JSON.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 2,
"type": "text"
},
{
"buffer": 2,
"file": ".sublime-project",
"semi_transient": false,
"settings":
{
"buffer_size": 649,
"regions":
{
},
"selection":
[
[
368,
368
]
],
"settings":
{
"auto_name": "{",
"syntax": "Packages/Text/Plain text.tmLanguage",
"tab_size": 4,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 1,
"type": "text"
},
{
"buffer": 3,
"file": "src/display.c",
"semi_transient": false,
"settings":
{
"buffer_size": 3099,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"syntax": "Packages/C++/C.sublime-syntax",
"tab_size": 2,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 5,
"type": "text"
},
{
"buffer": 4,
"file": "mos.yml",
"semi_transient": false,
"settings":
{
"buffer_size": 1716,
"regions":
{
},
"selection":
[
[
1188,
1188
]
],
"settings":
{
"syntax": "Packages/YAML/YAML.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 0,
"type": "text"
},
{
"buffer": 5,
"file": "fs/init.js",
"semi_transient": false,
"settings":
{
"buffer_size": 3505,
"regions":
{
},
"selection":
[
[
395,
395
]
],
"settings":
{
"syntax": "Packages/JavaScript/JavaScript.sublime-syntax",
"tab_size": 2,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 7,
"type": "text"
},
{
"buffer": 6,
"file": "fs/api_fastclock.js",
"semi_transient": false,
"settings":
{
"buffer_size": 616,
"regions":
{
},
"selection":
[
[
609,
609
]
],
"settings":
{
"syntax": "Packages/JavaScript/JavaScript.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 6,
"type": "text"
},
{
"buffer": 7,
"file": "fs/index.htm",
"semi_transient": false,
"settings":
{
"buffer_size": 2522,
"regions":
{
},
"selection":
[
[
0,
2522
]
],
"settings":
{
"syntax": "Packages/HTML/HTML.sublime-syntax",
"tab_size": 2,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 10,
"type": "text"
},
{
"buffer": 8,
"file": "fs/index.html",
"semi_transient": false,
"settings":
{
"buffer_size": 2504,
"regions":
{
},
"selection":
[
[
320,
320
]
],
"settings":
{
"syntax": "Packages/HTML/HTML.sublime-syntax",
"tab_size": 2,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 13,
"type": "text"
},
{
"buffer": 9,
"file": "fs/js_app.js",
"semi_transient": false,
"settings":
{
"buffer_size": 1664,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"syntax": "Packages/JavaScript/JavaScript.sublime-syntax",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 8,
"type": "text"
},
{
"buffer": 10,
"file": "src/fastclock_client.c",
"semi_transient": false,
"settings":
{
"buffer_size": 8364,
"regions":
{
},
"selection":
[
[
4792,
4792
]
],
"settings":
{
"auto_name": "// Fastclock Client",
"syntax": "Packages/C++/C.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 2468.0,
"zoom_level": 1.0
},
"stack_index": 12,
"type": "text"
},
{
"buffer": 11,
"file": "doc/fastclock-protocol.md",
"semi_transient": false,
"settings":
{
"buffer_size": 4964,
"regions":
{
},
"selection":
[
[
1516,
1516
]
],
"settings":
{
"auto_name": "# Fastclock Protocol",
"parser": "markdown",
"syntax": "Packages/Markdown/Markdown.sublime-syntax",
"target": "browser"
},
"translation.x": 0.0,
"translation.y": 234.0,
"zoom_level": 1.0
},
"stack_index": 11,
"type": "text"
},
{
"buffer": 12,
"semi_transient": false,
"settings":
{
"buffer_size": 9004,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"syntax": "Packages/Text/Plain text.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 4,
"type": "text"
},
{
"buffer": 13,
"file": "src/fastclock_client.h",
"semi_transient": false,
"settings":
{
"buffer_size": 1353,
"regions":
{
},
"selection":
[
[
1287,
1287
]
],
"settings":
{
"auto_name": "// Fastclock Client",
"syntax": "Packages/C++/C++.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 18.0,
"zoom_level": 1.0
},
"stack_index": 9,
"type": "text"
}
]
}
],
"incremental_find":
{
"height": 23.0
},
"input":
{
"height": 31.0
},
"layout":
{
"cells":
[
[
0,
0,
1,
1
]
],
"cols":
[
0.0,
1.0
],
"rows":
[
0.0,
1.0
]
},
"menu_visible": true,
"output.exec":
{
"height": 158.0
},
"output.find_results":
{
"height": 0.0
},
"output.unsaved_changes":
{
"height": 100.0
},
"pinned_build_system": "Packages/User/mongoose.sublime-build",
"project": "fastclockClient.sublime-project",
"replace":
{
"height": 42.0
},
"save_all_on_build": true,
"select_file":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"select_project":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"select_symbol":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"selected_group": 0,
"settings":
{
},
"show_minimap": true,
"show_open_files": true,
"show_tabs": true,
"side_bar_visible": true,
"side_bar_width": 150.0,
"status_bar_visible": true,
"template_settings":
{
}
}