Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
422ae35e
Commit
422ae35e
authored
Feb 12, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing minor bugs due to renames and added server checks.
parent
e0166b63
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
13 deletions
+20
-13
ArduinoServerCompiler/js/ArduServerCompiler.js
ArduinoServerCompiler/js/ArduServerCompiler.js
+3
-3
apps/arduino/arduino_material.js
apps/arduino/arduino_material.js
+1
-1
apps/arduino/arduino_material_ardublockly.js
apps/arduino/arduino_material_ardublockly.js
+1
-0
apps/arduino/index.html
apps/arduino/index.html
+1
-1
apps/arduino_classic/arduino_classic.js
apps/arduino_classic/arduino_classic.js
+13
-7
apps/arduino_classic/index.html
apps/arduino_classic/index.html
+1
-1
No files found.
ArduinoServerCompiler/js/ArduServerCompiler.js
View file @
422ae35e
...
...
@@ -50,7 +50,7 @@ ArduServerCompiler.ajaxPostForm = function(url, params, callback) {
/**
* Sends plain data to the ArduBlocklyServer using Ajax
* @param {!string} url Requester URL
* @param {!string}
params Form parameters in the "var=x&var2=y" format
* @param {!string}
data Plain text currently used to send Arduino code only.
* @param {!function} callback Request callback function.
* @return False if an error occurred
*/
...
...
@@ -75,7 +75,7 @@ ArduServerCompiler.ajaxPostPlain = function(url, data, callback) {
// Send the data
try
{
request
.
send
(
params
);
request
.
send
(
data
);
}
catch
(
e
)
{
// The request will fail if opening the html directly on a browser, so
// let's just send the callback nullified and the front end will deal.
...
...
@@ -110,7 +110,7 @@ ArduServerCompiler.createAjaxRequest = function() {
}
}
return
request
;
}
}
;
/**
* Creates an HTML element based on the JSON data received from the server.
...
...
apps/arduino/arduino_material.js
View file @
422ae35e
...
...
@@ -321,9 +321,9 @@ ArduinoMaterial.setIdeSettings = function() {
*/
ArduinoMaterial
.
sendCode
=
function
()
{
toast
(
'
Sending sketch to Arduino IDE...
'
,
4000
);
ArduinoMaterial
.
runButtonSpinner
(
true
);
ArduServerCompiler
.
sendSketchToServer
(
ArduinoMaterial
.
generateArduino
(),
ArduinoMaterial
.
sendCodeReturn
);
ArduinoMaterial
.
runButtonSpinner
(
true
);
};
/**
...
...
apps/arduino/arduino_material_ardublockly.js
View file @
422ae35e
...
...
@@ -42,6 +42,7 @@ ArduinoMaterial.injectBlockly = function(blockly_el, toolbox_path) {
}
}
}
// If file run locally Internet explorer fails here
try
{
request
.
open
(
"
GET
"
,
toolbox_path
,
true
);
...
...
apps/arduino/index.html
View file @
422ae35e
...
...
@@ -238,7 +238,7 @@
</div>
<!-- General Alert: Content is loaded using Javascript to display alerts -->
<div
id=
"not_running_dialog"
class=
"modal modal-fixed-footer"
>
<div
id=
"not_running_dialog"
class=
"modal modal-fixed-footer"
style=
"height:50%!important"
>
<div
class=
"modal-content"
>
<h4
id=
"gen_alert_title"
>
Ardublockly not running locally
</h4>
<p>
For Ardublockly to work correctly, the Ardublockly server must be
...
...
apps/arduino_classic/arduino_classic.js
View file @
422ae35e
...
...
@@ -139,7 +139,7 @@ ArduinoClassic.init = function() {
document
.
location
.
hostname
!=
"
192.168.0.7
"
)
{
alert
(
'
Ardublockly not running locally
\n\n
'
+
'
For Ardublockly to work correctly, the Ardublockly server must be
'
+
'
running locally on your computer
'
);
'
running locally on your computer
.
'
);
}
};
window
.
addEventListener
(
'
load
'
,
ArduinoClassic
.
init
);
...
...
@@ -182,12 +182,18 @@ ArduinoClassic.loadToArduino = function() {
* Send the Arduino Code to the ArduServerCompiler to process
*/
ArduinoClassic
.
loadToArduinoReturn
=
function
(
data_back_el
)
{
// edit modal with new content
var
modal
=
document
.
getElementById
(
'
modal_content
'
);
modal
.
innerHTML
=
''
;
modal
.
appendChild
(
data_back_el
);
// display modal
document
.
getElementById
(
'
modal_toggle
'
).
checked
=
true
;
if
(
data_back_el
!=
null
)
{
// edit modal with new content
var
modal
=
document
.
getElementById
(
'
modal_content
'
);
modal
.
innerHTML
=
''
;
modal
.
appendChild
(
data_back_el
);
// display modal
document
.
getElementById
(
'
modal_toggle
'
).
checked
=
true
;
}
else
{
alert
(
'
Ardublockly not running locally
\n\n
'
+
'
To load the blocks code into an Arduino the For Ardublockly
'
+
'
server must be running locally on your computer.
'
);
}
};
/**
...
...
apps/arduino_classic/index.html
View file @
422ae35e
...
...
@@ -48,7 +48,7 @@
<link
rel=
"stylesheet"
href=
"../../demos/prettify.css"
>
<script
src=
"../../demos/prettify.js"
></script>
<!-- FileSaver from arduino materia app -->
<script
src=
"../arduino
_material
/js_libs/FileSaver.min.js"
></script>
<script
src=
"../arduino/js_libs/FileSaver.min.js"
></script>
</head>
<body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment