Browse Source

YAY Finally

master
Ambrose Chua 8 years ago
parent
commit
408cb00b04
  1. 169
      arduinowiflynodebot.ino
  2. BIN
      client.app/Contents/Frameworks/crash_inspector
  3. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Libraries/ffmpegsumo.so
  4. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/English.lproj/HttpAuth.nib
  5. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/am.pak
  6. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ar.pak
  7. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/bg.pak
  8. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/bn.pak
  9. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ca.pak
  10. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/cs.pak
  11. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/da.pak
  12. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/de.pak
  13. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/el.pak
  14. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/en-GB.pak
  15. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/en-US.pak
  16. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/es-419.pak
  17. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/es.pak
  18. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/et.pak
  19. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/fa.pak
  20. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/fi.pak
  21. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/fil.pak
  22. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/fr.pak
  23. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/gu.pak
  24. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/hi.pak
  25. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/hr.pak
  26. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/hu.pak
  27. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/id.pak
  28. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/it.pak
  29. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/iw.pak
  30. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ja.pak
  31. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/kn.pak
  32. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ko.pak
  33. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/lt.pak
  34. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/lv.pak
  35. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ml.pak
  36. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/mr.pak
  37. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ms.pak
  38. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/nl.pak
  39. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/no.pak
  40. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/nw.pak
  41. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/pl.pak
  42. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/pt-BR.pak
  43. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/pt-PT.pak
  44. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ro.pak
  45. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ru.pak
  46. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sk.pak
  47. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sl.pak
  48. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sr.pak
  49. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sv.pak
  50. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sw.pak
  51. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ta.pak
  52. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/te.pak
  53. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/th.pak
  54. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/tr.pak
  55. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/uk.pak
  56. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/vi.pak
  57. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/zh-CN.pak
  58. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/zh-TW.pak
  59. BIN
      client.app/Contents/Frameworks/node-webkit Framework.framework/node-webkit Framework
  60. 5469
      client.app/Contents/Frameworks/node-webkit Framework.framework/node-webkit Framework.TOC
  61. 5469
      client.app/Contents/Frameworks/node-webkit Framework.framework/node-webkit Framework.tmp
  62. 46
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Info.plist
  63. BIN
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/MacOS/node-webkit Helper EH
  64. 1
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/PkgInfo
  65. BIN
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_inspector
  66. 32
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/Info.plist
  67. BIN
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender
  68. 1
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/PkgInfo
  69. BIN
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib
  70. BIN
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings
  71. BIN
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns
  72. BIN
      client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/nw.icns
  73. 46
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Info.plist
  74. BIN
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/MacOS/node-webkit Helper NP
  75. 1
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/PkgInfo
  76. BIN
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_inspector
  77. 32
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/Info.plist
  78. BIN
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender
  79. 1
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/PkgInfo
  80. BIN
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib
  81. BIN
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings
  82. BIN
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns
  83. BIN
      client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/nw.icns
  84. 46
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Info.plist
  85. BIN
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/MacOS/node-webkit Helper
  86. 1
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/PkgInfo
  87. BIN
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_inspector
  88. 32
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/Info.plist
  89. BIN
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender
  90. 1
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/PkgInfo
  91. BIN
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib
  92. BIN
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings
  93. BIN
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns
  94. BIN
      client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/nw.icns
  95. 74
      client.app/Contents/Info.plist
  96. BIN
      client.app/Contents/MacOS/node-webkit
  97. 1
      client.app/Contents/PkgInfo
  98. 111
      client.app/Contents/Resources/app.nw/index.html
  99. 4
      client.app/Contents/Resources/app.nw/jquery-2.1.0.min.js
  100. 147
      client.app/Contents/Resources/app.nw/keymap.js

169
arduinowiflynodebot.ino

@ -0,0 +1,169 @@
//motor A connected between A01 and A02
//motor B connected between B01 and B02
// http://opensource.org/licenses/mit-license.php
#include <WiFly.h>
#include <SPI.h>
int STBY = 10; //standby
//Motor A
int PWMA = 3; //Speed control
int AIN1 = 9; //Direction
int AIN2 = 8; //Direction
//Motor B
int PWMB = 5; //Speed control
int BIN1 = 11; //Direction
int BIN2 = 12; //Direction
int infoled = 13;
//char ssid[] = "Chua Family";
//char passphrase[] = "chua2680";
WiFlyServer server(44);
String readString = "";
String dir;
void setup(){
Serial.begin(9600);
pinMode(STBY, OUTPUT);
pinMode(PWMA, OUTPUT);
pinMode(AIN1, OUTPUT);
pinMode(AIN2, OUTPUT);
pinMode(PWMB, OUTPUT);
pinMode(BIN1, OUTPUT);
pinMode(BIN2, OUTPUT);
WiFly.setUart(&Serial);
WiFly.begin(true);
// if (!WiFly.join(ssid, passphrase)) {
if (!WiFly.createAdHocNetwork("wifly")) {
while (1) {
// Hang on failure.
digitalWrite(infoled, HIGH);
delay(300);
digitalWrite(infoled, LOW);
delay(500);
}
}
Serial.println(WiFly.ip());
server.begin();
}
void loop() {
WiFlyClient client = server.available();
if (client) {
digitalWrite(infoled, HIGH);
while (client.connected()) {
if (client.available()) {
char c = client.read();
// if (readString.length() < 100) {
// readString += c;
// }
String d = (String) c;
parseanddo(d);
// client.println("LEEEEEEL: " + d);
}
}
// give the web browser time to receive the data
// delay(200);
readString = "";
client.stop();
digitalWrite(infoled, LOW);
}
}
void parseanddo(String incar) {
if (incar == "w") {
move(1, 255, 0);
move(2, 255, 0);
}
else if (incar == "s") {
move(1, 255, 1);
move(2, 255, 1);
}
else if (incar == "a") {
move(1, 255, 0);
move(2, 0, 0);
}
else if (incar == "d") {
move(1, 0, 0);
move(2, 255, 0);
}
else if (incar == "q") {
move(1, 255, 0);
move(2, 127, 0);
}
else if (incar == "e") {
move(1, 127, 0);
move(2, 255, 0);
}
else {
stop();
}
}
//void blink() {
//
// digitalWrite(infoled, HIGH);
// delay(300);
// digitalWrite(infoled, LOW);
// delay(500);
// digitalWrite(infoled, HIGH);
// delay(300);
// digitalWrite(infoled, LOW);
// delay(500);
// digitalWrite(infoled, HIGH);
// delay(300);
// digitalWrite(infoled, LOW);
// delay(500);
// digitalWrite(infoled, HIGH);
// delay(300);
// digitalWrite(infoled, LOW);
// delay(500);
// digitalWrite(infoled, HIGH);
// delay(300);
// digitalWrite(infoled, LOW);
// delay(500);
//
//}
void move(int motor, int speed, int direction){
//Move specific motor at speed and direction
//motor: 0 for B 1 for A
//speed: 0 is off, and 255 is full speed
//direction: 0 clockwise, 1 counter-clockwise
digitalWrite(STBY, HIGH); //disable standby
boolean inPin1 = LOW;
boolean inPin2 = HIGH;
if(direction == 1){
inPin1 = HIGH;
inPin2 = LOW;
}
if(motor == 1){
digitalWrite(AIN1, inPin1);
digitalWrite(AIN2, inPin2);
analogWrite(PWMA, speed);
}
else{
digitalWrite(BIN1, inPin1);
digitalWrite(BIN2, inPin2);
analogWrite(PWMB, speed);
}
}
void stop(){
//enable standby
digitalWrite(STBY, LOW);
}

BIN
client.app/Contents/Frameworks/crash_inspector

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Libraries/ffmpegsumo.so

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/English.lproj/HttpAuth.nib

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/am.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ar.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/bg.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/bn.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ca.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/cs.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/da.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/de.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/el.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/en-GB.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/en-US.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/es-419.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/es.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/et.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/fa.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/fi.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/fil.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/fr.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/gu.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/hi.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/hr.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/hu.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/id.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/it.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/iw.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ja.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/kn.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ko.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/lt.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/lv.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ml.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/mr.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ms.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/nl.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/no.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/nw.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/pl.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/pt-BR.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/pt-PT.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ro.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ru.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sk.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sl.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sr.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sv.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/sw.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/ta.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/te.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/th.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/tr.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/uk.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/vi.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/zh-CN.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/Resources/zh-TW.pak

BIN
client.app/Contents/Frameworks/node-webkit Framework.framework/node-webkit Framework

5469
client.app/Contents/Frameworks/node-webkit Framework.framework/node-webkit Framework.TOC
File diff suppressed because it is too large
View File

5469
client.app/Contents/Frameworks/node-webkit Framework.framework/node-webkit Framework.tmp
File diff suppressed because it is too large
View File

46
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Info.plist

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12C3006</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>node-webkit Helper EH</string>
<key>CFBundleExecutable</key>
<string>node-webkit Helper EH</string>
<key>CFBundleIdentifier</key>
<string>com.intel.nw.helper.EH</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>node-webkit Helper EH</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>32.0.1700.107</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1700.107</string>
<key>DTSDKBuild</key>
<string>11E52</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0452</string>
<key>DTXcodeBuild</key>
<string>4G2008a</string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SCMRevision</key>
<string>239963</string>
</dict>
</plist>

BIN
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/MacOS/node-webkit Helper EH

1
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/PkgInfo

@ -0,0 +1 @@
APPL????

BIN
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_inspector

32
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/Info.plist

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>crash_report_sender</string>
<key>CFBundleExecutable</key>
<string>crash_report_sender</string>
<key>CFBundleIconFile</key>
<string>crash_report_sender</string>
<key>CFBundleIdentifier</key>
<string>com.Breakpad.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>crash_report_sender</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSHasLocalizedDisplayName</key>
<true/>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

BIN
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender

1
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/PkgInfo

@ -0,0 +1 @@
APPL????

BIN
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib

BIN
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings

BIN
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns

BIN
client.app/Contents/Frameworks/node-webkit Helper EH.app/Contents/Resources/nw.icns

46
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Info.plist

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12C3006</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>node-webkit Helper NP</string>
<key>CFBundleExecutable</key>
<string>node-webkit Helper NP</string>
<key>CFBundleIdentifier</key>
<string>com.intel.nw.helper.NP</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>node-webkit Helper NP</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>32.0.1700.107</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1700.107</string>
<key>DTSDKBuild</key>
<string>11E52</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0452</string>
<key>DTXcodeBuild</key>
<string>4G2008a</string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SCMRevision</key>
<string>239963</string>
</dict>
</plist>

BIN
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/MacOS/node-webkit Helper NP

1
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/PkgInfo

@ -0,0 +1 @@
APPL????

BIN
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_inspector

32
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/Info.plist

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>crash_report_sender</string>
<key>CFBundleExecutable</key>
<string>crash_report_sender</string>
<key>CFBundleIconFile</key>
<string>crash_report_sender</string>
<key>CFBundleIdentifier</key>
<string>com.Breakpad.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>crash_report_sender</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSHasLocalizedDisplayName</key>
<true/>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

BIN
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender

1
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/PkgInfo

@ -0,0 +1 @@
APPL????

BIN
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib

BIN
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings

BIN
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns

BIN
client.app/Contents/Frameworks/node-webkit Helper NP.app/Contents/Resources/nw.icns

46
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Info.plist

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12C3006</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>node-webkit Helper</string>
<key>CFBundleExecutable</key>
<string>node-webkit Helper</string>
<key>CFBundleIdentifier</key>
<string>com.intel.nw.helper</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>node-webkit Helper</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>32.0.1700.107</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1700.107</string>
<key>DTSDKBuild</key>
<string>11E52</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0452</string>
<key>DTXcodeBuild</key>
<string>4G2008a</string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SCMRevision</key>
<string>239963</string>
</dict>
</plist>

BIN
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/MacOS/node-webkit Helper

1
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/PkgInfo

@ -0,0 +1 @@
APPL????

BIN
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_inspector

32
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/Info.plist

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>crash_report_sender</string>
<key>CFBundleExecutable</key>
<string>crash_report_sender</string>
<key>CFBundleIconFile</key>
<string>crash_report_sender</string>
<key>CFBundleIdentifier</key>
<string>com.Breakpad.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>crash_report_sender</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSHasLocalizedDisplayName</key>
<true/>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

BIN
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender

1
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/PkgInfo

@ -0,0 +1 @@
APPL????

BIN
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib

BIN
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings

BIN
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns

BIN
client.app/Contents/Frameworks/node-webkit Helper.app/Contents/Resources/nw.icns

74
client.app/Contents/Info.plist

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12C3006</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>node-webkit</string>
<key>CFBundleExecutable</key>
<string>node-webkit</string>
<key>CFBundleIconFile</key>
<string>nw.icns</string>
<key>CFBundleIdentifier</key>
<string>com.intel.nw</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>node-webkit</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>32.0.1700.107</string>
<key>CFBundleVersion</key>
<string>1700.107</string>
<key>DTSDKBuild</key>
<string>11E52</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0452</string>
<key>DTXcodeBuild</key>
<string>4G2008a</string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SCMRevision</key>
<string>239963</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>com.pkware.zip-archive</string>
</array>
<key>UTTypeDescription</key>
<string>node-webkit App</string>
<key>UTTypeIconFile</key>
<string>nw.icns</string>
<key>UTTypeIdentifier</key>
<string>com.intel.nw.app</string>
<key>UTTypeReferenceURL</key>
<string>https://github.com/rogerwang/node-webkit/wiki/How-to-package-and-distribute-your-apps</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>node-webkit</string>
<key>public.filename-extension</key>
<array>
<string>nw</string>
</array>
<key>public.mime-type</key>
<string>application/x-node-webkit-app</string>
</dict>
</dict>
</array>
</dict>
</plist>

BIN
client.app/Contents/MacOS/node-webkit

1
client.app/Contents/PkgInfo

@ -0,0 +1 @@
APPL????

111
client.app/Contents/Resources/app.nw/index.html

@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Client</title>
<style>
* {
padding: 0;
margin: 0;
}
body {
background-color: rgb(237, 237, 237);
border-top: 1px solid rgb(105, 105, 105);
text-align: center;
}
.man {
text-align: left;
margin: 0 auto;
width: 520px;
}
</style>
</head>
<body>
<pre class="man">
____ _ _ _
Arduino / ___| (_) ___ _ __ | |_
Bot | | | | |/ _ \ '_ \| __|
| |___| | | __/ | | | |_
\____|_|_|\___|_| |_|\__|
By Ambrose Chua
Powered by NodeJS, node-webkit,
Arduino and WiFly.
Code under WTFPL.
</pre>
<script src="jquery-2.1.0.min.js"></script>
<script>
var keymap = require("./keymap.js");
var gui = require('nw.gui');
gui.Window.get().showDevTools();
var net = require("net");
var socket = new net.Socket();
socket.setEncoding("utf8");
var keymap;
var soc = socket.connect(44, "169.254.1.1", function () {
soc.on("data", function (data) {
console.log(data);
});
console.log("yay");
$(document).ready(function () {
// $.ajax({
// url: 'keymap.json',
// dataType: 'json',
// success: function (response) {
// keymap = response;
// console.log(keymap);
$(window).on("keydown", function (e) {
// TODO: Add speed control.
if (e.which == keymap.KEYCODES["w"]) {
soc.write("w");
}
else if (e.which == keymap.KEYCODES["s"]) {
soc.write("s");
}
else if (e.which == keymap.KEYCODES["a"]) {
soc.write("a");
}
else if (e.which == keymap.KEYCODES["d"]) {
soc.write("d");
}
else if (e.which == keymap.KEYCODES["q"]) {
soc.write("q");
}
else if (e.which == keymap.KEYCODES["e"]) {
soc.write("e");
}
});
$(window).on("keyup", function (e) {
if (e.which == keymap.KEYCODES["w"] || e.which == keymap.KEYCODES["s"] || e.which == keymap.KEYCODES["a"] || e.which == keymap.KEYCODES["d"] || e.which == keymap.KEYCODES["q"] || e.which == keymap.KEYCODES["e"]) {
soc.write("n");
}
// if (e.which == 71) {
// soc.write("n");
// }
// else if (e.which == 72) {
// soc.write("n");
// }
});
// }
// });
});
});
</script>
</body>
</html>

4
client.app/Contents/Resources/app.nw/jquery-2.1.0.min.js
File diff suppressed because it is too large
View File

147
client.app/Contents/Resources/app.nw/keymap.js

@ -0,0 +1,147 @@
module.exports = {
/**
* The most common keycodes defined by :
* @type {Object.}
* @const
*/
KEYMAP : {
STRG: 17,
CTRL: 17,
CTRLRIGHT: 18,
CTRLR: 18,
SHIFT: 16,
RETURN: 13,
ENTER: 13,
BACKSPACE: 8,
BCKSP:8,
ALT: 18,
ALTR: 17,
ALTRIGHT: 17,
SPACE: 32,
WIN: 91,
MAC: 91,
FN: null,
UP: 38,
DOWN: 40,
LEFT: 37,
RIGHT: 39,
ESC: 27,
DEL: 46,
F1: 112,
F2: 113,
F3: 114,
F4: 115,
F5: 116,
F6: 117,
F7: 118,
F8: 119,
F9: 120,
F10: 121,
F11: 122,
F12: 123
},
/**
* @type {Object.}
* @const
*/
KEYCODES : {
'backspace' : '8',
'tab' : '9',
'enter' : '13',
'shift' : '16',
'ctrl' : '17',
'alt' : '18',
'pause_break' : '19',
'caps_lock' : '20',
'escape' : '27',
'page_up' : '33',
'page down' : '34',
'end' : '35',
'home' : '36',
'left_arrow' : '37',
'up_arrow' : '38',
'right_arrow' : '39',
'down_arrow' : '40',
'insert' : '45',
'delete' : '46',
'0' : '48',
'1' : '49',
'2' : '50',
'3' : '51',
'4' : '52',
'5' : '53',
'6' : '54',
'7' : '55',
'8' : '56',
'9' : '57',
'a' : '65',
'b' : '66',
'c' : '67',
'd' : '68',
'e' : '69',
'f' : '70',
'g' : '71',
'h' : '72',
'i' : '73',
'j' : '74',
'k' : '75',
'l' : '76',
'm' : '77',
'n' : '78',
'o' : '79',
'p' : '80',
'q' : '81',
'r' : '82',
's' : '83',
't' : '84',
'u' : '85',
'v' : '86',
'w' : '87',
'x' : '88',
'y' : '89',
'z' : '90',
'left_window key' : '91',
'right_window key' : '92',
'select_key' : '93',
'numpad 0' : '96',
'numpad 1' : '97',
'numpad 2' : '98',
'numpad 3' : '99',
'numpad 4' : '100',
'numpad 5' : '101',
'numpad 6' : '102',
'numpad 7' : '103',
'numpad 8' : '104',
'numpad 9' : '105',
'multiply' : '106',
'add' : '107',
'subtract' : '109',
'decimal point' : '110',
'divide' : '111',
'f1' : '112',
'f2' : '113',
'f3' : '114',
'f4' : '115',
'f5' : '116',
'f6' : '117',
'f7' : '118',
'f8' : '119',
'f9' : '120',
'f10' : '121',
'f11' : '122',
'f12' : '123',
'num_lock' : '144',
'scroll_lock' : '145',
'semi_colon' : '186',
'equal_sign' : '187',
'comma' : '188',
'dash' : '189',
'period' : '190',
'forward_slash' : '191',
'grave_accent' : '192',
'open_bracket' : '219',
'backslash' : '220',
'closebracket' : '221',
'single_quote' : '222'
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save