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
529e9151
Commit
529e9151
authored
Jul 17, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move examples into root folder and add new "Serial Repeat Game".
parent
8772a6ee
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
294 additions
and
11 deletions
+294
-11
ardublockly/ardublockly.js
ardublockly/ardublockly.js
+8
-4
ardublockly/index.html
ardublockly/index.html
+3
-2
examples/blink.xml
examples/blink.xml
+0
-0
examples/serial_print_ascii_.xml
examples/serial_print_ascii_.xml
+0
-0
examples/serial_repeat_game.xml
examples/serial_repeat_game.xml
+269
-0
examples/servo_knob.xml
examples/servo_knob.xml
+0
-0
examples/stepper_knob.xml
examples/stepper_knob.xml
+0
-0
package/electron/app/appmenu.js
package/electron/app/appmenu.js
+14
-5
No files found.
ardublockly/ardublockly.js
View file @
529e9151
...
...
@@ -63,19 +63,23 @@ Ardublockly.bindActionFunctions = function() {
$
(
'
.button-collapse
'
).
sideNav
(
'
hide
'
);
});
Ardublockly
.
bindClick_
(
'
menu_example_1
'
,
function
()
{
Ardublockly
.
loadServerXmlFile
(
'
examples/blink.xml
'
);
Ardublockly
.
loadServerXmlFile
(
'
../
examples/blink.xml
'
);
$
(
'
.button-collapse
'
).
sideNav
(
'
hide
'
);
});
Ardublockly
.
bindClick_
(
'
menu_example_2
'
,
function
()
{
Ardublockly
.
loadServerXmlFile
(
'
examples/serial_print_ascii_.xml
'
);
Ardublockly
.
loadServerXmlFile
(
'
../
examples/serial_print_ascii_.xml
'
);
$
(
'
.button-collapse
'
).
sideNav
(
'
hide
'
);
});
Ardublockly
.
bindClick_
(
'
menu_example_3
'
,
function
()
{
Ardublockly
.
loadServerXmlFile
(
'
examples/servo_knob
.xml
'
);
Ardublockly
.
loadServerXmlFile
(
'
../examples/serial_repeat_game
.xml
'
);
$
(
'
.button-collapse
'
).
sideNav
(
'
hide
'
);
});
Ardublockly
.
bindClick_
(
'
menu_example_4
'
,
function
()
{
Ardublockly
.
loadServerXmlFile
(
'
examples/stepper_knob.xml
'
);
Ardublockly
.
loadServerXmlFile
(
'
../examples/servo_knob.xml
'
);
$
(
'
.button-collapse
'
).
sideNav
(
'
hide
'
);
});
Ardublockly
.
bindClick_
(
'
menu_example_5
'
,
function
()
{
Ardublockly
.
loadServerXmlFile
(
'
../examples/stepper_knob.xml
'
);
$
(
'
.button-collapse
'
).
sideNav
(
'
hide
'
);
});
...
...
ardublockly/index.html
View file @
529e9151
...
...
@@ -91,8 +91,9 @@
<ul>
<li
id=
"menu_example_1"
><a
href=
"#!"
>
Blink
</a></li>
<li
id=
"menu_example_2"
><a
href=
"#!"
>
Serial print
</a></li>
<li
id=
"menu_example_3"
><a
href=
"#!"
>
Servo knob
</a></li>
<li
id=
"menu_example_4"
><a
href=
"#!"
>
Stepper knob
</a></li>
<li
id=
"menu_example_3"
><a
href=
"#!"
>
Serial repeat game
</a></li>
<li
id=
"menu_example_4"
><a
href=
"#!"
>
Servo knob
</a></li>
<li
id=
"menu_example_5"
><a
href=
"#!"
>
Stepper knob
</a></li>
</ul>
</div>
</li>
...
...
ardublockly/
examples/blink.xml
→
examples/blink.xml
View file @
529e9151
File moved
ardublockly/
examples/serial_print_ascii_.xml
→
examples/serial_print_ascii_.xml
View file @
529e9151
File moved
examples/serial_repeat_game.xml
0 → 100644
View file @
529e9151
This diff is collapsed.
Click to expand it.
ardublockly/
examples/servo_knob.xml
→
examples/servo_knob.xml
View file @
529e9151
File moved
ardublockly/
examples/stepper_knob.xml
→
examples/stepper_knob.xml
View file @
529e9151
File moved
package/electron/app/appmenu.js
View file @
529e9151
...
...
@@ -236,25 +236,34 @@ var getExamplesMenuData = function() {
BrowserWindow
.
getFocusedWindow
()
.
webContents
.
executeJavaScript
(
'
Ardublockly.loadServerXmlFile("examples/
'
+
'
Ardublockly.loadServerXmlFile("
../
examples/
'
+
'
blink.xml");
'
);
}
},
{
label
:
'
Print Serial
'
,
label
:
'
Serial Print
'
,
click
:
function
()
{
BrowserWindow
.
getFocusedWindow
()
.
webContents
.
executeJavaScript
(
'
Ardublockly.loadServerXmlFile("examples/
'
+
'
Ardublockly.loadServerXmlFile("
../
examples/
'
+
'
serial_print_ascii_.xml");
'
);
}
},
{
label
:
'
Serial Repeat Game
'
,
click
:
function
()
{
BrowserWindow
.
getFocusedWindow
()
.
webContents
.
executeJavaScript
(
'
Ardublockly.loadServerXmlFile("../examples/
'
+
'
serial_repeat_game.xml");
'
);
}
},
{
label
:
'
Servo Knob
'
,
click
:
function
()
{
BrowserWindow
.
getFocusedWindow
()
.
webContents
.
executeJavaScript
(
'
Ardublockly.loadServerXmlFile("examples/
'
+
'
Ardublockly.loadServerXmlFile("
../
examples/
'
+
'
servo_knob.xml");
'
);
}
},
{
...
...
@@ -263,7 +272,7 @@ var getExamplesMenuData = function() {
BrowserWindow
.
getFocusedWindow
()
.
webContents
.
executeJavaScript
(
'
Ardublockly.loadServerXmlFile("examples/
'
+
'
Ardublockly.loadServerXmlFile("
../
examples/
'
+
'
stepper_knob.xml");
'
);
}
}
...
...
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