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
75d1c3d7
Commit
75d1c3d7
authored
Feb 21, 2016
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor modifications to set up for a release version.
parent
1856f765
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
ardublockly/ardublockly.js
ardublockly/ardublockly.js
+6
-2
blockly/generators/arduino.js
blockly/generators/arduino.js
+4
-4
No files found.
ardublockly/ardublockly.js
View file @
75d1c3d7
...
@@ -29,7 +29,7 @@ Ardublockly.init = function() {
...
@@ -29,7 +29,7 @@ Ardublockly.init = function() {
// Inject Blockly into content_blocks and fetch additional blocks
// Inject Blockly into content_blocks and fetch additional blocks
Ardublockly
.
injectBlockly
(
document
.
getElementById
(
'
content_blocks
'
),
Ardublockly
.
injectBlockly
(
document
.
getElementById
(
'
content_blocks
'
),
Ardublockly
.
TOOLBOX_XML
,
'
../blockly/
'
);
Ardublockly
.
TOOLBOX_XML
,
'
../blockly/
'
);
Ardublockly
.
importExtraBlocks
();
//
Ardublockly.importExtraBlocks();
Ardublockly
.
designJsInit
();
Ardublockly
.
designJsInit
();
Ardublockly
.
initialiseIdeButtons
();
Ardublockly
.
initialiseIdeButtons
();
...
@@ -667,7 +667,11 @@ Ardublockly.isToolboxVisible = function() {
...
@@ -667,7 +667,11 @@ Ardublockly.isToolboxVisible = function() {
return
Ardublockly
.
TOOLBAR_SHOWING_
;
return
Ardublockly
.
TOOLBAR_SHOWING_
;
};
};
/** Lazy loads the additional blocks from the ./block directory. */
/**
* Lazy loads the additional block JS files from the ./block directory.
* Initialises any additional Ardublockly extensions.
* TODO: Loads the examples into the examples modal
*/
Ardublockly
.
importExtraBlocks
=
function
()
{
Ardublockly
.
importExtraBlocks
=
function
()
{
/**
/**
* Parses the JSON data to find the block and languages js files.
* Parses the JSON data to find the block and languages js files.
...
...
blockly/generators/arduino.js
View file @
75d1c3d7
...
@@ -91,7 +91,7 @@ Blockly.Arduino.DEF_FUNC_NAME = Blockly.Arduino.FUNCTION_NAME_PLACEHOLDER_;
...
@@ -91,7 +91,7 @@ Blockly.Arduino.DEF_FUNC_NAME = Blockly.Arduino.FUNCTION_NAME_PLACEHOLDER_;
Blockly
.
Arduino
.
init
=
function
(
workspace
)
{
Blockly
.
Arduino
.
init
=
function
(
workspace
)
{
// Create a dictionary of definitions to be printed at the top of the sketch
// Create a dictionary of definitions to be printed at the top of the sketch
Blockly
.
Arduino
.
includes_
=
Object
.
create
(
null
);
Blockly
.
Arduino
.
includes_
=
Object
.
create
(
null
);
// Create a dictionary of
definitions to be printed after variable definition
s
// Create a dictionary of
global definitions to be printed after variable
s
Blockly
.
Arduino
.
definitions_
=
Object
.
create
(
null
);
Blockly
.
Arduino
.
definitions_
=
Object
.
create
(
null
);
// Create a dictionary of functions from the code generator
// Create a dictionary of functions from the code generator
Blockly
.
Arduino
.
codeFunctions_
=
Object
.
create
(
null
);
Blockly
.
Arduino
.
codeFunctions_
=
Object
.
create
(
null
);
...
@@ -259,7 +259,7 @@ Blockly.Arduino.reservePin = function(block, pin, pinType, warningTag) {
...
@@ -259,7 +259,7 @@ Blockly.Arduino.reservePin = function(block, pin, pinType, warningTag) {
if
(
Blockly
.
Arduino
.
pins_
[
pin
]
!=
pinType
)
{
if
(
Blockly
.
Arduino
.
pins_
[
pin
]
!=
pinType
)
{
block
.
setWarningText
(
block
.
setWarningText
(
'
Pin
'
+
pin
+
'
is needed for
'
+
warningTag
+
'
as pin
'
+
pinType
+
'
Pin
'
+
pin
+
'
is needed for
'
+
warningTag
+
'
as pin
'
+
pinType
+
'
.
Already used as
'
+
Blockly
.
Arduino
.
pins_
[
pin
]
+
'
.
'
,
warningTag
);
'
.
\n
Already used as
'
+
Blockly
.
Arduino
.
pins_
[
pin
]
+
'
.
'
,
warningTag
);
}
else
{
}
else
{
block
.
setWarningText
(
null
,
warningTag
);
block
.
setWarningText
(
null
,
warningTag
);
}
}
...
@@ -361,8 +361,8 @@ Blockly.Arduino.getArduinoType_ = function(typeBlockly) {
...
@@ -361,8 +361,8 @@ Blockly.Arduino.getArduinoType_ = function(typeBlockly) {
return
'
undefined
'
;
return
'
undefined
'
;
case
Blockly
.
Types
.
CHILD_BLOCK_MISSING
.
typeName
:
case
Blockly
.
Types
.
CHILD_BLOCK_MISSING
.
typeName
:
// If no block connected default to int, change for easier debugging
// If no block connected default to int, change for easier debugging
return
'
ChildBlockMissing
'
;
//
return 'ChildBlockMissing';
//
return 'int';
return
'
int
'
;
default
:
default
:
return
'
Invalid Blockly Type
'
;
return
'
Invalid Blockly Type
'
;
}
}
...
...
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