Skip to content

Commit

Permalink
Some local changes, ensuring remote is up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeeva committed Sep 18, 2016
1 parent e173c3d commit 3ed2062
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 46 deletions.
Binary file modified IoT-Cube-API/.vs/Arduino_IoT_LED_Cube_API/v14/.suo
Binary file not shown.
50 changes: 6 additions & 44 deletions IoT-Cube-API/Arduino_IoT_LED_Cube_API/Scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,15 @@
function railGun() {
$.ajax({
cache: false,
url: 'CubeControl/SendCommand/0',
url: 'GDO/ToggleDoor',
type: 'GET',
data: "",
success: function (data) {
if (data != null) {
if (data.Message == "Already executed") alert("Cannot play this animation again. Please choose another animation.");
} else {
alert("An error has occurred.");
}
},
error: function (e) {
alert("An error has occurred.");
}
});
}

function cornerCube() {
$.ajax({
cache: false,
url: 'CubeControl/SendCommand/1',
type: 'GET',
data: "",
success: function (data) {
if (data != null) {
if (data.Message == "Already executed") alert("Cannot play this animation again. Please choose another animation.");
} else {
alert("An error has occurred.");
}
},
error: function (e) {
alert("An error has occurred.");
}
});
}

function risingX() {
$.ajax({
cache: false,
url: 'CubeControl/SendCommand/2',
type: 'GET',
data: "",
success: function (data) {
if (data != null) {
if (data.Message == "Already executed") alert("Cannot play this animation again. Please choose another animation.");
} else {
alert("An error has occurred.");
}
//if (data != null) {
// if (data.Message == "Already executed") alert("Cannot play this animation again. Please choose another animation.");
//} else {
// alert("An error has occurred.");
//}
},
error: function (e) {
alert("An error has occurred.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ void setup(){
}

void draw(){
input = loadStrings("http://192.168.0.10:51111/Commands/commands.txt");
input = loadStrings("http://192.168.0.15:51111/Commands/commands.txt");
if (input != null && input.length != 0){
String s_last = input[0];
delay(200);
input = loadStrings("http://192.168.0.10:51111/Commands/commands.txt");
input = loadStrings("http://192.168.0.15:51111/Commands/commands.txt");
if (input.length != 0) {
String s_current = input[0];
if (!s_current.equals(s_last)) {
Expand Down

0 comments on commit 3ed2062

Please sign in to comment.