├── arduino-core ├── .gitignore ├── lib │ ├── java-semver.LICENSE.MIT.txt │ ├── jsch.LICENSE.BSD.txt │ ├── apple.jar │ ├── jna-4.2.2.jar │ ├── jmdns-3.5.5.jar │ ├── jsch-0.1.50.jar │ ├── commons-io-2.6.jar │ ├── commons-net-3.3.jar │ ├── bcpg-jdk15on-152.jar │ ├── commons-codec-1.7.jar │ ├── commons-exec-1.1.jar │ ├── java-semver-0.8.0.jar │ ├── slf4j-api-1.7.22.jar │ ├── bcprov-jdk15on-152.jar │ ├── commons-compress-1.8.jar │ ├── commons-lang3-3.8.1.jar │ ├── jackson-core-2.9.5.jar │ ├── jna-platform-4.2.2.jar │ ├── jssc-2.8.0-arduino4.jar │ ├── slf4j-simple-1.7.22.jar │ ├── commons-logging-1.0.4.jar │ ├── jackson-databind-2.9.5.jar │ ├── jackson-annotations-2.9.5.jar │ ├── jmdns.LICENSE.ASL-2.0-LGPL-2.1.txt │ └── apple.LICENSE.BSD-like.txt ├── src │ ├── processing │ │ └── app │ │ │ ├── i18n │ │ │ ├── python │ │ │ │ ├── .gitignore │ │ │ │ ├── requests │ │ │ │ │ ├── packages │ │ │ │ │ │ ├── urllib3 │ │ │ │ │ │ │ ├── contrib │ │ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ │ │ ├── packages │ │ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── charade │ │ │ │ │ │ │ ├── compat.py │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ ├── constants.py │ │ │ │ │ │ │ ├── euctwprober.py │ │ │ │ │ │ │ ├── euckrprober.py │ │ │ │ │ │ │ ├── gb2312prober.py │ │ │ │ │ │ │ └── big5prober.py │ │ │ │ │ ├── certs.py │ │ │ │ │ ├── hooks.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── push.py │ │ │ │ ├── pull.py │ │ │ │ ├── update.py │ │ │ │ └── transifex.py │ │ │ ├── push.sh │ │ │ ├── pull.sh │ │ │ └── update.sh │ │ │ ├── helpers │ │ │ ├── PreferencesMapException.java │ │ │ ├── UserNotifier.java │ │ │ ├── OSUtils.java │ │ │ ├── ProcessUtils.java │ │ │ ├── BasicUserNotifier.java │ │ │ ├── NetUtils.java │ │ │ └── filefilters │ │ │ │ ├── OnlyFilesWithExtension.java │ │ │ │ └── OnlyDirs.java │ │ │ ├── debug │ │ │ ├── TargetPlatformException.java │ │ │ ├── TargetPackage.java │ │ │ ├── MessageConsumer.java │ │ │ └── LegacyTargetPackage.java │ │ │ ├── linux │ │ │ └── UDevAdmParser.java │ │ │ ├── legacy │ │ │ └── PConstants.java │ │ │ ├── tools │ │ │ └── DoubleQuotedArgumentsOnWindowsCommandLine.java │ │ │ ├── SerialNotFoundException.java │ │ │ ├── SerialException.java │ │ │ └── packages │ │ │ └── UserLibraryFolder.java │ └── cc │ │ └── arduino │ │ ├── CompilerProgressListener.java │ │ ├── contributions │ │ ├── ProgressListener.java │ │ ├── packages │ │ │ ├── ContributedBoard.java │ │ │ └── ContributedHelp.java │ │ ├── NoopProgressListener.java │ │ ├── libraries │ │ │ └── ContributedLibraryDependency.java │ │ └── DownloadableContributionVersionComparator.java │ │ ├── utils │ │ ├── Progress.java │ │ ├── Pair.java │ │ └── ReverseComparator.java │ │ ├── DefaultUncaughtExceptionHandler.java │ │ ├── filters │ │ └── FileExecutablePredicate.java │ │ └── packages │ │ └── discoverers │ │ └── PluggableDiscoveryMessage.java ├── .editorconfig ├── .project ├── .classpath └── build.xml ├── app ├── lib │ ├── java-semver.LICENSE.MIT.txt │ ├── jsch.LICENSE.BSD.txt │ ├── apple.jar │ ├── batik-1.8.jar │ ├── jmdns-3.5.5.jar │ ├── jsch-0.1.50.jar │ ├── batik-anim-1.8.jar │ ├── batik-css-1.8.jar │ ├── batik-dom-1.8.jar │ ├── batik-ext-1.8.jar │ ├── batik-gvt-1.8.jar │ ├── batik-util-1.8.jar │ ├── batik-xml-1.8.jar │ ├── commons-io-2.6.jar │ ├── batik-bridge-1.8.jar │ ├── batik-codec-1.8.jar │ ├── batik-parser-1.8.jar │ ├── batik-script-1.8.jar │ ├── batik-svgpp-1.8.jar │ ├── bcpg-jdk15on-152.jar │ ├── commons-exec-1.1.jar │ ├── commons-net-3.3.jar │ ├── jtouchbar-1.0.0.jar │ ├── slf4j-api-1.7.22.jar │ ├── xml-apis-1.3.04.jar │ ├── batik-awt-util-1.8.jar │ ├── batik-squiggle-1.8.jar │ ├── batik-svg-dom-1.8.jar │ ├── bcprov-jdk15on-152.jar │ ├── commons-codec-1.7.jar │ ├── commons-lang3-3.8.1.jar │ ├── jackson-core-2.9.5.jar │ ├── java-semver-0.8.0.jar │ ├── jssc-2.8.0-arduino4.jar │ ├── slf4j-simple-1.7.22.jar │ ├── xml-apis-ext-1.3.04.jar │ ├── batik-rasterizer-1.8.jar │ ├── batik-transcoder-1.8.jar │ ├── commons-compress-1.8.jar │ ├── commons-logging-1.0.4.jar │ ├── commons-httpclient-3.1.jar │ ├── jackson-databind-2.9.5.jar │ ├── xmlgraphics-commons-2.0.jar │ ├── jackson-annotations-2.9.5.jar │ ├── rsyntaxtextarea-3.0.3-SNAPSHOT.jar │ ├── jmdns.LICENSE.ASL-2.0-LGPL-2.1.txt │ ├── apple.LICENSE.BSD-like.txt │ ├── README.xml-apis-ext-1.3.04.txt │ ├── README.xml-apis-1.3.04.txt │ ├── jtouchbar.LICENSE.MIT.txt │ └── RSyntaxTextArea.License.txt ├── test │ ├── Test.zip │ ├── Test2.zip │ ├── Keypad_mac.zip │ ├── cc │ │ └── arduino │ │ │ ├── net │ │ │ ├── proxy_direct.pac │ │ │ ├── proxy_http.pac │ │ │ ├── proxy_socks.pac │ │ │ ├── PACSupportMethodsTest.java │ │ │ └── proxy_complex.pac │ │ │ └── contributions │ │ │ ├── public.gpg.key │ │ │ ├── package_index.json.sig │ │ │ └── libraries │ │ │ └── LibraryOfTypeComparatorTest.java │ ├── Keypad_with_hidden_files.zip │ ├── processing │ │ └── app │ │ │ ├── windows │ │ │ └── german.reg.query.output.txt │ │ │ ├── debug │ │ │ └── TargetPackageStub.java │ │ │ ├── linux │ │ │ ├── udev_output.txt │ │ │ └── UDevAdmParserTest.java │ │ │ └── tools │ │ │ └── test_partial_boards.txt │ └── optiboot_atmega328.hex ├── test-lib │ ├── junit-4.11.jar │ ├── fest-swing-1.2.jar │ ├── fest-assert-1.2.jar │ ├── fest-reflect-1.2.jar │ ├── fest-util-1.1.2.jar │ ├── jcip-annotations-1.0.jar │ └── jcip-annotations.LICENSE.cc-by.2.5.txt ├── .settings │ └── org.eclipse.jdt.ui.prefs ├── src │ ├── processing │ │ └── app │ │ │ ├── Resources.java │ │ │ ├── syntax │ │ │ ├── MyConfigurableCaret.java │ │ │ └── SketchTextAreaUI.java │ │ │ ├── RunnerListener.java │ │ │ ├── tools │ │ │ └── Tool.java │ │ │ ├── javax │ │ │ └── swing │ │ │ │ └── filechooser │ │ │ │ └── FileNameExtensionFilter.java │ │ │ └── helpers │ │ │ ├── Ticks.java │ │ │ ├── CircularBuffer.java │ │ │ └── GUIUserNotifier.java │ └── cc │ │ └── arduino │ │ ├── view │ │ ├── EventListener.java │ │ ├── StubMenuListener.java │ │ └── JMenuUtils.java │ │ └── contributions │ │ └── ui │ │ ├── DropdownItem.java │ │ └── listeners │ │ └── AbstractKeyListener.java ├── .editorconfig ├── .project ├── testdata │ ├── libraries │ │ ├── Bridge_1.6.3 │ │ │ └── Bridge │ │ │ │ ├── examples │ │ │ │ ├── TemperatureWebPanel │ │ │ │ │ └── www │ │ │ │ │ │ └── index.html │ │ │ │ ├── RemoteDueBlink │ │ │ │ │ └── RemoteDueBlink.ino │ │ │ │ ├── HttpClient │ │ │ │ │ └── HttpClient.ino │ │ │ │ ├── HttpClientConsole │ │ │ │ │ └── HttpClientConsole.ino │ │ │ │ ├── WiFiStatus │ │ │ │ │ └── WiFiStatus.ino │ │ │ │ ├── MailboxReadMessage │ │ │ │ │ └── MailboxReadMessage.ino │ │ │ │ ├── ConsoleRead │ │ │ │ │ └── ConsoleRead.ino │ │ │ │ ├── ShellCommands │ │ │ │ │ └── ShellCommands.ino │ │ │ │ └── ConsolePixel │ │ │ │ │ └── ConsolePixel.ino │ │ │ │ ├── library.properties │ │ │ │ ├── README.adoc │ │ │ │ └── src │ │ │ │ ├── YunClient.h │ │ │ │ ├── YunServer.h │ │ │ │ ├── BridgeSSLClient.cpp │ │ │ │ ├── BridgeSSLClient.h │ │ │ │ ├── BridgeServer.h │ │ │ │ ├── BridgeServer.cpp │ │ │ │ └── Mailbox.h │ │ ├── Bridge_1.7.0 │ │ │ └── Bridge │ │ │ │ ├── examples │ │ │ │ ├── TemperatureWebPanel │ │ │ │ │ └── www │ │ │ │ │ │ └── index.html │ │ │ │ ├── RemoteDueBlink │ │ │ │ │ └── RemoteDueBlink.ino │ │ │ │ ├── HttpClient │ │ │ │ │ └── HttpClient.ino │ │ │ │ ├── HttpClientConsole │ │ │ │ │ └── HttpClientConsole.ino │ │ │ │ ├── WiFiStatus │ │ │ │ │ └── WiFiStatus.ino │ │ │ │ ├── MailboxReadMessage │ │ │ │ │ └── MailboxReadMessage.ino │ │ │ │ ├── ConsoleRead │ │ │ │ │ └── ConsoleRead.ino │ │ │ │ ├── ShellCommands │ │ │ │ │ └── ShellCommands.ino │ │ │ │ └── ConsolePixel │ │ │ │ │ └── ConsolePixel.ino │ │ │ │ ├── library.properties │ │ │ │ ├── README.adoc │ │ │ │ └── src │ │ │ │ ├── YunClient.h │ │ │ │ ├── YunServer.h │ │ │ │ ├── BridgeSSLClient.cpp │ │ │ │ ├── BridgeSSLClient.h │ │ │ │ ├── BridgeServer.h │ │ │ │ ├── BridgeServer.cpp │ │ │ │ └── Mailbox.h │ │ ├── SD_1.1.1 │ │ │ └── SD │ │ │ │ ├── library.properties │ │ │ │ ├── src │ │ │ │ └── README.txt │ │ │ │ ├── keywords.txt │ │ │ │ ├── README.adoc │ │ │ │ └── examples │ │ │ │ ├── DumpFile │ │ │ │ └── DumpFile.ino │ │ │ │ ├── listfiles │ │ │ │ └── listfiles.ino │ │ │ │ └── Files │ │ │ │ └── Files.ino │ │ └── SD_1.2.1 │ │ │ └── SD │ │ │ ├── src │ │ │ └── README.txt │ │ │ ├── library.properties │ │ │ ├── keywords.txt │ │ │ ├── README.adoc │ │ │ └── examples │ │ │ ├── DumpFile │ │ │ └── DumpFile.ino │ │ │ ├── listfiles │ │ │ └── listfiles.ino │ │ │ └── Files │ │ │ └── Files.ino │ └── sketches │ │ └── Blink │ │ └── Blink.ino └── .classpath_macosx ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── ant.yml ├── .settings └── org.eclipse.jdt.ui.prefs ├── .project └── post_install.sh /arduino-core/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /app/lib/java-semver.LICENSE.MIT.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /arduino-core/lib/java-semver.LICENSE.MIT.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /app/lib/jsch.LICENSE.BSD.txt: -------------------------------------------------------------------------------- 1 | http://www.jcraft.com/jsch/LICENSE.txt 2 | -------------------------------------------------------------------------------- /arduino-core/lib/jsch.LICENSE.BSD.txt: -------------------------------------------------------------------------------- 1 | http://www.jcraft.com/jsch/LICENSE.txt 2 | -------------------------------------------------------------------------------- /app/lib/apple.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/apple.jar -------------------------------------------------------------------------------- /app/test/Test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test/Test.zip -------------------------------------------------------------------------------- /app/test/Test2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test/Test2.zip -------------------------------------------------------------------------------- /app/lib/batik-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-1.8.jar -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/lib/jmdns-3.5.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/jmdns-3.5.5.jar -------------------------------------------------------------------------------- /app/lib/jsch-0.1.50.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/jsch-0.1.50.jar -------------------------------------------------------------------------------- /app/test/Keypad_mac.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test/Keypad_mac.zip -------------------------------------------------------------------------------- /app/lib/batik-anim-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-anim-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-css-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-css-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-dom-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-dom-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-ext-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-ext-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-gvt-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-gvt-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-util-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-util-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-xml-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-xml-1.8.jar -------------------------------------------------------------------------------- /app/lib/commons-io-2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/commons-io-2.6.jar -------------------------------------------------------------------------------- /arduino-core/lib/apple.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/apple.jar -------------------------------------------------------------------------------- /app/lib/batik-bridge-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-bridge-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-codec-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-codec-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-parser-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-parser-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-script-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-script-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-svgpp-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-svgpp-1.8.jar -------------------------------------------------------------------------------- /app/lib/bcpg-jdk15on-152.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/bcpg-jdk15on-152.jar -------------------------------------------------------------------------------- /app/lib/commons-exec-1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/commons-exec-1.1.jar -------------------------------------------------------------------------------- /app/lib/commons-net-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/commons-net-3.3.jar -------------------------------------------------------------------------------- /app/lib/jtouchbar-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/jtouchbar-1.0.0.jar -------------------------------------------------------------------------------- /app/lib/slf4j-api-1.7.22.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/slf4j-api-1.7.22.jar -------------------------------------------------------------------------------- /app/lib/xml-apis-1.3.04.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/xml-apis-1.3.04.jar -------------------------------------------------------------------------------- /app/test-lib/junit-4.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test-lib/junit-4.11.jar -------------------------------------------------------------------------------- /app/lib/batik-awt-util-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-awt-util-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-squiggle-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-squiggle-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-svg-dom-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-svg-dom-1.8.jar -------------------------------------------------------------------------------- /app/lib/bcprov-jdk15on-152.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/bcprov-jdk15on-152.jar -------------------------------------------------------------------------------- /app/lib/commons-codec-1.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/commons-codec-1.7.jar -------------------------------------------------------------------------------- /app/lib/commons-lang3-3.8.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/commons-lang3-3.8.1.jar -------------------------------------------------------------------------------- /app/lib/jackson-core-2.9.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/jackson-core-2.9.5.jar -------------------------------------------------------------------------------- /app/lib/java-semver-0.8.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/java-semver-0.8.0.jar -------------------------------------------------------------------------------- /app/lib/jssc-2.8.0-arduino4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/jssc-2.8.0-arduino4.jar -------------------------------------------------------------------------------- /app/lib/slf4j-simple-1.7.22.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/slf4j-simple-1.7.22.jar -------------------------------------------------------------------------------- /app/lib/xml-apis-ext-1.3.04.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/xml-apis-ext-1.3.04.jar -------------------------------------------------------------------------------- /app/test-lib/fest-swing-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test-lib/fest-swing-1.2.jar -------------------------------------------------------------------------------- /arduino-core/lib/jna-4.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/jna-4.2.2.jar -------------------------------------------------------------------------------- /app/lib/batik-rasterizer-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-rasterizer-1.8.jar -------------------------------------------------------------------------------- /app/lib/batik-transcoder-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/batik-transcoder-1.8.jar -------------------------------------------------------------------------------- /app/lib/commons-compress-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/commons-compress-1.8.jar -------------------------------------------------------------------------------- /app/lib/commons-logging-1.0.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/commons-logging-1.0.4.jar -------------------------------------------------------------------------------- /app/test-lib/fest-assert-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test-lib/fest-assert-1.2.jar -------------------------------------------------------------------------------- /app/test-lib/fest-reflect-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test-lib/fest-reflect-1.2.jar -------------------------------------------------------------------------------- /app/test-lib/fest-util-1.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test-lib/fest-util-1.1.2.jar -------------------------------------------------------------------------------- /app/test/cc/arduino/net/proxy_direct.pac: -------------------------------------------------------------------------------- 1 | function FindProxyForURL(url, host) 2 | { 3 | return "DIRECT"; 4 | } 5 | -------------------------------------------------------------------------------- /arduino-core/lib/jmdns-3.5.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/jmdns-3.5.5.jar -------------------------------------------------------------------------------- /arduino-core/lib/jsch-0.1.50.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/jsch-0.1.50.jar -------------------------------------------------------------------------------- /app/lib/commons-httpclient-3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/commons-httpclient-3.1.jar -------------------------------------------------------------------------------- /app/lib/jackson-databind-2.9.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/jackson-databind-2.9.5.jar -------------------------------------------------------------------------------- /app/lib/xmlgraphics-commons-2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/xmlgraphics-commons-2.0.jar -------------------------------------------------------------------------------- /arduino-core/lib/commons-io-2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/commons-io-2.6.jar -------------------------------------------------------------------------------- /arduino-core/lib/commons-net-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/commons-net-3.3.jar -------------------------------------------------------------------------------- /app/lib/jackson-annotations-2.9.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/jackson-annotations-2.9.5.jar -------------------------------------------------------------------------------- /app/test-lib/jcip-annotations-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test-lib/jcip-annotations-1.0.jar -------------------------------------------------------------------------------- /app/test/Keypad_with_hidden_files.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test/Keypad_with_hidden_files.zip -------------------------------------------------------------------------------- /arduino-core/lib/bcpg-jdk15on-152.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/bcpg-jdk15on-152.jar -------------------------------------------------------------------------------- /arduino-core/lib/commons-codec-1.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/commons-codec-1.7.jar -------------------------------------------------------------------------------- /arduino-core/lib/commons-exec-1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/commons-exec-1.1.jar -------------------------------------------------------------------------------- /arduino-core/lib/java-semver-0.8.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/java-semver-0.8.0.jar -------------------------------------------------------------------------------- /arduino-core/lib/slf4j-api-1.7.22.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/slf4j-api-1.7.22.jar -------------------------------------------------------------------------------- /arduino-core/lib/bcprov-jdk15on-152.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/bcprov-jdk15on-152.jar -------------------------------------------------------------------------------- /arduino-core/lib/commons-compress-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/commons-compress-1.8.jar -------------------------------------------------------------------------------- /arduino-core/lib/commons-lang3-3.8.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/commons-lang3-3.8.1.jar -------------------------------------------------------------------------------- /arduino-core/lib/jackson-core-2.9.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/jackson-core-2.9.5.jar -------------------------------------------------------------------------------- /arduino-core/lib/jna-platform-4.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/jna-platform-4.2.2.jar -------------------------------------------------------------------------------- /arduino-core/lib/jssc-2.8.0-arduino4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/jssc-2.8.0-arduino4.jar -------------------------------------------------------------------------------- /arduino-core/lib/slf4j-simple-1.7.22.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/slf4j-simple-1.7.22.jar -------------------------------------------------------------------------------- /app/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | formatter_profile=_Arduino 3 | formatter_settings_version=12 4 | -------------------------------------------------------------------------------- /app/lib/rsyntaxtextarea-3.0.3-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/lib/rsyntaxtextarea-3.0.3-SNAPSHOT.jar -------------------------------------------------------------------------------- /arduino-core/lib/commons-logging-1.0.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/commons-logging-1.0.4.jar -------------------------------------------------------------------------------- /arduino-core/lib/jackson-databind-2.9.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/jackson-databind-2.9.5.jar -------------------------------------------------------------------------------- /app/test/cc/arduino/net/proxy_http.pac: -------------------------------------------------------------------------------- 1 | function FindProxyForURL(url, host) 2 | { 3 | return "PROXY proxy.example.com:8080; DIRECT"; 4 | } 5 | -------------------------------------------------------------------------------- /app/test/cc/arduino/net/proxy_socks.pac: -------------------------------------------------------------------------------- 1 | function FindProxyForURL(url, host) 2 | { 3 | return "SOCKS proxy.example.com:8080; DIRECT"; 4 | } 5 | -------------------------------------------------------------------------------- /arduino-core/lib/jackson-annotations-2.9.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/arduino-core/lib/jackson-annotations-2.9.5.jar -------------------------------------------------------------------------------- /app/test/cc/arduino/contributions/public.gpg.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test/cc/arduino/contributions/public.gpg.key -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import urllib3 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please read the Issues section of the Contributing Rules at the "Contributing" link to the right before submitting an issue report. 2 | -------------------------------------------------------------------------------- /app/test/cc/arduino/contributions/package_index.json.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test/cc/arduino/contributions/package_index.json.sig -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | #Fri Dec 30 12:12:25 CET 2011 2 | eclipse.preferences.version=1 3 | formatter_profile=_Arduino 4 | formatter_settings_version=11 5 | -------------------------------------------------------------------------------- /app/test/processing/app/windows/german.reg.query.output.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renesas/Arduino/HEAD/app/test/processing/app/windows/german.reg.query.output.txt -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | -------------------------------------------------------------------------------- /app/lib/jmdns.LICENSE.ASL-2.0-LGPL-2.1.txt: -------------------------------------------------------------------------------- 1 | https://jmdns.svn.sourceforge.net/svnroot/jmdns/tags/jmdns-3.5.1/LICENSE-LGPL.txt 2 | https://jmdns.svn.sourceforge.net/svnroot/jmdns/tags/jmdns-3.5.1/LICENSE 3 | -------------------------------------------------------------------------------- /app/lib/apple.LICENSE.BSD-like.txt: -------------------------------------------------------------------------------- 1 | http://developer.apple.com/library/mac/#/legacy/library/samplecode/AppleJavaExtensions/Listings/README_txt.html#//apple_ref/doc/uid/DTS10000677-README_txt-DontLinkElementID_3 2 | -------------------------------------------------------------------------------- /arduino-core/lib/jmdns.LICENSE.ASL-2.0-LGPL-2.1.txt: -------------------------------------------------------------------------------- 1 | https://jmdns.svn.sourceforge.net/svnroot/jmdns/tags/jmdns-3.5.1/LICENSE-LGPL.txt 2 | https://jmdns.svn.sourceforge.net/svnroot/jmdns/tags/jmdns-3.5.1/LICENSE 3 | -------------------------------------------------------------------------------- /arduino-core/lib/apple.LICENSE.BSD-like.txt: -------------------------------------------------------------------------------- 1 | http://developer.apple.com/library/mac/#/legacy/library/samplecode/AppleJavaExtensions/Listings/README_txt.html#//apple_ref/doc/uid/DTS10000677-README_txt-DontLinkElementID_3 2 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/helpers/PreferencesMapException.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | @SuppressWarnings("serial") 4 | public class PreferencesMapException extends Exception { 5 | 6 | public PreferencesMapException(String message) { 7 | super(message); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /app/src/processing/app/Resources.java: -------------------------------------------------------------------------------- 1 | /* 2 | * by Shigeru KANEMOTO at SWITCHSCIENCE. 3 | * on 2011-10-15 4 | */ 5 | 6 | package processing.app; 7 | import java.util.ListResourceBundle; 8 | 9 | public class Resources extends ListResourceBundle { 10 | protected Object[][] getContents() { 11 | return new Object[][] {}; // Empty 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | indent_style = space 11 | indent_size = 2 12 | charset = utf-8 13 | 14 | [*.{md,adoc}] 15 | indent_style = space 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /arduino-core/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | indent_style = space 11 | indent_size = 2 12 | charset = utf-8 13 | 14 | [*.{md,adoc}] 15 | indent_style = space 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /app/test-lib/jcip-annotations.LICENSE.cc-by.2.5.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Brian Goetz and Tim Peierls 3 | * Released under the Creative Commons Attribution License 4 | * (http://creativecommons.org/licenses/by/2.5) 5 | * Official home: http://www.jcip.net 6 | * 7 | * Any republication or derived work distributed in source code form 8 | * must include this copyright and license notice. 9 | */ 10 | 11 | -------------------------------------------------------------------------------- /arduino-core/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | arduino-core 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing-head 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | processing 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/TemperatureWebPanel/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 0 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/TemperatureWebPanel/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 0 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.1.1/SD/library.properties: -------------------------------------------------------------------------------- 1 | name=SD 2 | version=1.1.1 3 | author=Arduino, SparkFun 4 | maintainer=Arduino 5 | sentence=Enables reading and writing on SD cards. 6 | paragraph=Once an SD memory card is connected to the SPI interface of the Arduino or Genuino board you can create files and read/write on them. You can also move through directories on the SD card. 7 | category=Data Storage 8 | url=http://www.arduino.cc/en/Reference/SD 9 | architectures=* 10 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.1.1/SD/src/README.txt: -------------------------------------------------------------------------------- 1 | 2 | ** SD - a slightly more friendly wrapper for sdfatlib ** 3 | 4 | This library aims to expose a subset of SD card functionality in the 5 | form of a higher level "wrapper" object. 6 | 7 | License: GNU General Public License V3 8 | (Because sdfatlib is licensed with this.) 9 | 10 | (C) Copyright 2010 SparkFun Electronics 11 | 12 | Now better than ever with optimization, multiple file support, directory handling, etc - ladyada! 13 | 14 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.2.1/SD/src/README.txt: -------------------------------------------------------------------------------- 1 | 2 | ** SD - a slightly more friendly wrapper for sdfatlib ** 3 | 4 | This library aims to expose a subset of SD card functionality in the 5 | form of a higher level "wrapper" object. 6 | 7 | License: GNU General Public License V3 8 | (Because sdfatlib is licensed with this.) 9 | 10 | (C) Copyright 2010 SparkFun Electronics 11 | 12 | Now better than ever with optimization, multiple file support, directory handling, etc - ladyada! 13 | 14 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.2.1/SD/library.properties: -------------------------------------------------------------------------------- 1 | name=SD 2 | version=1.2.1 3 | author=Arduino, SparkFun 4 | maintainer=Arduino 5 | sentence=Enables reading and writing on SD cards. 6 | paragraph=Once an SD memory card is connected to the SPI interface of the Arduino or Genuino board you can create files and read/write on them. You can also move through directories on the SD card. 7 | category=Data Storage 8 | url=http://www.arduino.cc/en/Reference/SD 9 | architectures=avr,sam,samd,arc32 10 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/debug/TargetPlatformException.java: -------------------------------------------------------------------------------- 1 | package processing.app.debug; 2 | 3 | @SuppressWarnings("serial") 4 | public class TargetPlatformException extends Exception { 5 | 6 | public TargetPlatformException() { 7 | super(); 8 | } 9 | 10 | public TargetPlatformException(String arg0, Throwable arg1) { 11 | super(arg0, arg1); 12 | } 13 | 14 | public TargetPlatformException(String arg0) { 15 | super(arg0); 16 | } 17 | 18 | public TargetPlatformException(Throwable arg0) { 19 | super(arg0); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $0 != "./push.sh" ]; then 4 | echo "push.sh: Invoke this script as ./push.sh" 5 | exit 1 6 | fi 7 | 8 | while [ $# -gt 0 ]; do 9 | if [ $1 = '-a' ]; then 10 | for f in Resources_*.po; do 11 | f=$(expr "$f" : "Resources_\(.*\).po") 12 | langs="$langs $f" 13 | done 14 | else 15 | langs="$langs $1" 16 | fi 17 | shift 18 | done 19 | 20 | if [ "$langs" = "" ]; then 21 | echo "push.sh: Give at least one language code." 22 | exit 1 23 | fi 24 | 25 | exec python python/push.py $langs 26 | -------------------------------------------------------------------------------- /app/src/processing/app/syntax/MyConfigurableCaret.java: -------------------------------------------------------------------------------- 1 | package processing.app.syntax; 2 | 3 | import org.fife.ui.rtextarea.ConfigurableCaret; 4 | import processing.app.helpers.OSUtils; 5 | 6 | import javax.swing.*; 7 | import java.awt.event.MouseEvent; 8 | 9 | public class MyConfigurableCaret extends ConfigurableCaret { 10 | 11 | @Override 12 | public void mouseClicked(MouseEvent e) { 13 | if (e.isConsumed()) { 14 | return; 15 | } 16 | 17 | if (!OSUtils.isLinux() && SwingUtilities.isMiddleMouseButton(e)) { 18 | return; 19 | } 20 | 21 | super.mouseClicked(e); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/library.properties: -------------------------------------------------------------------------------- 1 | name=Bridge 2 | version=1.6.3 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables the communication between the Linux processor and the microcontroller. For Arduino/Genuino Yún, Yún Shield and TRE only. 6 | paragraph=The Bridge library feature: access to the shared storage, run and manage linux processes, open a remote console, access to the linux file system, including the SD card, enstablish http clients or servers. 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/YunBridgeLibrary 9 | architectures=* 10 | dot_a_linkage=true 11 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/library.properties: -------------------------------------------------------------------------------- 1 | name=Bridge 2 | version=1.7.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables the communication between the Linux processor and the microcontroller. For Arduino/Genuino Yún, Yún Shield and TRE only. 6 | paragraph=The Bridge library feature: access to the shared storage, run and manage linux processes, open a remote console, access to the linux file system, including the SD card, enstablish http clients or servers. 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/YunBridgeLibrary 9 | architectures=* 10 | dot_a_linkage=true 11 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/linux/UDevAdmParser.java: -------------------------------------------------------------------------------- 1 | package processing.app.linux; 2 | 3 | import java.io.IOException; 4 | import java.io.StringReader; 5 | import java.util.Properties; 6 | 7 | public class UDevAdmParser { 8 | 9 | public String extractVIDAndPID(String output) throws IOException { 10 | Properties properties = new Properties(); 11 | properties.load(new StringReader(output)); 12 | 13 | Object vid = properties.get("ID_VENDOR_ID"); 14 | Object pid = properties.get("ID_MODEL_ID"); 15 | if (vid == null || pid == null) 16 | return null; 17 | return ("0x" + vid + "_0x" + pid).toUpperCase(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/legacy/PConstants.java: -------------------------------------------------------------------------------- 1 | package processing.app.legacy; 2 | 3 | public class PConstants { 4 | 5 | // platform IDs for PApplet.platform 6 | 7 | public static final int OTHER = 0; 8 | public static final int WINDOWS = 1; 9 | public static final int MACOSX = 2; 10 | public static final int LINUX = 3; 11 | 12 | public static final String[] platformNames = { 13 | "other", "windows", "macosx", "linux" 14 | }; 15 | 16 | 17 | // used by split, all the standard whitespace chars 18 | // (also includes unicode nbsp, that little bostage) 19 | 20 | static final String WHITESPACE = " \t\n\r\f\u00A0"; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/helpers/UserNotifier.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | public abstract class UserNotifier { 4 | 5 | public void showError(String title, String message, int exit_code) { 6 | showError(title, message, null, exit_code); 7 | } 8 | 9 | public void showError(String title, String message, Throwable e) { 10 | showError(title, message, e, 1); 11 | } 12 | 13 | public abstract void showError(String title, String message, Throwable e, int exit_code); 14 | 15 | public abstract void showMessage(String title, String message); 16 | 17 | public abstract void showWarning(String title, String message, Exception e); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | renesas_rl78_arduino_core_rules () { 4 | echo "" 5 | echo "# Renesas RL78 Arduino UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/99-renesas-rl78-arduino.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /app/lib/README.xml-apis-ext-1.3.04.txt: -------------------------------------------------------------------------------- 1 | This distribution includes xml-apis-ext.jar from the XML Commons External 2 | 1.3.04 binary distribution, which can also be obtained from: 3 | 4 | http://xml.apache.org/mirrors.cgi 5 | 6 | Source code is available from the XML Commons web site: 7 | 8 | http://xml.apache.org/commons/ 9 | 10 | xml-apis-ext.jar contains: 11 | 12 | - SAC 1.3 13 | - SMIL Java bindings 14 | - SVG 1.1 Java bindings 15 | 16 | SAC 1.3, the SMIL Java bindings and the SVG 1.1 Java bindings are licensed 17 | under the W3C Software License. Related documentation is licensed under the 18 | W3C Document License. See LICENSE.dom-software.txt and 19 | LICENSE.dom-documentation.txt. 20 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | certs.py 6 | ~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | 15 | import os.path 16 | 17 | 18 | def where(): 19 | """Return the preferred certificate bundle.""" 20 | # vendored bundle inside Requests 21 | return os.path.join(os.path.dirname(__file__), 'cacert.pem') 22 | 23 | if __name__ == '__main__': 24 | print(where()) 25 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### All Submissions: 2 | 3 | * [ ] Have you followed the guidelines in our Contributing document? 4 | * [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/arduino/Arduino/pulls?q=) for the same update/change? 5 | 6 | 7 | 8 | ### New Feature Submissions: 9 | 10 | 1. [ ] Does your submission pass tests? 11 | 2. [ ] Have you lint your code locally prior to submission? 12 | 13 | ### Changes to Core Features: 14 | 15 | * [ ] Have you added an explanation of what your changes do and why you'd like us to include them? 16 | * [ ] Have you written new tests for your core changes, as applicable? 17 | * [ ] Have you successfully ran tests with your changes 18 | -------------------------------------------------------------------------------- /app/src/processing/app/syntax/SketchTextAreaUI.java: -------------------------------------------------------------------------------- 1 | package processing.app.syntax; 2 | 3 | import org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaUI; 4 | 5 | import javax.swing.*; 6 | import javax.swing.text.Caret; 7 | import javax.swing.text.EditorKit; 8 | import javax.swing.text.JTextComponent; 9 | 10 | public class SketchTextAreaUI extends RSyntaxTextAreaUI { 11 | 12 | private static final EditorKit defaultKit = new SketchTextAreaEditorKit(); 13 | 14 | public SketchTextAreaUI(JComponent rSyntaxTextArea) { 15 | super(rSyntaxTextArea); 16 | } 17 | 18 | @Override 19 | public EditorKit getEditorKit(JTextComponent tc) { 20 | return defaultKit; 21 | } 22 | 23 | @Override 24 | protected Caret createCaret() { 25 | Caret caret = new MyConfigurableCaret(); 26 | caret.setBlinkRate(500); 27 | return caret; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.1.1/SD/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SD 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SD KEYWORD1 SD 10 | File KEYWORD1 SD 11 | SDFile KEYWORD1 SD 12 | 13 | ####################################### 14 | # Methods and Functions (KEYWORD2) 15 | ####################################### 16 | begin KEYWORD2 17 | exists KEYWORD2 18 | mkdir KEYWORD2 19 | remove KEYWORD2 20 | rmdir KEYWORD2 21 | open KEYWORD2 22 | close KEYWORD2 23 | seek KEYWORD2 24 | position KEYWORD2 25 | size KEYWORD2 26 | 27 | ####################################### 28 | # Constants (LITERAL1) 29 | ####################################### 30 | FILE_READ LITERAL1 31 | FILE_WRITE LITERAL1 32 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.2.1/SD/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SD 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SD KEYWORD1 SD 10 | File KEYWORD1 SD 11 | SDFile KEYWORD1 SD 12 | 13 | ####################################### 14 | # Methods and Functions (KEYWORD2) 15 | ####################################### 16 | begin KEYWORD2 17 | exists KEYWORD2 18 | mkdir KEYWORD2 19 | remove KEYWORD2 20 | rmdir KEYWORD2 21 | open KEYWORD2 22 | close KEYWORD2 23 | seek KEYWORD2 24 | position KEYWORD2 25 | size KEYWORD2 26 | 27 | ####################################### 28 | # Constants (LITERAL1) 29 | ####################################### 30 | FILE_READ LITERAL1 31 | FILE_WRITE LITERAL1 32 | -------------------------------------------------------------------------------- /app/test/processing/app/debug/TargetPackageStub.java: -------------------------------------------------------------------------------- 1 | package processing.app.debug; 2 | 3 | import java.util.Collection; 4 | import java.util.Map; 5 | 6 | public class TargetPackageStub implements TargetPackage { 7 | 8 | private final String id; 9 | 10 | public TargetPackageStub(String id) { 11 | this.id = id; 12 | } 13 | 14 | @Override 15 | public String getId() { 16 | return id; 17 | } 18 | 19 | @Override 20 | public Map getPlatforms() { 21 | return null; 22 | } 23 | 24 | @Override 25 | public Collection platforms() { 26 | return null; 27 | } 28 | 29 | @Override 30 | public TargetPlatform get(String platform) { 31 | return null; 32 | } 33 | 34 | @Override 35 | public boolean hasPlatform(TargetPlatform platform) { 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/test/processing/app/linux/udev_output.txt: -------------------------------------------------------------------------------- 1 | DEVLINKS=/dev/arduino_leonardo /dev/serial/by-id/usb-Arduino_LLC_Arduino_Leonardo-if00 /dev/serial/by-path/pci-0000:00:14.0-usb-0:2.3:1.0 2 | DEVNAME=/dev/ttyACM0 3 | DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.3/3-2.3:1.0/tty/ttyACM0 4 | ID_BUS=usb 5 | ID_MM_CANDIDATE=1 6 | ID_MODEL=Arduino_Leonardo 7 | ID_MODEL_ENC=Arduino\x20Leonardo 8 | ID_MODEL_ID=0036 9 | ID_PATH=pci-0000:00:14.0-usb-0:2.3:1.0 10 | ID_PATH_TAG=pci-0000_00_14_0-usb-0_2_3_1_0 11 | ID_REVISION=0001 12 | ID_SERIAL=Arduino_LLC_Arduino_Leonardo 13 | ID_TYPE=generic 14 | ID_USB_DRIVER=cdc_acm 15 | ID_USB_INTERFACES=:020201:0a0000: 16 | ID_USB_INTERFACE_NUM=00 17 | ID_VENDOR=Arduino_LLC 18 | ID_VENDOR_ENC=Arduino\x20LLC 19 | ID_VENDOR_ID=2341 20 | MAJOR=166 21 | MINOR=0 22 | SUBSYSTEM=tty 23 | UDEV_LOG=3 24 | USEC_INITIALIZED=21035594802 25 | -------------------------------------------------------------------------------- /app/test/cc/arduino/contributions/libraries/LibraryOfTypeComparatorTest.java: -------------------------------------------------------------------------------- 1 | package cc.arduino.contributions.libraries; 2 | 3 | import org.junit.Test; 4 | 5 | import java.util.Arrays; 6 | import java.util.Collections; 7 | import java.util.List; 8 | 9 | import static org.junit.Assert.assertEquals; 10 | 11 | public class LibraryOfTypeComparatorTest { 12 | 13 | @Test 14 | public void testSort() throws Exception { 15 | List strings = Arrays.asList("Arduino", "Contributed", "Recommended", "Recommended", "Other", "1yetanother", "Arduino", "Recommended", "Contributed", "Recommended"); 16 | Collections.sort(strings, new LibraryTypeComparator()); 17 | assertEquals(Arrays.asList("Arduino", "Arduino", "Recommended", "Recommended", "Recommended", "Recommended", "Contributed", "Contributed", "1yetanother", "Other"), strings); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/push.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | #vim:set fileencoding=utf-8 sw=2 expandtab 3 | 4 | from transifex import Transifex 5 | 6 | def main(): 7 | import getpass 8 | import sys 9 | 10 | print 'Use your account to talk with Transifex.' 11 | user = raw_input('Username: ') 12 | passwd = getpass.getpass('Password: ') 13 | trans = Transifex(user, passwd) 14 | 15 | for lang in sys.argv[1:]: 16 | fname = 'Resources_%s.po' % lang 17 | print "Updating %s on Transifex using %s..." % (lang, fname), 18 | sys.stdout.flush() 19 | try: 20 | lang = trans.canonical_lang(lang) 21 | trans.push(lang, ''.join(open(fname))) 22 | except RuntimeError, e: 23 | print e.message 24 | continue 25 | except IOError, e: 26 | print e.strerror 27 | continue 28 | print 29 | 30 | if __name__ == '__main__': 31 | main() 32 | -------------------------------------------------------------------------------- /.github/workflows/ant.yml: -------------------------------------------------------------------------------- 1 | name: Java CI 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Set up JDK 1.8 15 | uses: actions/setup-java@v1 16 | with: 17 | java-version: 1.8 18 | - name: Build with Ant 19 | working-directory: ./build 20 | run: | 21 | sed -i 's###' build.xml 22 | ant clean dist 23 | - name: Install X virtual framebuffer 24 | run: sudo apt-get install -y xvfb 25 | - name: Run tests 26 | working-directory: ./app 27 | run: xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" ant test -Drunning-from-github-action=1 28 | - name: Publish results 29 | uses: actions/upload-artifact@v1 30 | with: 31 | name: html-results 32 | path: app/test-bin/results/html/ 33 | - name: Cleanup xvfb 34 | uses: bcomnes/cleanup-xvfb@v1 35 | -------------------------------------------------------------------------------- /app/lib/README.xml-apis-1.3.04.txt: -------------------------------------------------------------------------------- 1 | This distribution includes xml-apis.jar from the XML Commons External 2 | 1.3.04 binary distribution, which can also be obtained from: 3 | 4 | http://xml.apache.org/mirrors.cgi 5 | 6 | Source code is available from the XML Commons web site: 7 | 8 | http://xml.apache.org/commons/ 9 | 10 | xml-apis.jar contains: 11 | 12 | - DOM Level 2 Events 13 | - DOM Level 2 HTML 14 | - DOM Level 2 Style 15 | - DOM Level 2 Traversal and Range 16 | - DOM Level 2 Views 17 | - DOM Level 3 Core 18 | - DOM Level 3 Load and Save 19 | - DOM Level 3 XPath 20 | - JAXP 1.3 (JSR 206) 21 | - SAX 22 | 23 | All DOM code is licensed under the W3C Software License, and DOM documentation 24 | under the W3C Document License. See LICENSE.dom-software.txt and 25 | LICENSE.dom-documentation.txt. 26 | 27 | The JAXP 1.3 code is licensed under the Apache Software License 2.0, which is 28 | in the LICENSE in the root directory of this distribution. 29 | 30 | SAX is public domain. See LICENSE.sax.txt. 31 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.1.1/SD/README.adoc: -------------------------------------------------------------------------------- 1 | = SD Library for Arduino = 2 | 3 | The SD library allows for reading from and writing to SD cards. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/SD 7 | 8 | == License == 9 | 10 | Copyright (C) 2009 by William Greiman 11 | Copyright (c) 2010 SparkFun Electronics 12 | 13 | This program is free software: you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation, either version 3 of the License, or 16 | (at your option) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | GNU General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License 24 | along with this program. If not, see . 25 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.2.1/SD/README.adoc: -------------------------------------------------------------------------------- 1 | = SD Library for Arduino = 2 | 3 | The SD library allows for reading from and writing to SD cards. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/SD 7 | 8 | == License == 9 | 10 | Copyright (C) 2009 by William Greiman 11 | Copyright (c) 2010 SparkFun Electronics 12 | 13 | This program is free software: you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation, either version 3 of the License, or 16 | (at your option) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | GNU General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License 24 | along with this program. If not, see . 25 | -------------------------------------------------------------------------------- /app/.classpath_macosx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | 14 | """ 15 | 16 | 17 | HOOKS = ['response'] 18 | 19 | 20 | def default_hooks(): 21 | hooks = {} 22 | for event in HOOKS: 23 | hooks[event] = [] 24 | return hooks 25 | 26 | # TODO: response is the only one 27 | 28 | 29 | def dispatch_hook(key, hooks, hook_data, **kwargs): 30 | """Dispatches a hook dictionary on a given piece of data.""" 31 | 32 | hooks = hooks or dict() 33 | 34 | if key in hooks: 35 | hooks = hooks.get(key) 36 | 37 | if hasattr(hooks, '__call__'): 38 | hooks = [hooks] 39 | 40 | for hook in hooks: 41 | _hook_data = hook(hook_data, **kwargs) 42 | if _hook_data is not None: 43 | hook_data = _hook_data 44 | 45 | return hook_data 46 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/helpers/OSUtils.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | public class OSUtils { 4 | 5 | /** 6 | * returns true if running on windows. 7 | */ 8 | static public boolean isWindows() { 9 | //return PApplet.platform == PConstants.WINDOWS; 10 | return System.getProperty("os.name").contains("Windows"); 11 | } 12 | 13 | /** 14 | * true if running on linux. 15 | */ 16 | static public boolean isLinux() { 17 | //return PApplet.platform == PConstants.LINUX; 18 | return System.getProperty("os.name").contains("Linux"); 19 | } 20 | 21 | /** 22 | * returns true if Processing is running on a Mac OS X machine. 23 | */ 24 | static public boolean isMacOS() { 25 | //return PApplet.platform == PConstants.MACOSX; 26 | return System.getProperty("os.name").contains("Mac"); 27 | } 28 | 29 | static public boolean hasMacOSStyleMenus() { 30 | return OSUtils.isMacOS() && "true".equals(System.getProperty("apple.laf.useScreenMenuBar")); 31 | } 32 | 33 | static public String version() { 34 | return System.getProperty("os.version"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/helpers/ProcessUtils.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | 6 | public class ProcessUtils { 7 | 8 | public static Process exec(String[] command) throws IOException { 9 | // No problems on linux and mac 10 | if (!OSUtils.isWindows()) { 11 | return Runtime.getRuntime().exec(command); 12 | } 13 | 14 | // Brutal hack to workaround windows command line parsing. 15 | // http://stackoverflow.com/questions/5969724/java-runtime-exec-fails-to-escape-characters-properly 16 | // http://msdn.microsoft.com/en-us/library/a1y7w461.aspx 17 | // http://bugs.sun.com/view_bug.do?bug_id=6468220 18 | // http://bugs.sun.com/view_bug.do?bug_id=6518827 19 | String[] cmdLine = new String[command.length]; 20 | for (int i = 0; i < command.length; i++) 21 | cmdLine[i] = command[i].replace("\"", "\\\""); 22 | 23 | ProcessBuilder pb = new ProcessBuilder(cmdLine); 24 | Map env = pb.environment(); 25 | env.put("CYGWIN", "nodosfilewarning"); 26 | return pb.start(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/test/cc/arduino/net/PACSupportMethodsTest.java: -------------------------------------------------------------------------------- 1 | package cc.arduino.net; 2 | 3 | import org.junit.Before; 4 | import org.junit.Test; 5 | 6 | import static org.junit.Assert.assertFalse; 7 | import static org.junit.Assert.assertTrue; 8 | 9 | public class PACSupportMethodsTest { 10 | 11 | private PACSupportMethods pacSupportMethods; 12 | 13 | @Before 14 | public void setUp() throws Exception { 15 | pacSupportMethods = new PACSupportMethods(); 16 | } 17 | 18 | @Test 19 | public void testIsInNet() throws Exception { 20 | assertFalse(pacSupportMethods.isInNet("192.168.0.121", "198.95.249.79", "255.255.255.255")); 21 | assertFalse(pacSupportMethods.isInNet("198.95.249.78", "198.95.249.79", "255.255.255.255")); 22 | assertTrue(pacSupportMethods.isInNet("198.95.249.79", "198.95.249.79", "255.255.255.255")); 23 | 24 | assertFalse(pacSupportMethods.isInNet("192.168.0.121", "198.95.0.0", "255.255.0.0")); 25 | assertTrue(pacSupportMethods.isInNet("198.95.249.78", "198.95.0.0", "255.255.0.0")); 26 | assertTrue(pacSupportMethods.isInNet("198.95.249.79", "198.95.0.0", "255.255.0.0")); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/README.adoc: -------------------------------------------------------------------------------- 1 | = Bridge Library for Arduino = 2 | 3 | The Bridge library simplifies communication between the ATmega32U4 and the AR9331. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/YunBridgeLibrary 7 | 8 | == License == 9 | 10 | Copyright (c) 2014 Arduino LLC. All right reserved. 11 | 12 | This library is free software; you can redistribute it and/or 13 | modify it under the terms of the GNU Lesser General Public 14 | License as published by the Free Software Foundation; either 15 | version 2.1 of the License, or (at your option) any later version. 16 | 17 | This library is distributed in the hope that it will be useful, 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | Lesser General Public License for more details. 21 | 22 | You should have received a copy of the GNU Lesser General Public 23 | License along with this library; if not, write to the Free Software 24 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 25 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/README.adoc: -------------------------------------------------------------------------------- 1 | = Bridge Library for Arduino = 2 | 3 | The Bridge library simplifies communication between the ATmega32U4 and the AR9331. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/YunBridgeLibrary 7 | 8 | == License == 9 | 10 | Copyright (c) 2014 Arduino LLC. All right reserved. 11 | 12 | This library is free software; you can redistribute it and/or 13 | modify it under the terms of the GNU Lesser General Public 14 | License as published by the Free Software Foundation; either 15 | version 2.1 of the License, or (at your option) any later version. 16 | 17 | This library is distributed in the hope that it will be useful, 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | Lesser General Public License for more details. 21 | 22 | You should have received a copy of the GNU Lesser General Public 23 | License along with this library; if not, write to the Free Software 24 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 25 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/src/YunClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _YUN_CLIENT_H_ 20 | #define _YUN_CLIENT_H_ 21 | 22 | #include 23 | 24 | #warning "The use of YunClient is deprecated. Use BridgeClient instead!" 25 | typedef BridgeClient YunClient; 26 | 27 | #endif // _YUN_CLIENT_H_ 28 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/src/YunServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _YUN_SERVER_H_ 20 | #define _YUN_SERVER_H_ 21 | 22 | #include 23 | 24 | #warning "The use of YunServer is deprecated. Use BridgeServer instead!" 25 | typedef BridgeServer YunServer; 26 | 27 | #endif // _YUN_SERVER_H_ 28 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/src/YunClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _YUN_CLIENT_H_ 20 | #define _YUN_CLIENT_H_ 21 | 22 | #include 23 | 24 | #warning "The use of YunClient is deprecated. Use BridgeClient instead!" 25 | typedef BridgeClient YunClient; 26 | 27 | #endif // _YUN_CLIENT_H_ 28 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/src/YunServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _YUN_SERVER_H_ 20 | #define _YUN_SERVER_H_ 21 | 22 | #include 23 | 24 | #warning "The use of YunServer is deprecated. Use BridgeServer instead!" 25 | typedef BridgeServer YunServer; 26 | 27 | #endif // _YUN_SERVER_H_ 28 | -------------------------------------------------------------------------------- /app/lib/jtouchbar.LICENSE.MIT.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 thizzer.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /app/test/processing/app/tools/test_partial_boards.txt: -------------------------------------------------------------------------------- 1 | cpu=Processor 2 | cpu.nano.atmega328=ATmega328 3 | cpu.nano.atmega328.upload.maximum_size=30720 4 | cpu.nano.atmega328.upload.speed=57600 5 | cpu.nano.atmega328.bootloader.low_fuses=0xFF 6 | cpu.nano.atmega328.bootloader.high_fuses=0xDA 7 | cpu.nano.atmega328.bootloader.extended_fuses=0x05 8 | cpu.nano.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex 9 | cpu.nano.atmega328.bootloader.unlock_bits=0x3F 10 | cpu.nano.atmega328.bootloader.lock_bits=0x0F 11 | cpu.nano.atmega328.build.mcu=atmega328p 12 | cpu.nano.atmega168=ATmega168 13 | cpu.nano.atmega168.upload.maximum_size=14336 14 | cpu.nano.atmega168.upload.speed=19200 15 | cpu.nano.atmega168.bootloader.low_fuses=0xff 16 | cpu.nano.atmega168.bootloader.high_fuses=0xdd 17 | cpu.nano.atmega168.bootloader.extended_fuses=0x00 18 | cpu.nano.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex 19 | cpu.nano.atmega168.bootloader.unlock_bits=0x3F 20 | cpu.nano.atmega168.bootloader.lock_bits=0x0F 21 | cpu.nano.atmega168.build.mcu=atmega168 22 | speed=Speed 23 | speed.nano.16=16 MHz 24 | speed.nano.16.build.f_cpu=16000000L 25 | speed.nano.8=8 MHz 26 | speed.nano.8.build.f_cpu=8000000L -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/charade/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Ian Cordasco - port to Python 4 | # 5 | # This library is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | # 02110-1301 USA 19 | ######################### END LICENSE BLOCK ######################### 20 | 21 | 22 | def wrap_ord(a): 23 | if isinstance(a, str): 24 | return ord(a) 25 | elif isinstance(a, int): 26 | return a 27 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/charade/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "1.0.1" 19 | 20 | 21 | def detect(aBuf): 22 | from . import universaldetector 23 | u = universaldetector.UniversalDetector() 24 | u.reset() 25 | u.feed(aBuf) 26 | u.close() 27 | return u.result 28 | -------------------------------------------------------------------------------- /app/src/processing/app/RunnerListener.java: -------------------------------------------------------------------------------- 1 | /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Processing project - http://processing.org 5 | 6 | Copyright (c) 2008 Ben Fry and Casey Reas 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software Foundation, 20 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | package processing.app; 24 | 25 | 26 | public interface RunnerListener { 27 | 28 | public void statusError(String message); 29 | 30 | public void statusError(Exception exception); 31 | 32 | public void statusNotice(String message); 33 | } 34 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/RemoteDueBlink/RemoteDueBlink.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Blink 3 | Turns on an LED on for one second, then off for one second, repeatedly. 4 | 5 | Most Arduinos have an on-board LED you can control. On the Uno and 6 | Leonardo, it is attached to digital pin 13. If you're unsure what 7 | pin the on-board LED is connected to on your Arduino model, check 8 | the documentation at http://www.arduino.cc 9 | 10 | This example code is in the public domain. 11 | 12 | modified 8 May 2014 13 | by Scott Fitzgerald 14 | 15 | modified by Marco Brianza to show the remote sketch update feature on Arduino Due using Yún Shield 16 | */ 17 | 18 | #include 19 | 20 | // the setup function runs once when you press reset or power the board 21 | void setup() { 22 | checkForRemoteSketchUpdate(); 23 | // initialize digital pin 13 as an output. 24 | pinMode(13, OUTPUT); 25 | } 26 | 27 | // the loop function runs over and over again forever 28 | void loop() { 29 | digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) 30 | delay(100); // wait for a second 31 | digitalWrite(13, LOW); // turn the LED off by making the voltage LOW 32 | delay(100); // wait for a second 33 | } 34 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/RemoteDueBlink/RemoteDueBlink.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Blink 3 | Turns on an LED on for one second, then off for one second, repeatedly. 4 | 5 | Most Arduinos have an on-board LED you can control. On the Uno and 6 | Leonardo, it is attached to digital pin 13. If you're unsure what 7 | pin the on-board LED is connected to on your Arduino model, check 8 | the documentation at http://www.arduino.cc 9 | 10 | This example code is in the public domain. 11 | 12 | modified 8 May 2014 13 | by Scott Fitzgerald 14 | 15 | modified by Marco Brianza to show the remote sketch update feature on Arduino Due using Yún Shield 16 | */ 17 | 18 | #include 19 | 20 | // the setup function runs once when you press reset or power the board 21 | void setup() { 22 | checkForRemoteSketchUpdate(); 23 | // initialize digital pin 13 as an output. 24 | pinMode(13, OUTPUT); 25 | } 26 | 27 | // the loop function runs over and over again forever 28 | void loop() { 29 | digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) 30 | delay(100); // wait for a second 31 | digitalWrite(13, LOW); // turn the LED off by making the voltage LOW 32 | delay(100); // wait for a second 33 | } 34 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/helpers/BasicUserNotifier.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | import static processing.app.I18n.tr; 4 | 5 | public class BasicUserNotifier extends UserNotifier { 6 | 7 | /** 8 | * Show an error message that's actually fatal to the program. 9 | * This is an error that can't be recovered. Use showWarning() 10 | * for errors that allow P5 to continue running. 11 | */ 12 | @Override 13 | public void showError(String title, String message, Throwable e, int exit_code) { 14 | if (title == null) title = tr("Error"); 15 | 16 | System.err.println(title + ": " + message); 17 | 18 | if (e != null) e.printStackTrace(); 19 | System.exit(exit_code); 20 | } 21 | 22 | @Override 23 | public void showMessage(String title, String message) { 24 | if (title == null) title = tr("Message"); 25 | 26 | System.out.println(title + ": " + message); 27 | } 28 | 29 | /** 30 | * Non-fatal error message with optional stack trace side dish. 31 | */ 32 | @Override 33 | public void showWarning(String title, String message, Exception e) { 34 | if (title == null) title = tr("Warning"); 35 | 36 | System.out.println(title + ": " + message); 37 | 38 | if (e != null) e.printStackTrace(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/pull.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | #vim:set fileencoding=utf-8 sw=2 expandtab 3 | 4 | from transifex import Transifex 5 | import requests 6 | import getpass 7 | import sys 8 | import time 9 | 10 | def main(): 11 | print 'Use your account to talk with Transifex.' 12 | user = raw_input('Username: ') 13 | passwd = getpass.getpass('Password: ') 14 | trans = Transifex(user, passwd) 15 | 16 | for lang in sys.argv[1:]: 17 | fname = 'Resources_%s.po' % lang 18 | sys.stdout.flush() 19 | try: 20 | lang = trans.canonical_lang(lang) 21 | pull(trans, lang, fname) 22 | except RuntimeError, e: 23 | print e.message 24 | continue 25 | except IOError, e: 26 | print e.strerror 27 | continue 28 | 29 | def pull(trans, lang, fname): 30 | count = 0 31 | print "Updating %s from Transifex...\n" % fname, 32 | sys.stdout.flush() 33 | while count < 5: 34 | count += 1 35 | try: 36 | trans.pull(lang, fname) 37 | return 38 | except requests.exceptions.HTTPError, e: 39 | print " *** Retrying %s from Transifex...\n" % fname, 40 | time.sleep(3) 41 | sys.stdout.flush() 42 | 43 | if count >= 5: 44 | raise Exception("Too many retries") 45 | 46 | if __name__ == '__main__': 47 | main() 48 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/tools/DoubleQuotedArgumentsOnWindowsCommandLine.java: -------------------------------------------------------------------------------- 1 | package processing.app.tools; 2 | 3 | import org.apache.commons.exec.CommandLine; 4 | import processing.app.helpers.OSUtils; 5 | 6 | import java.io.File; 7 | 8 | public class DoubleQuotedArgumentsOnWindowsCommandLine extends CommandLine { 9 | 10 | public DoubleQuotedArgumentsOnWindowsCommandLine(String executable) { 11 | super(executable); 12 | } 13 | 14 | public DoubleQuotedArgumentsOnWindowsCommandLine(File executable) { 15 | super(executable); 16 | } 17 | 18 | public DoubleQuotedArgumentsOnWindowsCommandLine(CommandLine other) { 19 | super(other); 20 | } 21 | 22 | @Override 23 | public CommandLine addArgument(String argument, boolean handleQuoting) { 24 | // Brutal hack to workaround windows command line parsing. 25 | // http://stackoverflow.com/questions/5969724/java-runtime-exec-fails-to-escape-characters-properly 26 | // http://msdn.microsoft.com/en-us/library/a1y7w461.aspx 27 | // http://bugs.sun.com/view_bug.do?bug_id=6468220 28 | // http://bugs.sun.com/view_bug.do?bug_id=6518827 29 | if (argument.contains("\"") && OSUtils.isWindows()) { 30 | argument = argument.replace("\"", "\\\""); 31 | } 32 | 33 | return super.addArgument(argument, handleQuoting); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/src/BridgeSSLClient.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | BridgeSSLClient::BridgeSSLClient(uint8_t _h, BridgeClass &_b) : 22 | BridgeClient(_h, _b) 23 | { 24 | } 25 | 26 | BridgeSSLClient::BridgeSSLClient(BridgeClass &_b): 27 | BridgeClient(_b) 28 | { 29 | } 30 | 31 | BridgeSSLClient::~BridgeSSLClient() { 32 | } 33 | 34 | int BridgeSSLClient::connect(const char *host, uint16_t port) { 35 | return BridgeClient::connectSSL(host, port); 36 | } -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/src/BridgeSSLClient.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | BridgeSSLClient::BridgeSSLClient(uint8_t _h, BridgeClass &_b) : 22 | BridgeClient(_h, _b) 23 | { 24 | } 25 | 26 | BridgeSSLClient::BridgeSSLClient(BridgeClass &_b): 27 | BridgeClient(_b) 28 | { 29 | } 30 | 31 | BridgeSSLClient::~BridgeSSLClient() { 32 | } 33 | 34 | int BridgeSSLClient::connect(const char *host, uint16_t port) { 35 | return BridgeClient::connectSSL(host, port); 36 | } -------------------------------------------------------------------------------- /arduino-core/src/processing/app/debug/TargetPackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | TargetPackage - Represents a hardware package 3 | Part of the Arduino project - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2014 Cristian Maglie 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software Foundation, 19 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | package processing.app.debug; 22 | 23 | import java.util.Collection; 24 | import java.util.Map; 25 | 26 | public interface TargetPackage { 27 | 28 | String getId(); 29 | 30 | Map getPlatforms(); 31 | 32 | Collection platforms(); 33 | 34 | TargetPlatform get(String platform); 35 | 36 | boolean hasPlatform(TargetPlatform platform); 37 | } 38 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/pull.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $0 != "./pull.sh" ]; then 4 | echo "pull.sh: Invoke this script as ./pull.sh" 5 | exit 1 6 | fi 7 | 8 | ALL='n' 9 | while [ $# -gt 0 ]; do 10 | if [ $1 = '-a' ]; then 11 | ALL='y' 12 | # We must do this until java Locale class is updated... 13 | mv Resources_iw.po Resources_he.po 14 | mv Resources_iw.properties Resources_he.properties 15 | mv Resources_in.po Resources_id.po 16 | mv Resources_in.properties Resources_id.properties 17 | 18 | for f in Resources_*.po; do 19 | f=$(expr "$f" : "Resources_\(.*\).po") 20 | langs="$langs $f" 21 | done 22 | else 23 | langs="$langs $1" 24 | fi 25 | shift 26 | done 27 | 28 | if [ "$langs" = "" ]; then 29 | echo "pull.sh: Give at least one language code." 30 | exit 1 31 | fi 32 | 33 | 34 | python2 python/pull.py $langs 35 | 36 | if [ "$ALL" = "y" ]; then 37 | # We must do this until java Locale class is updated... 38 | mv Resources_he.po Resources_iw.po 39 | mv Resources_he.properties Resources_iw.properties 40 | mv Resources_id.po Resources_in.po 41 | mv Resources_id.properties Resources_in.properties 42 | fi 43 | 44 | for lang in $langs; do 45 | if [ -f "Resources_$lang.po" ]; then 46 | msgcat -p Resources_$lang.po > Resources_$lang.properties 47 | fi 48 | done 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/processing/app/tools/Tool.java: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Tool - interface implementation for the Processing tools menu 5 | Part of the Processing project - http://processing.org 6 | 7 | Copyright (c) 2008 Ben Fry and Casey Reas 8 | 9 | This program is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation; either version 2 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with this program; if not, write to the Free Software Foundation, 21 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | package processing.app.tools; 25 | 26 | import processing.app.Editor; 27 | 28 | 29 | /** 30 | * Interface for items to be shown in the Tools menu. 31 | */ 32 | public interface Tool extends Runnable { 33 | 34 | void init(Editor editor); 35 | 36 | void run(); 37 | 38 | String getMenuTitle(); 39 | 40 | } 41 | 42 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/SerialNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2007 David A. Mellis 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software Foundation, 16 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | package processing.app; 20 | 21 | @SuppressWarnings("serial") 22 | public class SerialNotFoundException extends SerialException { 23 | public SerialNotFoundException() { 24 | super(); 25 | } 26 | 27 | public SerialNotFoundException(String message) { 28 | super(message); 29 | } 30 | 31 | public SerialNotFoundException(String message, Throwable cause) { 32 | super(message, cause); 33 | } 34 | 35 | public SerialNotFoundException(Throwable cause) { 36 | super(cause); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/test/cc/arduino/net/proxy_complex.pac: -------------------------------------------------------------------------------- 1 | // example downloaded from http://findproxyforurl.com/example-pac-file/ 2 | 3 | function FindProxyForURL(url, host) { 4 | 5 | // If the hostname matches, send direct. 6 | if (dnsDomainIs(host, ".intranet.domain.com") || 7 | shExpMatch(host, "(*.abcdomain.com|abcdomain.com)")) 8 | return "DIRECT"; 9 | 10 | // If the protocol or URL matches, send direct. 11 | if (url.substring(0, 4)=="ftp:" || 12 | shExpMatch(url, "http://abcdomain.com/folder/*")) 13 | return "DIRECT"; 14 | 15 | // If the requested website is hosted within the internal network, send direct. 16 | if (isPlainHostName(host) || 17 | shExpMatch(host, "*.local") || 18 | isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") || 19 | isInNet(dnsResolve(host), "172.16.0.0", "255.240.0.0") || 20 | isInNet(dnsResolve(host), "192.168.0.0", "255.255.0.0") || 21 | isInNet(dnsResolve(host), "127.0.0.0", "255.255.255.0")) 22 | return "DIRECT"; 23 | 24 | // If the IP address of the local machine is within a defined 25 | // subnet, send to a specific proxy. 26 | if (isInNet(myIpAddress(), "10.10.5.0", "255.255.255.0")) 27 | return "PROXY 1.2.3.4:8080"; 28 | 29 | // DEFAULT RULE: All other traffic, use below proxies, in fail-over order. 30 | return "PROXY 4.5.6.7:8080; PROXY 7.8.9.10:8080"; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/processing/app/javax/swing/filechooser/FileNameExtensionFilter.java: -------------------------------------------------------------------------------- 1 | package processing.app.javax.swing.filechooser; 2 | 3 | import javax.swing.filechooser.FileFilter; 4 | import java.io.File; 5 | import java.util.Locale; 6 | 7 | public class FileNameExtensionFilter extends FileFilter { 8 | 9 | private final String description; 10 | private final String[] extensions; 11 | 12 | public FileNameExtensionFilter(String description, String... exts) { 13 | this.description = description; 14 | this.extensions = new String[exts.length]; 15 | for (int i = 0; i < exts.length; i++) { 16 | this.extensions[i] = exts[i].toLowerCase(Locale.ENGLISH); 17 | } 18 | } 19 | 20 | @Override 21 | public boolean accept(File f) { 22 | if (f == null) { 23 | return false; 24 | } 25 | 26 | if (f.isDirectory()) { 27 | return true; 28 | } 29 | 30 | String fileName = f.getName(); 31 | int i = fileName.lastIndexOf('.'); 32 | if (i > 0 && i < fileName.length() - 1) { 33 | String fileExtension = fileName.substring(i + 1).toLowerCase(Locale.ENGLISH); 34 | for (String extension : extensions) { 35 | if (extension.equals(fileExtension)) { 36 | return true; 37 | } 38 | } 39 | } 40 | 41 | return false; 42 | } 43 | 44 | @Override 45 | public String getDescription() { 46 | return description; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/testdata/sketches/Blink/Blink.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Blink 3 | 4 | Turns an LED on for one second, then off for one second, repeatedly. 5 | 6 | Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO 7 | it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to 8 | the correct LED pin independent of which board is used. 9 | If you want to know what pin the on-board LED is connected to on your Arduino 10 | model, check the Technical Specs of your board at: 11 | https://www.arduino.cc/en/Main/Products 12 | 13 | modified 8 May 2014 14 | by Scott Fitzgerald 15 | modified 2 Sep 2016 16 | by Arturo Guadalupi 17 | modified 8 Sep 2016 18 | by Colby Newman 19 | 20 | This example code is in the public domain. 21 | 22 | http://www.arduino.cc/en/Tutorial/Blink 23 | */ 24 | 25 | // the setup function runs once when you press reset or power the board 26 | void setup() { 27 | // initialize digital pin LED_BUILTIN as an output. 28 | pinMode(LED_BUILTIN, OUTPUT); 29 | } 30 | 31 | // the loop function runs over and over again forever 32 | void loop() { 33 | digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) 34 | delay(1000); // wait for a second 35 | digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW 36 | delay(1000); // wait for a second 37 | } 38 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/HttpClient/HttpClient.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Yún HTTP Client 3 | 4 | This example for the YunShield/Yún shows how create a basic 5 | HTTP client that connects to the internet and downloads 6 | content. In this case, you'll connect to the Arduino 7 | website and download a version of the logo as ASCII text. 8 | 9 | created by Tom igoe 10 | May 2013 11 | 12 | This example code is in the public domain. 13 | 14 | http://www.arduino.cc/en/Tutorial/HttpClient 15 | 16 | */ 17 | 18 | #include 19 | #include 20 | 21 | void setup() { 22 | // Bridge takes about two seconds to start up 23 | // it can be helpful to use the on-board LED 24 | // as an indicator for when it has initialized 25 | pinMode(13, OUTPUT); 26 | digitalWrite(13, LOW); 27 | Bridge.begin(); 28 | digitalWrite(13, HIGH); 29 | 30 | SerialUSB.begin(9600); 31 | 32 | while (!SerialUSB); // wait for a serial connection 33 | } 34 | 35 | void loop() { 36 | // Initialize the client library 37 | HttpClient client; 38 | 39 | // Make a HTTP request: 40 | client.get("http://www.arduino.cc/asciilogo.txt"); 41 | 42 | // if there are incoming bytes available 43 | // from the server, read them and print them: 44 | while (client.available()) { 45 | char c = client.read(); 46 | SerialUSB.print(c); 47 | } 48 | SerialUSB.flush(); 49 | 50 | delay(5000); 51 | } 52 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/HttpClient/HttpClient.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Yún HTTP Client 3 | 4 | This example for the YunShield/Yún shows how create a basic 5 | HTTP client that connects to the internet and downloads 6 | content. In this case, you'll connect to the Arduino 7 | website and download a version of the logo as ASCII text. 8 | 9 | created by Tom igoe 10 | May 2013 11 | 12 | This example code is in the public domain. 13 | 14 | http://www.arduino.cc/en/Tutorial/HttpClient 15 | 16 | */ 17 | 18 | #include 19 | #include 20 | 21 | void setup() { 22 | // Bridge takes about two seconds to start up 23 | // it can be helpful to use the on-board LED 24 | // as an indicator for when it has initialized 25 | pinMode(13, OUTPUT); 26 | digitalWrite(13, LOW); 27 | Bridge.begin(); 28 | digitalWrite(13, HIGH); 29 | 30 | SerialUSB.begin(9600); 31 | 32 | while (!SerialUSB); // wait for a serial connection 33 | } 34 | 35 | void loop() { 36 | // Initialize the client library 37 | HttpClient client; 38 | 39 | // Make a HTTP request: 40 | client.get("http://www.arduino.cc/asciilogo.txt"); 41 | 42 | // if there are incoming bytes available 43 | // from the server, read them and print them: 44 | while (client.available()) { 45 | char c = client.read(); 46 | SerialUSB.print(c); 47 | } 48 | SerialUSB.flush(); 49 | 50 | delay(5000); 51 | } 52 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/SerialException.java: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Copyright (c) 2007 David A. Mellis 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software Foundation, 18 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package processing.app; 22 | 23 | import java.io.IOException; 24 | 25 | @SuppressWarnings("serial") 26 | public class SerialException extends IOException { 27 | public SerialException() { 28 | super(); 29 | } 30 | 31 | public SerialException(String message) { 32 | super(message); 33 | } 34 | 35 | public SerialException(String message, Throwable cause) { 36 | super(message, cause); 37 | } 38 | 39 | public SerialException(Throwable cause) { 40 | super(cause); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/src/BridgeSSLClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _BRIDGE_SSL_CLIENT_H_ 20 | #define _BRIDGE_SSL_CLIENT_H_ 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | class BridgeSSLClient : public BridgeClient { 27 | public: 28 | // Constructor with a user provided BridgeClass instance 29 | BridgeSSLClient(uint8_t _h, BridgeClass &_b = Bridge); 30 | BridgeSSLClient(BridgeClass &_b = Bridge); 31 | ~BridgeSSLClient(); 32 | 33 | virtual int connect(const char* host, uint16_t port); 34 | }; 35 | 36 | #endif // _BRIDGE_SSL_CLIENT_H_ 37 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/src/BridgeSSLClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _BRIDGE_SSL_CLIENT_H_ 20 | #define _BRIDGE_SSL_CLIENT_H_ 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | class BridgeSSLClient : public BridgeClient { 27 | public: 28 | // Constructor with a user provided BridgeClass instance 29 | BridgeSSLClient(uint8_t _h, BridgeClass &_b = Bridge); 30 | BridgeSSLClient(BridgeClass &_b = Bridge); 31 | ~BridgeSSLClient(); 32 | 33 | virtual int connect(const char* host, uint16_t port); 34 | }; 35 | 36 | #endif // _BRIDGE_SSL_CLIENT_H_ 37 | -------------------------------------------------------------------------------- /app/src/processing/app/helpers/Ticks.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | public class Ticks { 4 | 5 | private final int tickCount; 6 | private final double[] ticks; 7 | private double tickMin; 8 | private double tickMax; 9 | private double tickStep; 10 | 11 | public Ticks(double min, double max, int tickCount) { 12 | double range = max - min; 13 | double exp; 14 | if (range == 0.0) { 15 | exp = 0; 16 | } else { 17 | exp = Math.floor(Math.log10(range / (tickCount - 1))); 18 | } 19 | double scale = Math.pow(10, exp); 20 | 21 | double rawTickStep = (range / (tickCount - 1)) / scale; 22 | for (double potentialStep : new double[]{1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0}) { 23 | if (potentialStep < rawTickStep) { 24 | continue; 25 | } 26 | 27 | tickStep = potentialStep * scale; 28 | tickMin = tickStep * Math.floor(min / tickStep); 29 | tickMax = tickMin + tickStep * (tickCount - 1); 30 | if (tickMax >= max) { 31 | break; 32 | } 33 | } 34 | 35 | tickCount -= (int) Math.floor((tickMax - max) / tickStep); 36 | this.tickCount = tickCount; 37 | 38 | ticks = new double[tickCount]; 39 | for (int i = 0; i < tickCount; ++i) { 40 | ticks[i] = tickMin + i * tickStep; 41 | } 42 | } 43 | 44 | public double getTick(int i) { 45 | return ticks[i]; 46 | } 47 | 48 | public int getTickCount() { 49 | return tickCount; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.exceptions 5 | ~~~~~~~~~~~~~~~~~~~ 6 | 7 | This module contains the set of Requests' exceptions. 8 | 9 | """ 10 | 11 | 12 | class RequestException(RuntimeError): 13 | """There was an ambiguous exception that occurred while handling your 14 | request.""" 15 | 16 | 17 | class HTTPError(RequestException): 18 | """An HTTP error occurred.""" 19 | 20 | def __init__(self, *args, **kwargs): 21 | """ Initializes HTTPError with optional `response` object. """ 22 | self.response = kwargs.pop('response', None) 23 | super(HTTPError, self).__init__(*args, **kwargs) 24 | 25 | 26 | class ConnectionError(RequestException): 27 | """A Connection error occurred.""" 28 | 29 | 30 | class SSLError(ConnectionError): 31 | """An SSL error occurred.""" 32 | 33 | 34 | class Timeout(RequestException): 35 | """The request timed out.""" 36 | 37 | 38 | class URLRequired(RequestException): 39 | """A valid URL is required to make a request.""" 40 | 41 | 42 | class TooManyRedirects(RequestException): 43 | """Too many redirects.""" 44 | 45 | 46 | class MissingSchema(RequestException, ValueError): 47 | """The URL schema (e.g. http or https) is missing.""" 48 | 49 | 50 | class InvalidSchema(RequestException, ValueError): 51 | """See defaults.py for valid schemas.""" 52 | 53 | 54 | class InvalidURL(RequestException, ValueError): 55 | """ The URL provided was somehow invalid. """ 56 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/HttpClientConsole/HttpClientConsole.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Yún HTTP Client Console version for Arduino Uno and Mega using Yún Shield 3 | 4 | This example for the YunShield/Yún shows how create a basic 5 | HTTP client that connects to the internet and downloads 6 | content. In this case, you'll connect to the Arduino 7 | website and download a version of the logo as ASCII text. 8 | 9 | created by Tom igoe 10 | May 2013 11 | modified by Marco Brianza to use Console 12 | 13 | This example code is in the public domain. 14 | 15 | http://www.arduino.cc/en/Tutorial/HttpClient 16 | 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | void setup() { 24 | // Bridge takes about two seconds to start up 25 | // it can be helpful to use the on-board LED 26 | // as an indicator for when it has initialized 27 | pinMode(13, OUTPUT); 28 | digitalWrite(13, LOW); 29 | Bridge.begin(); 30 | digitalWrite(13, HIGH); 31 | 32 | Console.begin(); 33 | 34 | while (!Console); // wait for a serial connection 35 | } 36 | 37 | void loop() { 38 | // Initialize the client library 39 | HttpClient client; 40 | 41 | // Make a HTTP request: 42 | client.get("http://www.arduino.cc/asciilogo.txt"); 43 | 44 | // if there are incoming bytes available 45 | // from the server, read them and print them: 46 | while (client.available()) { 47 | char c = client.read(); 48 | Console.print(c); 49 | } 50 | Console.flush(); 51 | 52 | delay(5000); 53 | } 54 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/HttpClientConsole/HttpClientConsole.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Yún HTTP Client Console version for Arduino Uno and Mega using Yún Shield 3 | 4 | This example for the YunShield/Yún shows how create a basic 5 | HTTP client that connects to the internet and downloads 6 | content. In this case, you'll connect to the Arduino 7 | website and download a version of the logo as ASCII text. 8 | 9 | created by Tom igoe 10 | May 2013 11 | modified by Marco Brianza to use Console 12 | 13 | This example code is in the public domain. 14 | 15 | http://www.arduino.cc/en/Tutorial/HttpClient 16 | 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | void setup() { 24 | // Bridge takes about two seconds to start up 25 | // it can be helpful to use the on-board LED 26 | // as an indicator for when it has initialized 27 | pinMode(13, OUTPUT); 28 | digitalWrite(13, LOW); 29 | Bridge.begin(); 30 | digitalWrite(13, HIGH); 31 | 32 | Console.begin(); 33 | 34 | while (!Console); // wait for a serial connection 35 | } 36 | 37 | void loop() { 38 | // Initialize the client library 39 | HttpClient client; 40 | 41 | // Make a HTTP request: 42 | client.get("http://www.arduino.cc/asciilogo.txt"); 43 | 44 | // if there are incoming bytes available 45 | // from the server, read them and print them: 46 | while (client.available()) { 47 | char c = client.read(); 48 | Console.print(c); 49 | } 50 | Console.flush(); 51 | 52 | delay(5000); 53 | } 54 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/helpers/NetUtils.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | import java.io.IOException; 4 | import java.net.InetAddress; 5 | import java.net.InetSocketAddress; 6 | import java.net.Socket; 7 | import java.util.Arrays; 8 | import java.util.List; 9 | 10 | public abstract class NetUtils { 11 | 12 | private static boolean isReachableByEcho(InetAddress address) { 13 | try { 14 | return address.isReachable(300); 15 | } catch (IOException e) { 16 | return false; 17 | } 18 | } 19 | 20 | public static boolean isReachable(InetAddress address, int port) { 21 | return isReachable(address, Arrays.asList(port)); 22 | } 23 | 24 | public static boolean isReachable(InetAddress address, List ports) { 25 | if (isReachableByEcho(address)) { 26 | return true; 27 | } 28 | 29 | boolean reachable = false; 30 | for (Integer port : ports) { 31 | reachable = reachable || isPortOpen(address, port); 32 | } 33 | 34 | return reachable; 35 | } 36 | 37 | private static boolean isPortOpen(InetAddress address, int port) { 38 | Socket socket = null; 39 | try { 40 | socket = new Socket(); 41 | socket.connect(new InetSocketAddress(address, port), 1000); 42 | return true; 43 | } catch (IOException e) { 44 | return false; 45 | } finally { 46 | if (socket != null) { 47 | try { 48 | socket.close(); 49 | } catch (IOException e) { 50 | // noop 51 | } 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/charade/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /app/lib/RSyntaxTextArea.License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Robert Futrell 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the author nor the names of its contributors may 12 | be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /app/test/optiboot_atmega328.hex: -------------------------------------------------------------------------------- 1 | :107E0000112484B714BE81FFF0D085E080938100F7 2 | :107E100082E08093C00088E18093C10086E0809377 3 | :107E2000C20080E18093C4008EE0C9D0259A86E02C 4 | :107E300020E33CEF91E0309385002093840096BBD3 5 | :107E4000B09BFECF1D9AA8958150A9F7CC24DD24C4 6 | :107E500088248394B5E0AB2EA1E19A2EF3E0BF2EE7 7 | :107E6000A2D0813461F49FD0082FAFD0023811F036 8 | :107E7000013811F484E001C083E08DD089C08234E0 9 | :107E800011F484E103C0853419F485E0A6D080C0E4 10 | :107E9000853579F488D0E82EFF2485D0082F10E0AE 11 | :107EA000102F00270E291F29000F111F8ED06801E7 12 | :107EB0006FC0863521F484E090D080E0DECF843638 13 | :107EC00009F040C070D06FD0082F6DD080E0C81688 14 | :107ED00080E7D80618F4F601B7BEE895C0E0D1E017 15 | :107EE00062D089930C17E1F7F0E0CF16F0E7DF06D8 16 | :107EF00018F0F601B7BEE89568D007B600FCFDCFD4 17 | :107F0000A601A0E0B1E02C9130E011968C91119780 18 | :107F100090E0982F8827822B932B1296FA010C0160 19 | :107F200087BEE89511244E5F5F4FF1E0A038BF0790 20 | :107F300051F7F601A7BEE89507B600FCFDCF97BE46 21 | :107F4000E89526C08437B1F42ED02DD0F82E2BD052 22 | :107F50003CD0F601EF2C8F010F5F1F4F84911BD097 23 | :107F6000EA94F801C1F70894C11CD11CFA94CF0C13 24 | :107F7000D11C0EC0853739F428D08EE10CD085E9AC 25 | :107F80000AD08FE07ACF813511F488E018D01DD067 26 | :107F900080E101D065CF982F8091C00085FFFCCF94 27 | :107FA0009093C60008958091C00087FFFCCF809118 28 | :107FB000C00084FD01C0A8958091C6000895E0E648 29 | :107FC000F0E098E1908380830895EDDF803219F02E 30 | :107FD00088E0F5DFFFCF84E1DECF1F93182FE3DFCA 31 | :107FE0001150E9F7F2DF1F91089580E0E8DFEE27F6 32 | :047FF000FF270994CA 33 | :027FFE00040479 34 | :0400000300007E007B 35 | :00000001FF 36 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/helpers/filefilters/OnlyFilesWithExtension.java: -------------------------------------------------------------------------------- 1 | /* 2 | OnlyFilesWithExtension - FilenameFilter that accepts only files with a 3 | specific extension. 4 | Part of the Arduino project - http://www.arduino.cc/ 5 | 6 | Copyright (c) 2011 Cristian Maglie 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software Foundation, 20 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | package processing.app.helpers.filefilters; 23 | 24 | import java.io.File; 25 | import java.io.FilenameFilter; 26 | 27 | public class OnlyFilesWithExtension implements FilenameFilter { 28 | 29 | String extensions[]; 30 | 31 | public OnlyFilesWithExtension(String... ext) { 32 | this.extensions = ext; 33 | } 34 | 35 | @Override 36 | public boolean accept(File dir, String name) { 37 | for (String ext : extensions) { 38 | if (name.endsWith(ext)) { 39 | return true; 40 | } 41 | } 42 | return false; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/WiFiStatus/WiFiStatus.ino: -------------------------------------------------------------------------------- 1 | /* 2 | WiFi Status 3 | 4 | This sketch runs a script called "pretty-wifi-info.lua" 5 | installed on your Yún in folder /usr/bin. 6 | It prints information about the status of your wifi connection. 7 | 8 | It uses Serial to print, so you need to connect your YunShield/Yún to your 9 | computer using a USB cable and select the appropriate port from 10 | the Port menu 11 | 12 | created 18 June 2013 13 | By Federico Fissore 14 | 15 | This example code is in the public domain. 16 | 17 | http://www.arduino.cc/en/Tutorial/YunWiFiStatus 18 | 19 | */ 20 | 21 | #include 22 | 23 | void setup() { 24 | SerialUSB.begin(9600); // initialize serial communication 25 | while (!SerialUSB); // do nothing until the serial monitor is opened 26 | 27 | SerialUSB.println("Starting bridge...\n"); 28 | pinMode(13, OUTPUT); 29 | digitalWrite(13, LOW); 30 | Bridge.begin(); // make contact with the linux processor 31 | digitalWrite(13, HIGH); // Led on pin 13 turns on when the bridge is ready 32 | 33 | delay(2000); // wait 2 seconds 34 | } 35 | 36 | void loop() { 37 | Process wifiCheck; // initialize a new process 38 | 39 | wifiCheck.runShellCommand("/usr/bin/pretty-wifi-info.lua"); // command you want to run 40 | 41 | // while there's any characters coming back from the 42 | // process, print them to the serial monitor: 43 | while (wifiCheck.available() > 0) { 44 | char c = wifiCheck.read(); 45 | SerialUSB.print(c); 46 | } 47 | 48 | SerialUSB.println(); 49 | 50 | delay(5000); 51 | } 52 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/WiFiStatus/WiFiStatus.ino: -------------------------------------------------------------------------------- 1 | /* 2 | WiFi Status 3 | 4 | This sketch runs a script called "pretty-wifi-info.lua" 5 | installed on your Yún in folder /usr/bin. 6 | It prints information about the status of your wifi connection. 7 | 8 | It uses Serial to print, so you need to connect your YunShield/Yún to your 9 | computer using a USB cable and select the appropriate port from 10 | the Port menu 11 | 12 | created 18 June 2013 13 | By Federico Fissore 14 | 15 | This example code is in the public domain. 16 | 17 | http://www.arduino.cc/en/Tutorial/YunWiFiStatus 18 | 19 | */ 20 | 21 | #include 22 | 23 | void setup() { 24 | SerialUSB.begin(9600); // initialize serial communication 25 | while (!SerialUSB); // do nothing until the serial monitor is opened 26 | 27 | SerialUSB.println("Starting bridge...\n"); 28 | pinMode(13, OUTPUT); 29 | digitalWrite(13, LOW); 30 | Bridge.begin(); // make contact with the linux processor 31 | digitalWrite(13, HIGH); // Led on pin 13 turns on when the bridge is ready 32 | 33 | delay(2000); // wait 2 seconds 34 | } 35 | 36 | void loop() { 37 | Process wifiCheck; // initialize a new process 38 | 39 | wifiCheck.runShellCommand("/usr/bin/pretty-wifi-info.lua"); // command you want to run 40 | 41 | // while there's any characters coming back from the 42 | // process, print them to the serial monitor: 43 | while (wifiCheck.available() > 0) { 44 | char c = wifiCheck.read(); 45 | SerialUSB.print(c); 46 | } 47 | 48 | SerialUSB.println(); 49 | 50 | delay(5000); 51 | } 52 | -------------------------------------------------------------------------------- /app/src/cc/arduino/view/EventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Arduino is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * As a special exception, you may use this file as part of a free software 19 | * library without restriction. Specifically, if other files instantiate 20 | * templates or use macros or inline functions from this file, or you compile 21 | * this file and link it with other files to produce an executable, this 22 | * file does not by itself cause the resulting executable to be covered by 23 | * the GNU General Public License. This exception does not however 24 | * invalidate any other reasons why the executable file might be covered by 25 | * the GNU General Public License. 26 | * 27 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 28 | */ 29 | 30 | package cc.arduino.view; 31 | 32 | public interface EventListener { 33 | 34 | void eventHappened(Event event); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/CompilerProgressListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino; 31 | 32 | public interface CompilerProgressListener { 33 | 34 | void progress(int value); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/MailboxReadMessage/MailboxReadMessage.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Read Messages from the Mailbox 3 | 4 | This example for the YunShield/Yún shows how to 5 | read the messages queue, called Mailbox, using the 6 | Bridge library. 7 | The messages can be sent to the queue through REST calls. 8 | Appen the message in the URL after the keyword "/mailbox". 9 | Example 10 | 11 | "/mailbox/hello" 12 | 13 | created 3 Feb 2014 14 | by Federico Vanzati & Federico Fissore 15 | 16 | This example code is in the public domain. 17 | 18 | http://www.arduino.cc/en/Tutorial/MailboxReadMessage 19 | 20 | */ 21 | 22 | #include 23 | 24 | void setup() { 25 | pinMode(13, OUTPUT); 26 | digitalWrite(13, LOW); 27 | // Initialize Bridge and Mailbox 28 | Bridge.begin(); 29 | Mailbox.begin(); 30 | digitalWrite(13, HIGH); 31 | 32 | // Initialize Serial 33 | SerialUSB.begin(9600); 34 | 35 | // Wait until a Serial Monitor is connected. 36 | while (!SerialUSB); 37 | 38 | SerialUSB.println("Mailbox Read Message\n"); 39 | SerialUSB.println("The Mailbox is checked every 10 seconds. The incoming messages will be shown below.\n"); 40 | } 41 | 42 | void loop() { 43 | String message; 44 | 45 | // if there is a message in the Mailbox 46 | if (Mailbox.messageAvailable()) { 47 | // read all the messages present in the queue 48 | while (Mailbox.messageAvailable()) { 49 | Mailbox.readMessage(message); 50 | SerialUSB.println(message); 51 | } 52 | 53 | SerialUSB.println("Waiting 10 seconds before checking the Mailbox again"); 54 | } 55 | 56 | // wait 10 seconds 57 | delay(10000); 58 | } 59 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/MailboxReadMessage/MailboxReadMessage.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Read Messages from the Mailbox 3 | 4 | This example for the YunShield/Yún shows how to 5 | read the messages queue, called Mailbox, using the 6 | Bridge library. 7 | The messages can be sent to the queue through REST calls. 8 | Appen the message in the URL after the keyword "/mailbox". 9 | Example 10 | 11 | "/mailbox/hello" 12 | 13 | created 3 Feb 2014 14 | by Federico Vanzati & Federico Fissore 15 | 16 | This example code is in the public domain. 17 | 18 | http://www.arduino.cc/en/Tutorial/MailboxReadMessage 19 | 20 | */ 21 | 22 | #include 23 | 24 | void setup() { 25 | pinMode(13, OUTPUT); 26 | digitalWrite(13, LOW); 27 | // Initialize Bridge and Mailbox 28 | Bridge.begin(); 29 | Mailbox.begin(); 30 | digitalWrite(13, HIGH); 31 | 32 | // Initialize Serial 33 | SerialUSB.begin(9600); 34 | 35 | // Wait until a Serial Monitor is connected. 36 | while (!SerialUSB); 37 | 38 | SerialUSB.println("Mailbox Read Message\n"); 39 | SerialUSB.println("The Mailbox is checked every 10 seconds. The incoming messages will be shown below.\n"); 40 | } 41 | 42 | void loop() { 43 | String message; 44 | 45 | // if there is a message in the Mailbox 46 | if (Mailbox.messageAvailable()) { 47 | // read all the messages present in the queue 48 | while (Mailbox.messageAvailable()) { 49 | Mailbox.readMessage(message); 50 | SerialUSB.println(message); 51 | } 52 | 53 | SerialUSB.println("Waiting 10 seconds before checking the Mailbox again"); 54 | } 55 | 56 | // wait 10 seconds 57 | delay(10000); 58 | } 59 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/src/BridgeServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _BRIDGE_SERVER_H_ 20 | #define _BRIDGE_SERVER_H_ 21 | 22 | #include 23 | #include 24 | 25 | class BridgeClient; 26 | 27 | class BridgeServer : public Server { 28 | public: 29 | // Constructor with a user provided BridgeClass instance 30 | BridgeServer(uint16_t port = 5555, BridgeClass &_b = Bridge); 31 | 32 | void begin(); 33 | BridgeClient accept(); 34 | 35 | virtual size_t write(uint8_t c); 36 | 37 | void listenOnLocalhost() { 38 | useLocalhost = true; 39 | } 40 | void noListenOnLocalhost() { 41 | useLocalhost = false; 42 | } 43 | 44 | private: 45 | BridgeClass &bridge; 46 | uint16_t port; 47 | bool listening; 48 | bool useLocalhost; 49 | }; 50 | 51 | #endif // _BRIDGE_SERVER_H_ 52 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/src/BridgeServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _BRIDGE_SERVER_H_ 20 | #define _BRIDGE_SERVER_H_ 21 | 22 | #include 23 | #include 24 | 25 | class BridgeClient; 26 | 27 | class BridgeServer : public Server { 28 | public: 29 | // Constructor with a user provided BridgeClass instance 30 | BridgeServer(uint16_t port = 5555, BridgeClass &_b = Bridge); 31 | 32 | void begin(); 33 | BridgeClient accept(); 34 | 35 | virtual size_t write(uint8_t c); 36 | 37 | void listenOnLocalhost() { 38 | useLocalhost = true; 39 | } 40 | void noListenOnLocalhost() { 41 | useLocalhost = false; 42 | } 43 | 44 | private: 45 | BridgeClass &bridge; 46 | uint16_t port; 47 | bool listening; 48 | bool useLocalhost; 49 | }; 50 | 51 | #endif // _BRIDGE_SERVER_H_ 52 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/debug/MessageConsumer.java: -------------------------------------------------------------------------------- 1 | /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Processing project - http://processing.org 5 | 6 | Copyright (c) 2004-06 Ben Fry and Casey Reas 7 | Copyright (c) 2001-04 Massachusetts Institute of Technology 8 | 9 | This program is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation; either version 2 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with this program; if not, write to the Free Software Foundation, 21 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | package processing.app.debug; 25 | 26 | 27 | /** 28 | * Interface for dealing with parser/compiler output. 29 | *

30 | * Different instances of MessageStream need to do different things with 31 | * messages. In particular, a stream instance used for parsing output from 32 | * the compiler compiler has to interpret its messages differently than one 33 | * parsing output from the runtime. 34 | *

35 | * Classes which consume messages and do something with them 36 | * should implement this interface. 37 | */ 38 | public interface MessageConsumer { 39 | 40 | void message(String s); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/src/cc/arduino/contributions/ui/DropdownItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.contributions.ui; 31 | 32 | import java.util.function.Predicate; 33 | 34 | public interface DropdownItem { 35 | 36 | Predicate getFilterPredicate(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/contributions/ProgressListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.contributions; 31 | 32 | import cc.arduino.utils.Progress; 33 | 34 | public interface ProgressListener { 35 | 36 | void onProgress(Progress progress); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/contributions/packages/ContributedBoard.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2014 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.contributions.packages; 31 | 32 | public class ContributedBoard { 33 | 34 | private String name; 35 | public String getName() { return name; } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/contributions/packages/ContributedHelp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.contributions.packages; 31 | 32 | public class ContributedHelp { 33 | 34 | private String online; 35 | public String getOnline() { return online; } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.1.1/SD/examples/DumpFile/DumpFile.ino: -------------------------------------------------------------------------------- 1 | /* 2 | SD card file dump 3 | 4 | This example shows how to read a file from the SD card using the 5 | SD library and send it over the serial port. 6 | 7 | The circuit: 8 | * SD card attached to SPI bus as follows: 9 | ** MOSI - pin 11 10 | ** MISO - pin 12 11 | ** CLK - pin 13 12 | ** CS - pin 4 (for MKRZero SD: SDCARD_SS_PIN) 13 | 14 | created 22 December 2010 15 | by Limor Fried 16 | modified 9 Apr 2012 17 | by Tom Igoe 18 | 19 | This example code is in the public domain. 20 | 21 | */ 22 | 23 | #include 24 | #include 25 | 26 | const int chipSelect = 4; 27 | 28 | void setup() { 29 | // Open serial communications and wait for port to open: 30 | Serial.begin(9600); 31 | while (!Serial) { 32 | ; // wait for serial port to connect. Needed for native USB port only 33 | } 34 | 35 | 36 | Serial.print("Initializing SD card..."); 37 | 38 | // see if the card is present and can be initialized: 39 | if (!SD.begin(chipSelect)) { 40 | Serial.println("Card failed, or not present"); 41 | // don't do anything more: 42 | return; 43 | } 44 | Serial.println("card initialized."); 45 | 46 | // open the file. note that only one file can be open at a time, 47 | // so you have to close this one before opening another. 48 | File dataFile = SD.open("datalog.txt"); 49 | 50 | // if the file is available, write to it: 51 | if (dataFile) { 52 | while (dataFile.available()) { 53 | Serial.write(dataFile.read()); 54 | } 55 | dataFile.close(); 56 | } 57 | // if the file isn't open, pop up an error: 58 | else { 59 | Serial.println("error opening datalog.txt"); 60 | } 61 | } 62 | 63 | void loop() { 64 | } 65 | 66 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.2.1/SD/examples/DumpFile/DumpFile.ino: -------------------------------------------------------------------------------- 1 | /* 2 | SD card file dump 3 | 4 | This example shows how to read a file from the SD card using the 5 | SD library and send it over the serial port. 6 | 7 | The circuit: 8 | * SD card attached to SPI bus as follows: 9 | ** MOSI - pin 11 10 | ** MISO - pin 12 11 | ** CLK - pin 13 12 | ** CS - pin 4 (for MKRZero SD: SDCARD_SS_PIN) 13 | 14 | created 22 December 2010 15 | by Limor Fried 16 | modified 9 Apr 2012 17 | by Tom Igoe 18 | 19 | This example code is in the public domain. 20 | 21 | */ 22 | 23 | #include 24 | #include 25 | 26 | const int chipSelect = 4; 27 | 28 | void setup() { 29 | // Open serial communications and wait for port to open: 30 | Serial.begin(9600); 31 | while (!Serial) { 32 | ; // wait for serial port to connect. Needed for native USB port only 33 | } 34 | 35 | 36 | Serial.print("Initializing SD card..."); 37 | 38 | // see if the card is present and can be initialized: 39 | if (!SD.begin(chipSelect)) { 40 | Serial.println("Card failed, or not present"); 41 | // don't do anything more: 42 | while (1); 43 | } 44 | Serial.println("card initialized."); 45 | 46 | // open the file. note that only one file can be open at a time, 47 | // so you have to close this one before opening another. 48 | File dataFile = SD.open("datalog.txt"); 49 | 50 | // if the file is available, write to it: 51 | if (dataFile) { 52 | while (dataFile.available()) { 53 | Serial.write(dataFile.read()); 54 | } 55 | dataFile.close(); 56 | } 57 | // if the file isn't open, pop up an error: 58 | else { 59 | Serial.println("error opening datalog.txt"); 60 | } 61 | } 62 | 63 | void loop() { 64 | } 65 | 66 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/utils/Progress.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2014 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.utils; 31 | 32 | public interface Progress { 33 | 34 | void setProgress(double progress); 35 | 36 | double getProgress(); 37 | 38 | void setStatus(String _status); 39 | 40 | String getStatus(); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/helpers/filefilters/OnlyDirs.java: -------------------------------------------------------------------------------- 1 | /* 2 | OnlyDirs - FilenameFilter that accepts only directories (CVS, .svn, 3 | .DS_Store files are excluded as well) 4 | Part of the Arduino project - http://www.arduino.cc/ 5 | 6 | Copyright (c) 2011 Cristian Maglie 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software Foundation, 20 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | package processing.app.helpers.filefilters; 23 | 24 | import java.io.File; 25 | import java.io.FilenameFilter; 26 | 27 | /** 28 | * This filter accepts only directories (excluding .DS_Store files, .svn 29 | * folders, etc) 30 | * 31 | * @author Cristian Maglie 32 | */ 33 | public class OnlyDirs implements FilenameFilter { 34 | 35 | @Override 36 | public boolean accept(File dir, String name) { 37 | if (name.charAt(0) == '.') 38 | return false; 39 | if (name.equals("CVS")) 40 | return false; 41 | return new File(dir, name).isDirectory(); 42 | } 43 | 44 | /** 45 | * An handy pre-instantiated object 46 | */ 47 | public static final OnlyDirs ONLY_DIRS = new OnlyDirs(); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/contributions/NoopProgressListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.contributions; 31 | 32 | import cc.arduino.utils.Progress; 33 | 34 | public class NoopProgressListener implements ProgressListener { 35 | 36 | @Override 37 | public void onProgress(Progress progress) { 38 | 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /arduino-core/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Extract the text catalog from the source code, 5 | # and merge with the already translated texts. 6 | # 7 | # Please be aware that this OVERWRITES the existing *.po and *.properties files. 8 | # You may want to commit to your repository before running this script. 9 | # 10 | 11 | # by Shigeru KANEMOTO at SWITCHSCIENCE. 12 | # on 2011-10-15 13 | 14 | catalog="/tmp/$$.po" 15 | files="/tmp/$$.files" 16 | 17 | trap "rm -f '$catalog' '$files'" 0 1 2 15 18 | 19 | catalog() 20 | { 21 | # Generate the new text catalog without the already translated texts. 22 | # The 'merge existing' option for xgetext does not work propery for our purpose. 23 | find ../../../../../app/ -name '*.java' -print > "$files" 24 | find ../../../../../arduino-core/ -name '*.java' -print >> "$files" 25 | xgettext -s -L Java --from-code=utf-8 --keyword=tr --output="$catalog" --files-from="$files" 26 | } 27 | 28 | update() 29 | { 30 | echo -e "Updating $1...\c" 31 | cat "$catalog" | python2 python/update.py "$1" 32 | msgcat -p "$1" > $(basename "$1" .po).properties 33 | # msgcat may complain about "CHARSET" if you didn't replace "CHARSET" with 34 | # your correct charset. 35 | echo 36 | } 37 | 38 | if [ $0 != "./update.sh" ]; then 39 | echo "update.sh: Invoke this script as ./update.sh" 40 | exit 1 41 | fi 42 | 43 | while [ $# -gt 0 ]; do 44 | if [ $1 = '-a' ]; then 45 | targets=Resources_*.po 46 | else 47 | targets="$targets Resources_$1.po" 48 | fi 49 | shift 50 | done 51 | 52 | if [ "$targets" = "" ]; then 53 | echo "update.sh: Give at least one language code or '-a'." 54 | exit 1 55 | fi 56 | 57 | # Then, merge with already translated texts. 58 | catalog 59 | for target in $targets; do 60 | update $target 61 | done 62 | -------------------------------------------------------------------------------- /arduino-core/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/DefaultUncaughtExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino; 31 | 32 | public class DefaultUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { 33 | 34 | @Override 35 | public void uncaughtException(Thread t, Throwable e) { 36 | System.err.println(t); 37 | e.printStackTrace(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/update.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | #vim:set fileencoding=utf-8 sw=2 expandtab 3 | 4 | def unquote(s): 5 | s = s.strip() 6 | if s[0] != '"' or s[-1] != '"': 7 | raise RuntimeError 8 | return s[1:-1] 9 | 10 | def read_po(fp): 11 | if isinstance(fp, str): 12 | fp = open(fp) 13 | 14 | d = {} 15 | st = 1 16 | comment = key = rkey = rvalue = '' 17 | for line in fp: 18 | if line[0] == '#' or line.strip() == '': 19 | if st == 2: 20 | d[key] = (comment, rkey, rvalue) 21 | st = 1 22 | comment = key = rkey = rvalue = '' 23 | comment += line 24 | elif line[0] == '"': 25 | if st == 1: 26 | key += unquote(line) 27 | rkey += line 28 | else: 29 | rvalue += line 30 | elif line.startswith('msgid '): 31 | st = 1 32 | key = unquote(line[6:]) 33 | rkey = line 34 | elif line.startswith('msgstr '): 35 | st = 2 36 | rvalue = line 37 | else: 38 | raise RuntimeError 39 | 40 | if st == 2: 41 | d[key] = (comment, rkey, rvalue) 42 | 43 | return d 44 | 45 | def dump(d, dstFile): 46 | out = open(dstFile, 'w') 47 | 48 | # The first block in file should go first because the key is ''. 49 | for key in sorted(d.keys()): 50 | (comment, rkey, rvalue) = d[key] 51 | out.write(comment) 52 | out.write(rkey) 53 | out.write(rvalue) 54 | 55 | out.close() 56 | 57 | def merge(d, dd): 58 | for key in dd.keys(): 59 | if d.has_key(key): 60 | d[key] = dd[key] 61 | return d 62 | 63 | # Remove currently unused catalog text lines from ".po" file. 64 | def main(): 65 | import sys 66 | d = read_po(sys.stdin) 67 | dd = read_po(sys.argv[1]) 68 | dump(merge(d, dd), sys.argv[1]) 69 | 70 | if __name__ == '__main__': 71 | main() 72 | -------------------------------------------------------------------------------- /app/src/processing/app/helpers/CircularBuffer.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | import java.util.NoSuchElementException; 4 | 5 | public class CircularBuffer { 6 | 7 | private final double[] elements; 8 | private int start = -1; 9 | private int end = -1; 10 | private final int capacity; 11 | 12 | public void add(double num) { 13 | end = (end + 1) % capacity; 14 | elements[end] = num; 15 | if (start == end || start == -1) { 16 | start = (start + 1) % capacity; 17 | } 18 | } 19 | 20 | public double get(int index) { 21 | if (index >= capacity) { 22 | throw new IndexOutOfBoundsException(); 23 | } 24 | if (index >= size()) { 25 | throw new IndexOutOfBoundsException(); 26 | } 27 | 28 | return elements[(start + index) % capacity]; 29 | } 30 | 31 | public boolean isEmpty() { 32 | return start == -1 && end == -1; 33 | } 34 | 35 | public CircularBuffer(int capacity) { 36 | this.capacity = capacity; 37 | elements = new double[capacity]; 38 | } 39 | 40 | public double min() { 41 | if (size() == 0) { 42 | throw new NoSuchElementException(); 43 | } 44 | 45 | double out = get(0); 46 | for (int i = 1; i < size(); ++i) { 47 | out = Math.min(out, get(i)); 48 | } 49 | 50 | return out; 51 | } 52 | 53 | public double max() { 54 | if (size() == 0) { 55 | throw new NoSuchElementException(); 56 | } 57 | 58 | double out = get(0); 59 | for (int i = 1; i < size(); ++i) { 60 | out = Math.max(out, get(i)); 61 | } 62 | 63 | return out; 64 | } 65 | 66 | public int size() { 67 | if (end == -1) { 68 | return 0; 69 | } 70 | 71 | return (end - start + capacity) % capacity + 1; 72 | } 73 | 74 | public int capacity() { 75 | return capacity; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/ConsoleRead/ConsoleRead.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Console Read example for YunShield/Yún 3 | 4 | Read data coming from bridge using the Console.read() function 5 | and store it in a string. 6 | 7 | To see the Console, pick your Yún's name and IP address in the Port menu 8 | then open the Port Monitor. You can also see it by opening a terminal window 9 | and typing: 10 | ssh root@ yourYunsName.local 'telnet localhost 6571' 11 | then pressing enter. When prompted for the password, enter it. 12 | 13 | created 13 Jun 2013 14 | by Angelo Scialabba 15 | modified 16 June 2013 16 | by Tom Igoe 17 | 18 | This example code is in the public domain. 19 | 20 | http://www.arduino.cc/en/Tutorial/ConsoleRead 21 | 22 | */ 23 | 24 | #include 25 | 26 | String name; 27 | 28 | void setup() { 29 | // Initialize Console and wait for port to open: 30 | Bridge.begin(); 31 | Console.begin(); 32 | 33 | // Wait for Console port to connect 34 | while (!Console); 35 | 36 | Console.println("Hi, what's your name?"); 37 | } 38 | 39 | void loop() { 40 | if (Console.available() > 0) { 41 | char c = Console.read(); // read the next char received 42 | // look for the newline character, this is the last character in the string 43 | if (c == '\n') { 44 | //print text with the name received 45 | Console.print("Hi "); 46 | Console.print(name); 47 | Console.println("! Nice to meet you!"); 48 | Console.println(); 49 | // Ask again for name and clear the old name 50 | Console.println("Hi, what's your name?"); 51 | name = ""; // clear the name string 52 | } else { // if the buffer is empty Cosole.read() returns -1 53 | name += c; // append the read char from Console to the name string 54 | } 55 | } else { 56 | delay(100); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/ConsoleRead/ConsoleRead.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Console Read example for YunShield/Yún 3 | 4 | Read data coming from bridge using the Console.read() function 5 | and store it in a string. 6 | 7 | To see the Console, pick your Yún's name and IP address in the Port menu 8 | then open the Port Monitor. You can also see it by opening a terminal window 9 | and typing: 10 | ssh root@ yourYunsName.local 'telnet localhost 6571' 11 | then pressing enter. When prompted for the password, enter it. 12 | 13 | created 13 Jun 2013 14 | by Angelo Scialabba 15 | modified 16 June 2013 16 | by Tom Igoe 17 | 18 | This example code is in the public domain. 19 | 20 | http://www.arduino.cc/en/Tutorial/ConsoleRead 21 | 22 | */ 23 | 24 | #include 25 | 26 | String name; 27 | 28 | void setup() { 29 | // Initialize Console and wait for port to open: 30 | Bridge.begin(); 31 | Console.begin(); 32 | 33 | // Wait for Console port to connect 34 | while (!Console); 35 | 36 | Console.println("Hi, what's your name?"); 37 | } 38 | 39 | void loop() { 40 | if (Console.available() > 0) { 41 | char c = Console.read(); // read the next char received 42 | // look for the newline character, this is the last character in the string 43 | if (c == '\n') { 44 | //print text with the name received 45 | Console.print("Hi "); 46 | Console.print(name); 47 | Console.println("! Nice to meet you!"); 48 | Console.println(); 49 | // Ask again for name and clear the old name 50 | Console.println("Hi, what's your name?"); 51 | name = ""; // clear the name string 52 | } else { // if the buffer is empty Cosole.read() returns -1 53 | name += c; // append the read char from Console to the name string 54 | } 55 | } else { 56 | delay(100); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/processing/app/helpers/GUIUserNotifier.java: -------------------------------------------------------------------------------- 1 | package processing.app.helpers; 2 | 3 | import processing.app.Base; 4 | 5 | import static processing.app.I18n.tr; 6 | 7 | import javax.swing.JOptionPane; 8 | 9 | public class GUIUserNotifier extends UserNotifier { 10 | 11 | private final Base base; 12 | 13 | public GUIUserNotifier(Base base) { 14 | this.base = base; 15 | } 16 | 17 | /** 18 | * Show an error message that's actually fatal to the program. 19 | * This is an error that can't be recovered. Use showWarning() 20 | * for errors that allow P5 to continue running. 21 | */ 22 | public void showError(String title, String message, Throwable e, int exit_code) { 23 | if (title == null) title = tr("Error"); 24 | 25 | JOptionPane.showMessageDialog(base.getActiveEditor(), message, title, 26 | JOptionPane.ERROR_MESSAGE); 27 | 28 | if (e != null) e.printStackTrace(); 29 | System.exit(exit_code); 30 | } 31 | 32 | /** 33 | * "No cookie for you" type messages. Nothing fatal or all that 34 | * much of a bummer, but something to notify the user about. 35 | */ 36 | public void showMessage(String title, String message) { 37 | if (title == null) title = tr("Message"); 38 | 39 | JOptionPane.showMessageDialog(base.getActiveEditor(), message, title, 40 | JOptionPane.INFORMATION_MESSAGE); 41 | } 42 | 43 | /** 44 | * Non-fatal error message with optional stack trace side dish. 45 | */ 46 | public void showWarning(String title, String message, Exception e) { 47 | if (title == null) title = tr("Warning"); 48 | 49 | JOptionPane.showMessageDialog(base.getActiveEditor(), message, title, 50 | JOptionPane.WARNING_MESSAGE); 51 | 52 | if (e != null) e.printStackTrace(); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/utils/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.utils; 31 | 32 | public class Pair { 33 | 34 | public final K key; 35 | public final V value; 36 | 37 | public Pair(K key, V value) { 38 | this.key = key; 39 | this.value = value; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "key: " + key + ", value: " + value; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/filters/FileExecutablePredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.filters; 31 | 32 | import java.io.File; 33 | import java.util.function.Predicate; 34 | 35 | public class FileExecutablePredicate implements Predicate { 36 | 37 | @Override 38 | public boolean test(File file) { 39 | return file.isFile() && file.exists() && file.canRead() && file.canExecute(); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/src/BridgeServer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | BridgeServer::BridgeServer(uint16_t _p, BridgeClass &_b) : 23 | bridge(_b), port(_p), listening(false), useLocalhost(false) { 24 | } 25 | 26 | void BridgeServer::begin() { 27 | uint8_t tmp[] = { 28 | 'N', 29 | static_cast(port >> 8), 30 | static_cast(port) 31 | }; 32 | uint8_t res[1]; 33 | String address = F("127.0.0.1"); 34 | if (!useLocalhost) 35 | address = F("0.0.0.0"); 36 | bridge.transfer(tmp, 3, (const uint8_t *)address.c_str(), address.length(), res, 1); 37 | listening = (res[0] == 1); 38 | } 39 | 40 | BridgeClient BridgeServer::accept() { 41 | uint8_t cmd[] = {'k'}; 42 | uint8_t res[1]; 43 | unsigned int l = bridge.transfer(cmd, 1, res, 1); 44 | if (l == 0) 45 | return BridgeClient(); 46 | return BridgeClient(res[0]); 47 | } 48 | 49 | size_t BridgeServer::write(uint8_t c) { 50 | uint8_t cmd[] = { 'b', c }; 51 | bridge.transfer(cmd, 2); 52 | return 1; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/src/BridgeServer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | BridgeServer::BridgeServer(uint16_t _p, BridgeClass &_b) : 23 | bridge(_b), port(_p), listening(false), useLocalhost(false) { 24 | } 25 | 26 | void BridgeServer::begin() { 27 | uint8_t tmp[] = { 28 | 'N', 29 | static_cast(port >> 8), 30 | static_cast(port) 31 | }; 32 | uint8_t res[1]; 33 | String address = F("127.0.0.1"); 34 | if (!useLocalhost) 35 | address = F("0.0.0.0"); 36 | bridge.transfer(tmp, 3, (const uint8_t *)address.c_str(), address.length(), res, 1); 37 | listening = (res[0] == 1); 38 | } 39 | 40 | BridgeClient BridgeServer::accept() { 41 | uint8_t cmd[] = {'k'}; 42 | uint8_t res[1]; 43 | unsigned int l = bridge.transfer(cmd, 1, res, 1); 44 | if (l == 0) 45 | return BridgeClient(); 46 | return BridgeClient(res[0]); 47 | } 48 | 49 | size_t BridgeServer::write(uint8_t c) { 50 | uint8_t cmd[] = { 'b', c }; 51 | bridge.transfer(cmd, 2); 52 | return 1; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.1.1/SD/examples/listfiles/listfiles.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Listfiles 3 | 4 | This example shows how print out the files in a 5 | directory on a SD card 6 | 7 | The circuit: 8 | * SD card attached to SPI bus as follows: 9 | ** MOSI - pin 11 10 | ** MISO - pin 12 11 | ** CLK - pin 13 12 | ** CS - pin 4 (for MKRZero SD: SDCARD_SS_PIN) 13 | 14 | created Nov 2010 15 | by David A. Mellis 16 | modified 9 Apr 2012 17 | by Tom Igoe 18 | modified 2 Feb 2014 19 | by Scott Fitzgerald 20 | 21 | This example code is in the public domain. 22 | 23 | */ 24 | #include 25 | #include 26 | 27 | File root; 28 | 29 | void setup() { 30 | // Open serial communications and wait for port to open: 31 | Serial.begin(9600); 32 | while (!Serial) { 33 | ; // wait for serial port to connect. Needed for native USB port only 34 | } 35 | 36 | Serial.print("Initializing SD card..."); 37 | 38 | if (!SD.begin(4)) { 39 | Serial.println("initialization failed!"); 40 | return; 41 | } 42 | Serial.println("initialization done."); 43 | 44 | root = SD.open("/"); 45 | 46 | printDirectory(root, 0); 47 | 48 | Serial.println("done!"); 49 | } 50 | 51 | void loop() { 52 | // nothing happens after setup finishes. 53 | } 54 | 55 | void printDirectory(File dir, int numTabs) { 56 | while (true) { 57 | 58 | File entry = dir.openNextFile(); 59 | if (! entry) { 60 | // no more files 61 | break; 62 | } 63 | for (uint8_t i = 0; i < numTabs; i++) { 64 | Serial.print('\t'); 65 | } 66 | Serial.print(entry.name()); 67 | if (entry.isDirectory()) { 68 | Serial.println("/"); 69 | printDirectory(entry, numTabs + 1); 70 | } else { 71 | // files have sizes, directories do not 72 | Serial.print("\t\t"); 73 | Serial.println(entry.size(), DEC); 74 | } 75 | entry.close(); 76 | } 77 | } 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/charade/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCTWDistributionAnalysis 31 | from .mbcssm import EUCTWSMModel 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel) 37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-TW" 42 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.2.1/SD/examples/listfiles/listfiles.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Listfiles 3 | 4 | This example shows how print out the files in a 5 | directory on a SD card 6 | 7 | The circuit: 8 | * SD card attached to SPI bus as follows: 9 | ** MOSI - pin 11 10 | ** MISO - pin 12 11 | ** CLK - pin 13 12 | ** CS - pin 4 (for MKRZero SD: SDCARD_SS_PIN) 13 | 14 | created Nov 2010 15 | by David A. Mellis 16 | modified 9 Apr 2012 17 | by Tom Igoe 18 | modified 2 Feb 2014 19 | by Scott Fitzgerald 20 | 21 | This example code is in the public domain. 22 | 23 | */ 24 | #include 25 | #include 26 | 27 | File root; 28 | 29 | void setup() { 30 | // Open serial communications and wait for port to open: 31 | Serial.begin(9600); 32 | while (!Serial) { 33 | ; // wait for serial port to connect. Needed for native USB port only 34 | } 35 | 36 | Serial.print("Initializing SD card..."); 37 | 38 | if (!SD.begin(4)) { 39 | Serial.println("initialization failed!"); 40 | while (1); 41 | } 42 | Serial.println("initialization done."); 43 | 44 | root = SD.open("/"); 45 | 46 | printDirectory(root, 0); 47 | 48 | Serial.println("done!"); 49 | } 50 | 51 | void loop() { 52 | // nothing happens after setup finishes. 53 | } 54 | 55 | void printDirectory(File dir, int numTabs) { 56 | while (true) { 57 | 58 | File entry = dir.openNextFile(); 59 | if (! entry) { 60 | // no more files 61 | break; 62 | } 63 | for (uint8_t i = 0; i < numTabs; i++) { 64 | Serial.print('\t'); 65 | } 66 | Serial.print(entry.name()); 67 | if (entry.isDirectory()) { 68 | Serial.println("/"); 69 | printDirectory(entry, numTabs + 1); 70 | } else { 71 | // files have sizes, directories do not 72 | Serial.print("\t\t"); 73 | Serial.println(entry.size(), DEC); 74 | } 75 | entry.close(); 76 | } 77 | } 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/charade/euckrprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCKRDistributionAnalysis 31 | from .mbcssm import EUCKRSMModel 32 | 33 | 34 | class EUCKRProber(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(EUCKRSMModel) 38 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis() 39 | self.reset() 40 | 41 | def get_charset_name(self): 42 | return "EUC-KR" 43 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/charade/gb2312prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import GB2312DistributionAnalysis 31 | from .mbcssm import GB2312SMModel 32 | 33 | class GB2312Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(GB2312SMModel) 37 | self._mDistributionAnalyzer = GB2312DistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "GB2312" 42 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/utils/ReverseComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.utils; 31 | 32 | import java.util.Comparator; 33 | 34 | public class ReverseComparator implements Comparator { 35 | 36 | private final Comparator orig; 37 | 38 | public ReverseComparator(Comparator orig) { 39 | this.orig = orig; 40 | } 41 | 42 | @Override 43 | public int compare(T t, T t1) { 44 | return -1 * orig.compare(t, t1); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/charade/big5prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Communicator client code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import Big5DistributionAnalysis 31 | from .mbcssm import Big5SMModel 32 | 33 | 34 | class Big5Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(Big5SMModel) 38 | self._mDistributionAnalyzer = Big5DistributionAnalysis() 39 | self.reset() 40 | 41 | def get_charset_name(self): 42 | return "Big5" 43 | -------------------------------------------------------------------------------- /app/src/cc/arduino/view/StubMenuListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.view; 31 | 32 | import javax.swing.event.MenuEvent; 33 | import javax.swing.event.MenuListener; 34 | 35 | public class StubMenuListener implements MenuListener { 36 | 37 | @Override 38 | public void menuSelected(MenuEvent e) { 39 | } 40 | 41 | @Override 42 | public void menuDeselected(MenuEvent e) { 43 | } 44 | 45 | @Override 46 | public void menuCanceled(MenuEvent e) { 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/packages/discoverers/PluggableDiscoveryMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Arduino is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * As a special exception, you may use this file as part of a free software 19 | * library without restriction. Specifically, if other files instantiate 20 | * templates or use macros or inline functions from this file, or you compile 21 | * this file and link it with other files to produce an executable, this 22 | * file does not by itself cause the resulting executable to be covered by 23 | * the GNU General Public License. This exception does not however 24 | * invalidate any other reasons why the executable file might be covered by 25 | * the GNU General Public License. 26 | * 27 | * Copyright 2018 Arduino SA (http://www.arduino.cc/) 28 | */ 29 | 30 | package cc.arduino.packages.discoverers; 31 | 32 | public class PluggableDiscoveryMessage { 33 | private String eventType; // "add", "remove", "error" 34 | private String message; // optional message, e.g. "START_SYNC not supported" 35 | 36 | public String getEventType() { 37 | return eventType; 38 | } 39 | 40 | public String getMessage() { 41 | return message; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2014 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.contributions.libraries; 31 | 32 | public class ContributedLibraryDependency { 33 | 34 | private String name; 35 | private String version; 36 | 37 | public String getName() { return name; } 38 | 39 | public String getVersion() { return version; } 40 | 41 | @Override 42 | public String toString() { 43 | return getName() + " " + getVersion(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/cc/arduino/view/JMenuUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Arduino is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * As a special exception, you may use this file as part of a free software 19 | * library without restriction. Specifically, if other files instantiate 20 | * templates or use macros or inline functions from this file, or you compile 21 | * this file and link it with other files to produce an executable, this 22 | * file does not by itself cause the resulting executable to be covered by 23 | * the GNU General Public License. This exception does not however 24 | * invalidate any other reasons why the executable file might be covered by 25 | * the GNU General Public License. 26 | * 27 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 28 | */ 29 | 30 | package cc.arduino.view; 31 | 32 | import javax.swing.*; 33 | import java.awt.*; 34 | 35 | public class JMenuUtils { 36 | 37 | public static JMenu findSubMenuWithLabel(JMenu menu, String text) { 38 | for (Component submenu : menu.getMenuComponents()) { 39 | if (submenu instanceof JMenu && text.equals(((JMenu) submenu).getText())) { 40 | return (JMenu) submenu; 41 | } 42 | } 43 | return null; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.1.1/SD/examples/Files/Files.ino: -------------------------------------------------------------------------------- 1 | /* 2 | SD card basic file example 3 | 4 | This example shows how to create and destroy an SD card file 5 | The circuit: 6 | * SD card attached to SPI bus as follows: 7 | ** MOSI - pin 11 8 | ** MISO - pin 12 9 | ** CLK - pin 13 10 | ** CS - pin 4 (for MKRZero SD: SDCARD_SS_PIN) 11 | 12 | created Nov 2010 13 | by David A. Mellis 14 | modified 9 Apr 2012 15 | by Tom Igoe 16 | 17 | This example code is in the public domain. 18 | 19 | */ 20 | #include 21 | #include 22 | 23 | File myFile; 24 | 25 | void setup() { 26 | // Open serial communications and wait for port to open: 27 | Serial.begin(9600); 28 | while (!Serial) { 29 | ; // wait for serial port to connect. Needed for native USB port only 30 | } 31 | 32 | 33 | Serial.print("Initializing SD card..."); 34 | 35 | if (!SD.begin(4)) { 36 | Serial.println("initialization failed!"); 37 | return; 38 | } 39 | Serial.println("initialization done."); 40 | 41 | if (SD.exists("example.txt")) { 42 | Serial.println("example.txt exists."); 43 | } else { 44 | Serial.println("example.txt doesn't exist."); 45 | } 46 | 47 | // open a new file and immediately close it: 48 | Serial.println("Creating example.txt..."); 49 | myFile = SD.open("example.txt", FILE_WRITE); 50 | myFile.close(); 51 | 52 | // Check to see if the file exists: 53 | if (SD.exists("example.txt")) { 54 | Serial.println("example.txt exists."); 55 | } else { 56 | Serial.println("example.txt doesn't exist."); 57 | } 58 | 59 | // delete the file: 60 | Serial.println("Removing example.txt..."); 61 | SD.remove("example.txt"); 62 | 63 | if (SD.exists("example.txt")) { 64 | Serial.println("example.txt exists."); 65 | } else { 66 | Serial.println("example.txt doesn't exist."); 67 | } 68 | } 69 | 70 | void loop() { 71 | // nothing happens after setup finishes. 72 | } 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /app/testdata/libraries/SD_1.2.1/SD/examples/Files/Files.ino: -------------------------------------------------------------------------------- 1 | /* 2 | SD card basic file example 3 | 4 | This example shows how to create and destroy an SD card file 5 | The circuit: 6 | * SD card attached to SPI bus as follows: 7 | ** MOSI - pin 11 8 | ** MISO - pin 12 9 | ** CLK - pin 13 10 | ** CS - pin 4 (for MKRZero SD: SDCARD_SS_PIN) 11 | 12 | created Nov 2010 13 | by David A. Mellis 14 | modified 9 Apr 2012 15 | by Tom Igoe 16 | 17 | This example code is in the public domain. 18 | 19 | */ 20 | #include 21 | #include 22 | 23 | File myFile; 24 | 25 | void setup() { 26 | // Open serial communications and wait for port to open: 27 | Serial.begin(9600); 28 | while (!Serial) { 29 | ; // wait for serial port to connect. Needed for native USB port only 30 | } 31 | 32 | 33 | Serial.print("Initializing SD card..."); 34 | 35 | if (!SD.begin(4)) { 36 | Serial.println("initialization failed!"); 37 | while (1); 38 | } 39 | Serial.println("initialization done."); 40 | 41 | if (SD.exists("example.txt")) { 42 | Serial.println("example.txt exists."); 43 | } else { 44 | Serial.println("example.txt doesn't exist."); 45 | } 46 | 47 | // open a new file and immediately close it: 48 | Serial.println("Creating example.txt..."); 49 | myFile = SD.open("example.txt", FILE_WRITE); 50 | myFile.close(); 51 | 52 | // Check to see if the file exists: 53 | if (SD.exists("example.txt")) { 54 | Serial.println("example.txt exists."); 55 | } else { 56 | Serial.println("example.txt doesn't exist."); 57 | } 58 | 59 | // delete the file: 60 | Serial.println("Removing example.txt..."); 61 | SD.remove("example.txt"); 62 | 63 | if (SD.exists("example.txt")) { 64 | Serial.println("example.txt exists."); 65 | } else { 66 | Serial.println("example.txt doesn't exist."); 67 | } 68 | } 69 | 70 | void loop() { 71 | // nothing happens after setup finishes. 72 | } 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/ShellCommands/ShellCommands.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Running shell commands using Process class. 3 | 4 | This sketch demonstrate how to run linux shell commands 5 | using a YunShield/Yún. It runs the wifiCheck script on the Linux side 6 | of the Yún, then uses grep to get just the signal strength line. 7 | Then it uses parseInt() to read the wifi signal strength as an integer, 8 | and finally uses that number to fade an LED using analogWrite(). 9 | 10 | The circuit: 11 | * YunShield/Yún with LED connected to pin 9 12 | 13 | created 12 Jun 2013 14 | by Cristian Maglie 15 | modified 25 June 2013 16 | by Tom Igoe 17 | 18 | This example code is in the public domain. 19 | 20 | http://www.arduino.cc/en/Tutorial/ShellCommands 21 | 22 | */ 23 | 24 | #include 25 | 26 | void setup() { 27 | Bridge.begin(); // Initialize the Bridge 28 | SerialUSB.begin(9600); // Initialize the Serial 29 | 30 | // Wait until a Serial Monitor is connected. 31 | while (!SerialUSB); 32 | } 33 | 34 | void loop() { 35 | Process p; 36 | // This command line runs the WifiStatus script, (/usr/bin/pretty-wifi-info.lua), then 37 | // sends the result to the grep command to look for a line containing the word 38 | // "Signal:" the result is passed to this sketch: 39 | p.runShellCommand("/usr/bin/pretty-wifi-info.lua | grep Signal"); 40 | 41 | // do nothing until the process finishes, so you get the whole output: 42 | while (p.running()); 43 | 44 | // Read command output. runShellCommand() should have passed "Signal: xx&": 45 | while (p.available()) { 46 | int result = p.parseInt(); // look for an integer 47 | int signal = map(result, 0, 100, 0, 255); // map result from 0-100 range to 0-255 48 | analogWrite(9, signal); // set the brightness of LED on pin 9 49 | SerialUSB.println(result); // print the number as well 50 | } 51 | delay(5000); // wait 5 seconds before you do it again 52 | } 53 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/ShellCommands/ShellCommands.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Running shell commands using Process class. 3 | 4 | This sketch demonstrate how to run linux shell commands 5 | using a YunShield/Yún. It runs the wifiCheck script on the Linux side 6 | of the Yún, then uses grep to get just the signal strength line. 7 | Then it uses parseInt() to read the wifi signal strength as an integer, 8 | and finally uses that number to fade an LED using analogWrite(). 9 | 10 | The circuit: 11 | * YunShield/Yún with LED connected to pin 9 12 | 13 | created 12 Jun 2013 14 | by Cristian Maglie 15 | modified 25 June 2013 16 | by Tom Igoe 17 | 18 | This example code is in the public domain. 19 | 20 | http://www.arduino.cc/en/Tutorial/ShellCommands 21 | 22 | */ 23 | 24 | #include 25 | 26 | void setup() { 27 | Bridge.begin(); // Initialize the Bridge 28 | SerialUSB.begin(9600); // Initialize the Serial 29 | 30 | // Wait until a Serial Monitor is connected. 31 | while (!SerialUSB); 32 | } 33 | 34 | void loop() { 35 | Process p; 36 | // This command line runs the WifiStatus script, (/usr/bin/pretty-wifi-info.lua), then 37 | // sends the result to the grep command to look for a line containing the word 38 | // "Signal:" the result is passed to this sketch: 39 | p.runShellCommand("/usr/bin/pretty-wifi-info.lua | grep Signal"); 40 | 41 | // do nothing until the process finishes, so you get the whole output: 42 | while (p.running()); 43 | 44 | // Read command output. runShellCommand() should have passed "Signal: xx&": 45 | while (p.available()) { 46 | int result = p.parseInt(); // look for an integer 47 | int signal = map(result, 0, 100, 0, 255); // map result from 0-100 range to 0-255 48 | analogWrite(9, signal); // set the brightness of LED on pin 9 49 | SerialUSB.println(result); // print the number as well 50 | } 51 | delay(5000); // wait 5 seconds before you do it again 52 | } 53 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/src/Mailbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _MAILBOX_CLASS_H_INCLUDED_ 20 | #define _MAILBOX_CLASS_H_INCLUDED_ 21 | 22 | #include 23 | 24 | class MailboxClass { 25 | public: 26 | MailboxClass(BridgeClass &b = Bridge) : bridge(b) { } 27 | 28 | void begin() { } 29 | void end() { } 30 | 31 | // Receive a message and store it inside a buffer 32 | unsigned int readMessage(uint8_t *buffer, unsigned int size); 33 | // Receive a message and store it inside a String 34 | void readMessage(String &str, unsigned int maxLength = 128); 35 | 36 | // Send a message 37 | void writeMessage(const uint8_t *buffer, unsigned int size); 38 | // Send a message 39 | void writeMessage(const String& str); 40 | // Send a JSON message 41 | void writeJSON(const String& str); 42 | 43 | // Return the size of the next available message, 0 if there are 44 | // no messages in queue. 45 | unsigned int messageAvailable(); 46 | 47 | private: 48 | BridgeClass &bridge; 49 | }; 50 | 51 | extern MailboxClass Mailbox; 52 | 53 | #endif // _MAILBOX_CLASS_H_INCLUDED_ 54 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/src/Mailbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef _MAILBOX_CLASS_H_INCLUDED_ 20 | #define _MAILBOX_CLASS_H_INCLUDED_ 21 | 22 | #include 23 | 24 | class MailboxClass { 25 | public: 26 | MailboxClass(BridgeClass &b = Bridge) : bridge(b) { } 27 | 28 | void begin() { } 29 | void end() { } 30 | 31 | // Receive a message and store it inside a buffer 32 | unsigned int readMessage(uint8_t *buffer, unsigned int size); 33 | // Receive a message and store it inside a String 34 | void readMessage(String &str, unsigned int maxLength = 128); 35 | 36 | // Send a message 37 | void writeMessage(const uint8_t *buffer, unsigned int size); 38 | // Send a message 39 | void writeMessage(const String& str); 40 | // Send a JSON message 41 | void writeJSON(const String& str); 42 | 43 | // Return the size of the next available message, 0 if there are 44 | // no messages in queue. 45 | unsigned int messageAvailable(); 46 | 47 | private: 48 | BridgeClass &bridge; 49 | }; 50 | 51 | extern MailboxClass Mailbox; 52 | 53 | #endif // _MAILBOX_CLASS_H_INCLUDED_ 54 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/packages/UserLibraryFolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2017 Arduino AG (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package processing.app.packages; 31 | 32 | import java.io.File; 33 | 34 | public class UserLibraryFolder { 35 | 36 | public enum Location { 37 | SKETCHBOOK, CORE, REFERENCED_CORE, IDE_BUILTIN, 38 | } 39 | 40 | public File folder; 41 | 42 | public Location location; 43 | 44 | public UserLibraryFolder(File folder, Location location) { 45 | this.folder = folder; 46 | this.location = location; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /arduino-core/src/cc/arduino/contributions/DownloadableContributionVersionComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.contributions; 31 | 32 | import java.util.Comparator; 33 | 34 | public class DownloadableContributionVersionComparator implements Comparator { 35 | 36 | @Override 37 | public int compare(DownloadableContribution lib1, DownloadableContribution lib2) { 38 | return VersionComparator.compareTo(lib1.getParsedVersion(), lib2.getParsedVersion()); 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/debug/LegacyTargetPackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | TargetPackage - Represents a hardware package 3 | Part of the Arduino project - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2011 Cristian Maglie 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software Foundation, 19 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | package processing.app.debug; 22 | 23 | import java.util.Collection; 24 | import java.util.LinkedHashMap; 25 | import java.util.Map; 26 | 27 | public class LegacyTargetPackage implements TargetPackage { 28 | 29 | private final String id; 30 | private final Map platforms; 31 | 32 | public LegacyTargetPackage(String _id) { 33 | id = _id; 34 | platforms = new LinkedHashMap<>(); 35 | } 36 | 37 | @Override 38 | public Map getPlatforms() { 39 | return platforms; 40 | } 41 | 42 | @Override 43 | public Collection platforms() { 44 | return platforms.values(); 45 | } 46 | 47 | @Override 48 | public TargetPlatform get(String platform) { 49 | return platforms.get(platform); 50 | } 51 | 52 | @Override 53 | public boolean hasPlatform(TargetPlatform platform) { 54 | return platforms.containsKey(platform.getId()); 55 | } 56 | 57 | @Override 58 | public String getId() { 59 | return id; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/__init__.py: -------------------------------------------------------------------------------- 1 | # urllib3/__init__.py 2 | # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) 3 | # 4 | # This module is part of urllib3 and is released under 5 | # the MIT License: http://www.opensource.org/licenses/mit-license.php 6 | 7 | """ 8 | urllib3 - Thread-safe connection pooling and re-using. 9 | """ 10 | 11 | __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' 12 | __license__ = 'MIT' 13 | __version__ = 'dev' 14 | 15 | 16 | from .connectionpool import ( 17 | HTTPConnectionPool, 18 | HTTPSConnectionPool, 19 | connection_from_url 20 | ) 21 | 22 | from . import exceptions 23 | from .filepost import encode_multipart_formdata 24 | from .poolmanager import PoolManager, ProxyManager, proxy_from_url 25 | from .response import HTTPResponse 26 | from .util import make_headers, get_host 27 | 28 | 29 | # Set default logging handler to avoid "No handler found" warnings. 30 | import logging 31 | try: # Python 2.7+ 32 | from logging import NullHandler 33 | except ImportError: 34 | class NullHandler(logging.Handler): 35 | def emit(self, record): 36 | pass 37 | 38 | logging.getLogger(__name__).addHandler(NullHandler()) 39 | 40 | def add_stderr_logger(level=logging.DEBUG): 41 | """ 42 | Helper for quickly adding a StreamHandler to the logger. Useful for 43 | debugging. 44 | 45 | Returns the handler after adding it. 46 | """ 47 | # This method needs to be in this __init__.py to get the __name__ correct 48 | # even if urllib3 is vendored within another package. 49 | logger = logging.getLogger(__name__) 50 | handler = logging.StreamHandler() 51 | handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s')) 52 | logger.addHandler(handler) 53 | logger.setLevel(level) 54 | logger.debug('Added an stderr logging handler to logger: %s' % __name__) 55 | return handler 56 | 57 | # ... Clean up. 58 | del NullHandler 59 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.6.3/Bridge/examples/ConsolePixel/ConsolePixel.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Console Pixel 3 | 4 | An example of using YunShield/Yún board to receive data from the 5 | Console on the Yún. In this case, the board turns on an LED when 6 | it receives the character 'H', and turns off the LED when it 7 | receives the character 'L'. 8 | 9 | To see the Console, pick your Yún's name and IP address in the Port menu 10 | then open the Port Monitor. You can also see it by opening a terminal window 11 | and typing 12 | ssh root@ yourYunsName.local 'telnet localhost 6571' 13 | then pressing enter. When prompted for the password, enter it. 14 | 15 | 16 | The circuit: 17 | * LED connected from digital pin 13 to ground 18 | 19 | created 2006 20 | by David A. Mellis 21 | modified 25 Jun 2013 22 | by Tom Igoe 23 | 24 | This example code is in the public domain. 25 | 26 | http://www.arduino.cc/en/Tutorial/ConsolePixel 27 | 28 | */ 29 | 30 | #include 31 | 32 | const int ledPin = 13; // the pin that the LED is attached to 33 | char incomingByte; // a variable to read incoming Console data into 34 | 35 | void setup() { 36 | Bridge.begin(); // Initialize Bridge 37 | Console.begin(); // Initialize Console 38 | 39 | // Wait for the Console port to connect 40 | while (!Console); 41 | 42 | Console.println("type H or L to turn pin 13 on or off"); 43 | 44 | // initialize the LED pin as an output: 45 | pinMode(ledPin, OUTPUT); 46 | } 47 | 48 | void loop() { 49 | // see if there's incoming Console data: 50 | if (Console.available() > 0) { 51 | // read the oldest byte in the Console buffer: 52 | incomingByte = Console.read(); 53 | Console.println(incomingByte); 54 | // if it's a capital H (ASCII 72), turn on the LED: 55 | if (incomingByte == 'H') { 56 | digitalWrite(ledPin, HIGH); 57 | } 58 | // if it's an L (ASCII 76) turn off the LED: 59 | if (incomingByte == 'L') { 60 | digitalWrite(ledPin, LOW); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/testdata/libraries/Bridge_1.7.0/Bridge/examples/ConsolePixel/ConsolePixel.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Console Pixel 3 | 4 | An example of using YunShield/Yún board to receive data from the 5 | Console on the Yún. In this case, the board turns on an LED when 6 | it receives the character 'H', and turns off the LED when it 7 | receives the character 'L'. 8 | 9 | To see the Console, pick your Yún's name and IP address in the Port menu 10 | then open the Port Monitor. You can also see it by opening a terminal window 11 | and typing 12 | ssh root@ yourYunsName.local 'telnet localhost 6571' 13 | then pressing enter. When prompted for the password, enter it. 14 | 15 | 16 | The circuit: 17 | * LED connected from digital pin 13 to ground 18 | 19 | created 2006 20 | by David A. Mellis 21 | modified 25 Jun 2013 22 | by Tom Igoe 23 | 24 | This example code is in the public domain. 25 | 26 | http://www.arduino.cc/en/Tutorial/ConsolePixel 27 | 28 | */ 29 | 30 | #include 31 | 32 | const int ledPin = 13; // the pin that the LED is attached to 33 | char incomingByte; // a variable to read incoming Console data into 34 | 35 | void setup() { 36 | Bridge.begin(); // Initialize Bridge 37 | Console.begin(); // Initialize Console 38 | 39 | // Wait for the Console port to connect 40 | while (!Console); 41 | 42 | Console.println("type H or L to turn pin 13 on or off"); 43 | 44 | // initialize the LED pin as an output: 45 | pinMode(ledPin, OUTPUT); 46 | } 47 | 48 | void loop() { 49 | // see if there's incoming Console data: 50 | if (Console.available() > 0) { 51 | // read the oldest byte in the Console buffer: 52 | incomingByte = Console.read(); 53 | Console.println(incomingByte); 54 | // if it's a capital H (ASCII 72), turn on the LED: 55 | if (incomingByte == 'H') { 56 | digitalWrite(ledPin, HIGH); 57 | } 58 | // if it's an L (ASCII 76) turn off the LED: 59 | if (incomingByte == 'L') { 60 | digitalWrite(ledPin, LOW); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/cc/arduino/contributions/ui/listeners/AbstractKeyListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package cc.arduino.contributions.ui.listeners; 31 | 32 | import java.awt.event.KeyEvent; 33 | import java.awt.event.KeyListener; 34 | 35 | public abstract class AbstractKeyListener implements KeyListener { 36 | 37 | @Override 38 | public void keyTyped(KeyEvent keyEvent) { 39 | 40 | } 41 | 42 | @Override 43 | public void keyPressed(KeyEvent keyEvent) { 44 | 45 | } 46 | 47 | @Override 48 | public void keyReleased(KeyEvent keyEvent) { 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/test/processing/app/linux/UDevAdmParserTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Arduino. 3 | * 4 | * Copyright 2015 Arduino LLC (http://www.arduino.cc/) 5 | * 6 | * Arduino is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * As a special exception, you may use this file as part of a free software 21 | * library without restriction. Specifically, if other files instantiate 22 | * templates or use macros or inline functions from this file, or you compile 23 | * this file and link it with other files to produce an executable, this 24 | * file does not by itself cause the resulting executable to be covered by 25 | * the GNU General Public License. This exception does not however 26 | * invalidate any other reasons why the executable file might be covered by 27 | * the GNU General Public License. 28 | */ 29 | 30 | package processing.app.linux; 31 | 32 | import org.junit.Test; 33 | import processing.app.TestHelper; 34 | 35 | import static org.junit.Assert.assertEquals; 36 | 37 | public class UDevAdmParserTest { 38 | 39 | @Test 40 | public void shouldCorrectlyParse() throws Exception { 41 | String output = TestHelper.inputStreamToString(UDevAdmParserTest.class.getResourceAsStream("udev_output.txt")); 42 | 43 | assertEquals("0X2341_0X0036", new UDevAdmParser().extractVIDAndPID(output)); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/requests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # __ 4 | # /__) _ _ _ _ _/ _ 5 | # / ( (- (/ (/ (- _) / _) 6 | # / 7 | 8 | """ 9 | requests HTTP library 10 | ~~~~~~~~~~~~~~~~~~~~~ 11 | 12 | Requests is an HTTP library, written in Python, for human beings. Basic GET 13 | usage: 14 | 15 | >>> import requests 16 | >>> r = requests.get('http://python.org') 17 | >>> r.status_code 18 | 200 19 | >>> 'Python is a programming language' in r.content 20 | True 21 | 22 | ... or POST: 23 | 24 | >>> payload = dict(key1='value1', key2='value2') 25 | >>> r = requests.post("http://httpbin.org/post", data=payload) 26 | >>> print r.text 27 | { 28 | ... 29 | "form": { 30 | "key2": "value2", 31 | "key1": "value1" 32 | }, 33 | ... 34 | } 35 | 36 | The other HTTP methods are supported - see `requests.api`. Full documentation 37 | is at . 38 | 39 | :copyright: (c) 2013 by Kenneth Reitz. 40 | :license: Apache 2.0, see LICENSE for more details. 41 | 42 | """ 43 | 44 | __title__ = 'requests' 45 | __version__ = '1.1.0' 46 | __build__ = 0x010100 47 | __author__ = 'Kenneth Reitz' 48 | __license__ = 'Apache 2.0' 49 | __copyright__ = 'Copyright 2013 Kenneth Reitz' 50 | 51 | 52 | from . import utils 53 | from .models import Request, Response, PreparedRequest 54 | from .api import request, get, head, post, patch, put, delete, options 55 | from .sessions import session, Session 56 | from .status_codes import codes 57 | from .exceptions import ( 58 | RequestException, Timeout, URLRequired, 59 | TooManyRedirects, HTTPError, ConnectionError 60 | ) 61 | 62 | # Set default logging handler to avoid "No handler found" warnings. 63 | import logging 64 | try: # Python 2.7+ 65 | from logging import NullHandler 66 | except ImportError: 67 | class NullHandler(logging.Handler): 68 | def emit(self, record): 69 | pass 70 | 71 | logging.getLogger(__name__).addHandler(NullHandler()) 72 | -------------------------------------------------------------------------------- /arduino-core/src/processing/app/i18n/python/transifex.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | #vim:set fileencoding=utf-8 sw=2 expandtab 3 | 4 | import update 5 | import requests 6 | import json 7 | 8 | class Transifex(object): 9 | def __init__(self, user, passwd): 10 | self.auth_ = (user, passwd) 11 | 12 | r = requests.get( 13 | 'http://www.transifex.com/api/2/project/' 14 | 'arduino-ide-15/resource/ide-15/?details', 15 | auth=self.auth_ 16 | ) 17 | r.raise_for_status() 18 | d = r.json() 19 | self.languages_ = set(lang['code'] for lang in d['available_languages']) 20 | 21 | def canonical_lang(self, lang): 22 | lang = lang.lower() 23 | 24 | for l in self.languages_: 25 | if l.lower() == lang: 26 | return l 27 | 28 | match = [] 29 | for l in self.languages_: 30 | if l.split('_', 1)[0].lower() == lang: 31 | match.append(l) 32 | if len(match) > 1: 33 | raise RuntimeError('Two or more candidates for %s: %s' % (lang, ' '.join(match))) 34 | if len(match) == 0: 35 | raise RuntimeError('No language code %s' % lang) 36 | return match[0] 37 | 38 | def translation(self, lang): 39 | r = requests.get( 40 | 'https://www.transifex.com/api/2/project/arduino-ide-15/resource/ide-15/translation/%s/?file' % lang, 41 | auth=self.auth_ 42 | ) 43 | r.raise_for_status() 44 | r.encoding = 'utf-8' # workaround for a Transifex issue. 45 | return r.text 46 | 47 | def pull(self, lang, fname): 48 | new = self.translation(lang).encode('utf-8') 49 | new = map(lambda a: a + '\n', new.split('\n')) 50 | new = update.read_po(new) 51 | 52 | update.dump(new, fname) 53 | 54 | def push(self, lang, data): 55 | r = requests.put( 56 | 'http://www.transifex.com/api/2/project/' 57 | 'arduino-ide-15/resource/ide-15/translation/%s/' % lang, 58 | data=json.dumps({ 'content': data }), 59 | headers={ 'content-type': 'application/json' }, 60 | auth=self.auth_ 61 | ) 62 | r.raise_for_status() 63 | --------------------------------------------------------------------------------