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
a2202345
Commit
a2202345
authored
Feb 20, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated for Linux and MacOS compatibility.
parent
64ccd366
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
ArduinoServerCompiler/BlocklyRequestHandler.py
ArduinoServerCompiler/BlocklyRequestHandler.py
+0
-1
ArduinoServerCompiler/PySerialListPorts/list_ports_posix.py
ArduinoServerCompiler/PySerialListPorts/list_ports_posix.py
+2
-2
ArduinoServerCompiler/ServerCompilerSettings.py
ArduinoServerCompiler/ServerCompilerSettings.py
+2
-3
No files found.
ArduinoServerCompiler/BlocklyRequestHandler.py
View file @
a2202345
...
...
@@ -168,7 +168,6 @@ def handle_sketch(sketch_code):
'output'
:
out
,
'error_output'
:
error
,
'exit_code'
:
exit_code
}
print
(
json
.
dumps
(
json_data
))
return
json
.
dumps
(
json_data
)
...
...
ArduinoServerCompiler/PySerialListPorts/list_ports_posix.py
View file @
a2202345
...
...
@@ -27,7 +27,7 @@ import os
plat
=
sys
.
platform
.
lower
()
if
plat
[:
5
]
==
'linux'
:
# Linux (confirmed)
from
serial.tool
s.list_ports_linux
import
comports
from
ArduinoServerCompiler.PySerialListPort
s.list_ports_linux
import
comports
elif
plat
==
'cygwin'
:
# cygwin/win32
def
comports
():
...
...
@@ -47,7 +47,7 @@ elif plat[:3] == 'bsd' or \
return
[(
d
,
d
,
d
)
for
d
in
devices
]
elif
plat
[:
6
]
==
'darwin'
:
# OS X (confirmed)
from
serial.tool
s.list_ports_osx
import
comports
from
ArduinoServerCompiler.PySerialListPort
s.list_ports_osx
import
comports
elif
plat
[:
6
]
==
'netbsd'
:
# NetBSD
def
comports
():
...
...
ArduinoServerCompiler/ServerCompilerSettings.py
View file @
a2202345
...
...
@@ -113,11 +113,10 @@ class ServerCompilerSettings(object):
self
.
__compiler_dir__
=
None
def
set_compiler_dir_from_file
(
self
,
new_compiler_dir
):
""" The compiler dir must be full path to an
.exe
file. """
""" The compiler dir must be full path to an
existing
file. """
# FIXME: this is a windows only check (.exe), needs to be
# updated to be compatible with linux and MacOS
if
os
.
path
.
exists
(
new_compiler_dir
)
and
\
new_compiler_dir
.
endswith
(
'.exe'
):
if
os
.
path
.
exists
(
new_compiler_dir
):
self
.
__compiler_dir__
=
new_compiler_dir
else
:
print
(
'
\n
The provided compiler path in the settings file is not '
+
...
...
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