Skip to content

PWM and Lib Servo bug #1614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 143 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
2aee42a
Fix for #814, Memory Leak
bjelojac Apr 25, 2013
24df3ab
Fixed a typo in the WebServer example.
Jul 29, 2013
0f0d5fe
Merge pull request #1526 from interwho/master
cmaglie Sep 2, 2013
1162a45
USB serial baud arg type
pbrook Sep 2, 2013
f53fcdd
USB CDC two argument begin()
pbrook Sep 2, 2013
a06ccb7
Latest Adafruit_GFX fixes + moved GFX lib to utility folder
PaintYourDragon Sep 3, 2013
5615e20
Merge pull request #1566 from PaintYourDragon/master
cmaglie Sep 6, 2013
a0b9d95
Merge branch 'usb-serial-begin' of github.com:pbrook/Arduino into pbr…
cmaglie Sep 30, 2013
aaafaf3
Fix indentation (cosmetic)
supcik Oct 6, 2013
a340140
Merge pull request #1608 from supcik/fix_indent
cmaglie Oct 9, 2013
6732677
Merge pull request #1383 from bjelojac/patch-1
ffissore Oct 9, 2013
21ef50b
It was still using jdk FileNameExtensionFilter
Oct 14, 2013
72440e7
Added missing class FileNameExtensionFilter
Oct 14, 2013
e21b182
Removed destructor from File.cpp and SD.h as it leads to unexpected c…
cmaglie Oct 17, 2013
128678c
Update readme.txt
cmaglie Oct 23, 2013
787f73d
Display line numbers for the file being edited
Oct 28, 2013
a2111fd
add preference to enable/disable line numbers
Oct 29, 2013
66faf5d
Render line numbers using TextAreaPainter
Nov 3, 2013
5373883
Added Arduino Ethernet variant.
cmaglie Nov 3, 2013
350eb86
Added LED_BUILTIN constant to Leonardo board
cmaglie Nov 3, 2013
9b519f2
Changed LED_BUILTIN to a macro to better support boards that do not h…
cmaglie Nov 3, 2013
ae265a9
Help 3rd party installers find the hardware path
PaulStoffregen Jul 27, 2013
89d6841
Merge branch 'cayci-master'
cmaglie Nov 4, 2013
4cb0b11
Fix robot problems regarding new version of Arduino
Nov 4, 2013
cb9686d
Updates to a number of Examples
shfitz Nov 8, 2013
e7c24c6
Added SERIAL metadata into variant files.
cmaglie Nov 11, 2013
4869f7f
Updated listfiles SD example
shfitz Nov 11, 2013
83ef181
Updated Blink without delay example
shfitz Nov 11, 2013
b332904
Modified LCD custom character example
shfitz Nov 11, 2013
b79ee02
Updated KeyboardMessage example
shfitz Nov 11, 2013
e304180
Fix SERIAL_* metadata in Arduino Ethernet variant
cmaglie Nov 11, 2013
bd04a9d
Merge remote-tracking branch 'arduino/master'
cmaglie Nov 12, 2013
3685463
Merge pull request #1659 from X-Y/master
cmaglie Nov 14, 2013
ca37de4
add operator==, remoteIP and remotePort to EthernetClient
ntruchsess Nov 25, 2013
937bce1
add localPort to EthernetClient, simplify operator==
ntruchsess Nov 27, 2013
a27604f
add some lines of comment to ChatServer.ino, remove redundant assignm…
ntruchsess Nov 27, 2013
b5c500f
revert Chatserver example, create new AdvancedChatServer based on it
ntruchsess Nov 28, 2013
889e1f6
apply AdvancedChatServer.ino changes to renamed ChatServer.ino
ntruchsess Nov 28, 2013
fbdf3a1
remove all Changes besides operator==
ntruchsess Dec 6, 2013
2995456
update AdvancedChatServer.ino, add operator!=
ntruchsess Dec 6, 2013
ffb8a55
Merge pull request #1700 from ntruchsess/ethernetclient2
cmaglie Dec 9, 2013
7fcba37
Changed pins definition in variants from constants to #defines.
cmaglie Dec 13, 2013
3baa0ce
Merge branch 'master' of github.com:arduino/Arduino
cmaglie Dec 13, 2013
5c1b5c0
Updated drivers signature for Windows
cmaglie Jan 7, 2014
144b5e8
Merge tag '1.0.5-r2'
cmaglie Jan 7, 2014
c2498aa
Updated revisions log
cmaglie Jan 8, 2014
e9c72c9
Signed drivers for Windows 8.1
cmaglie Jan 8, 2014
711fe3d
Merge tag '1.0.5-r2' into HEAD
cmaglie Jan 8, 2014
2fb3770
Compile with -x assembler-with-cpp instead of -assembler-with-cpp.
Jan 21, 2014
a432e26
Merge pull request #1814 from HeMan/master
cmaglie Jan 22, 2014
017326a
Minor changes to Communication Examples
shfitz Jan 29, 2014
9b86cb6
Update readme.txt
KonradIT Jan 29, 2014
ede9b56
Update and rename readme.txt to README.mkdn
KonradIT Jan 29, 2014
7ea7c52
Rename README.mkdn to README.md
KonradIT Jan 29, 2014
1c28dab
Updated Listfiles SD example
shfitz Feb 2, 2014
b415903
Merge pull request #1836 from KonradIT/master
cmaglie Feb 5, 2014
5dfafe7
WiFi Shield examples: added the firmware version check
Fede85 Feb 6, 2014
ef4f0f3
If 2 libs have same .h file, use the lib with same dir name
PaulStoffregen Feb 10, 2014
b78fcf5
Merge pull request #1853 from PaulStoffregen/master
cmaglie Feb 11, 2014
53adddc
Fixed issue #1478, #1599, #1709, motors being opposite, updated turni…
X-Y Feb 12, 2014
eb1e2f2
Revert "Changed pins definition in variants from constants to #defines."
cmaglie Feb 11, 2014
9dd4255
Merge branch 'master' of github.com:X-Y/Arduino into X-Y-master
cmaglie Feb 12, 2014
2a8c063
Added some friendly messages for Arduino Robot include errors on old …
cmaglie Feb 12, 2014
8eaaeeb
Added license for Arduino.h, binary.h and main.cpp (master branch)
cmaglie Feb 10, 2014
cc6d7cd
Added license for Client, IPAddressm and Server (master branch)
cmaglie Feb 7, 2014
fd2ecf7
Update README.md
felixphew Feb 16, 2014
1d060ca
Merge pull request #1867 from felixphew/patch-2
ffissore Feb 17, 2014
57bee97
Local (user installed) libraries have priority over system libraries
cmaglie Feb 17, 2014
3a72c02
Removed unused code, fixed indentation.
cmaglie Feb 17, 2014
f3944b2
Corrected repeated 'less' in checkName's message
h2g2guy Feb 19, 2014
2757691
Merge pull request #1879 from h2g2guy/master
cmaglie Feb 19, 2014
2380a8f
Added copyright license for WiFi shield library
cmaglie Feb 27, 2014
994f0d7
Windows: arduino_debug.exe. Backport of ad2ff737bb871ebf9a1374924a580…
Feb 27, 2014
3be6eb8
added support for '-' and '.' but both not as the first as first char…
oni303 Feb 27, 2014
efedfa7
cut the filename at the last '.' not at the first in tab-names of the…
oni303 Feb 27, 2014
8642df7
Esplora: added reading form Tinkerkit inputs
egueli Mar 3, 2014
4c8199e
Merge pull request #1773 from oni303/minus_support
cmaglie Mar 4, 2014
5a60f6b
Windows: launch4j gets downloaded at build time
Mar 4, 2014
16915f1
Merge pull request #1899 from arduino/arduino_debug_master_backport
cmaglie Mar 4, 2014
9810e89
Update to Esplora example
shfitz Mar 8, 2014
5672402
Added compatibity for 1.5 libraries layout on IDE 1.0.x
cmaglie Mar 20, 2014
860da6f
Update README.md
Ramoonus Mar 24, 2014
962d6d1
Merge pull request #1958 from Ramoonus/patch-1
cmaglie Mar 25, 2014
5bc28a1
Fixed string constructor overloading bug
majenkotech Apr 1, 2014
8a1fffd
Import WString from 1.5.6
majenkotech Apr 1, 2014
4a10c1c
Merge pull request #1907 from egueli/master
Fede85 Apr 2, 2014
a74597d
Merge branch 'master' of github.com:majenkotech/Arduino
cmaglie Apr 7, 2014
9c7e3ab
Fixed example StringStartsWithEndsWith.ino
cmaglie Apr 7, 2014
9403021
fix comments on spaceship example
jaimeiniesta May 1, 2014
3adbeee
Merge pull request #2042 from jaimeiniesta/patch-1
cmaglie May 3, 2014
cf5fc14
Modified Keyboard Reprogram example
shfitz May 3, 2014
f40e471
Match return value to type in available()
zfields May 8, 2014
9ad8748
Updated Blink
shfitz May 8, 2014
17e1eb5
Fix idle level when initializing a inverted SoftwareSerial
jenscski May 23, 2014
b999ed2
Merge pull request #2090 from jenscski/master-fix-1361
cmaglie May 23, 2014
fb8e439
Merge pull request #2057 from zfields/patch-1
cmaglie May 23, 2014
44b5096
Backported Print class from ide-1.5.x branch
cmaglie May 23, 2014
b822091
improved USB write speeds
embmicro Mar 18, 2014
13c0db5
Fix race condition in USB CDC transmit
pbrook Mar 20, 2014
ddbb6b3
Improve CDC read code
pbrook Mar 21, 2014
91f0dbc
Fix of a bug
amulya349 May 30, 2014
2c3058b
Fix of a bug
amulya349 May 30, 2014
6914af0
USB CDC available() method returns correct number of bytes in buffer.
cmaglie May 26, 2014
1918966
Merge pull request #2104 from amulya349/master
cmaglie Jun 2, 2014
e692352
Fixed error in comment
amulya349 Jun 7, 2014
09d0843
Merge pull request #2117 from amulya349/master
ffissore Jun 7, 2014
d460dd6
corrected wrong path to firmware binaries in wifishield upgrade scrip…
Jun 7, 2014
9ac7e30
Update USBAPI.h
embmicro Jun 10, 2014
d2b6f9f
Merge pull request #2124 from embmicro/patch-1
cmaglie Jun 13, 2014
11e02db
Fixed regression in USBAPI and CDC (xaljox)
cmaglie Jun 19, 2014
4027030
Allow variants to define an initVariant() function that is called at …
cmaglie Jun 19, 2014
a798c79
Updates to revision log
cmaglie Jun 25, 2014
bb095a2
initVariant() is now declared as external "C" function.
cmaglie Jun 27, 2014
e0f83a3
Backported digitalPinToInterrupt macro from IDE 1.5.x
cmaglie Jun 30, 2014
f732097
Updated revision log
cmaglie Jun 30, 2014
29f9dd9
Merge pull request #2139 from cmaglie/init-variant
cmaglie Jul 1, 2014
668559f
Updated revision log
cmaglie Jul 1, 2014
fe78ffe
Merge pull request #2118 from benoit-artefactlabs/wifishield-upgrade-…
cmaglie Jul 1, 2014
494d3de
Fixed permission on wifishield upgrade script.
cmaglie Jul 1, 2014
faa0845
Fixed Smoothing example
cmaglie Jul 2, 2014
f34787d
Update HelloWorld.ino
ankitdaf Jul 3, 2014
3a8ad75
Merge pull request #2162 from ankitdaf/patch-2
cmaglie Jul 15, 2014
2c10bbe
SPI: remove duplicate BarometricPressureSensor example
pmjdebruijn Jul 19, 2014
865594d
Fix of a bug
amulya349 Jul 22, 2014
97dc72c
Fix of a spelling mistake
amulya349 Jul 22, 2014
163b60e
Merge pull request #2206 from amulya349/master
cmaglie Jul 24, 2014
e71bbf6
Merge pull request #2195 from pmjdebruijn/duplicate-example
cmaglie Jul 24, 2014
1bbcb2f
Added replacement stub for cstdlib atexit() funciton.
Chris--A Aug 4, 2014
70bc562
fix Descriptor.c
QuentinPerez Aug 25, 2014
e9e257b
Merge pull request #2258 from QuentinPerez/fix-descriptor-firmware
cmaglie Aug 25, 2014
88b487f
Removed todo.txt (leftover) and updated build.xml accordingly
cmaglie Sep 16, 2014
90bd172
Updated revision log. Version upped to 1.0.6.
cmaglie Sep 16, 2014
4dd931a
set correct max size for mega2560 (to address issue #2277)
championswimmer Sep 21, 2014
cd015f4
Merge pull request #2316 from championswimmer/1.0.x-fixMaxMega
cmaglie Sep 23, 2014
d3f76e9
Fix typo in KeyboardLogout.ino
Unh0lyTigg Sep 26, 2014
ad0bedc
Merge pull request #2329 from Unh0lyTigg/patch-1
cmaglie Oct 1, 2014
c01172c
Changed EthernetClient to use IANA recommended ephemeral port range, …
JChristensen Oct 6, 2014
d63350b
Merge pull request #2345 from JChristensen/ephemeral
cmaglie Oct 8, 2014
afc368b
GSM: Backported library from IDE 1.5.x
cmaglie Oct 9, 2014
ed5ad42
Upped version to 1.0.7. Update revision log.
cmaglie Oct 9, 2014
58b6fd4
Fixed missing NOT_AN_INTERRUPT constant in digitalPinToInterrupt()
cmaglie Oct 21, 2014
62cf4b6
Revert "Match return value to type in available()"
cmaglie Oct 21, 2014
54a6d64
Updated revision log
cmaglie Oct 21, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ build/linux/dist/*.tar.gz
build/linux/*.tgz
test-bin
*.iml
build/windows/launch4j-*
build/windows/launcher/launch4j
build/windows/WinAVR-*.zip
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Arduino
========

* Arduino is an open-source physical computing platform based on a simple i/o
board and a development environment that implements the Processing/Wiring
language. Arduino can be used to develop stand-alone interactive objects or
can be connected to software on your computer (e.g. Flash, Processing, MaxMSP).
The boards can be assembled by hand or purchased preassembled; the open-source
IDE can be downloaded for free.

* For more information, see the website at: http://www.arduino.cc/
or the forums at: http://arduino.cc/forum/

* To report a *bug* in the software or to request *a simple enhancement* go to:
http://github.com/arduino/Arduino/issues

* More complex requests and technical discussion should go on the Arduino Developers
mailing list:
https://groups.google.com/a/arduino.cc/forum/#!forum/developers

* If you're interested in modifying or extending the Arduino software, we strongly
suggest discussing your ideas on the Developers mailing list *before* starting
to work on them. That way you can coordinate with the Arduino Team and others,
giving your work a higher chance of being integrated into the official release
https://groups.google.com/a/arduino.cc/forum/#!forum/developers

Installation
------------
Detailed instructions are in reference/Guide_Windows.html and
reference/Guide_MacOSX.html. For Linux, see the Arduino playground:
http://www.arduino.cc/playground/Learning/Linux

Credits
--------
Arduino is an open source project, supported by many.

The Arduino team is composed of Massimo Banzi, David Cuartielles, Tom Igoe,
Gianluca Martino, Daniela Antonietti, and David A. Mellis.

Arduino uses the [GNU avr-gcc toolchain](http://gcc.gnu.org/wiki/avr-gcc), [avrdude](http://www.nongnu.org/avrdude/), [avr-libc](http://www.nongnu.org/avr-libc/), and code from
[Processing](http://www.processing.org) and [Wiring](http://wiring.org.co).

Icon and about image designed by [ToDo](http://www.todo.to.it/)

101 changes: 47 additions & 54 deletions app/src/processing/app/Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
import java.util.*;

import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;

import processing.app.debug.Compiler;
import processing.app.debug.Target;
import processing.app.helpers.FileUtils;
import processing.app.helpers.filefilters.OnlyDirs;
import processing.app.javax.swing.filechooser.FileNameExtensionFilter;
import processing.app.tools.ZipDeflater;
import processing.core.*;
import static processing.app.I18n._;
Expand All @@ -46,9 +46,9 @@
* files and images, etc) that comes from that.
*/
public class Base {
public static final int REVISION = 105;
public static final int REVISION = 107;
/** This might be replaced by main() if there's a lib/version.txt file. */
static String VERSION_NAME = "0105";
static String VERSION_NAME = "0107";
/** Set true if this a proper release rather than a numbered revision. */
static public boolean RELEASE = false;

Expand Down Expand Up @@ -120,7 +120,7 @@ static public void main(String args[]) {
File versionFile = getContentFile("lib/version.txt");
if (versionFile.exists()) {
String version = PApplet.loadStrings(versionFile)[0];
if (!version.equals(VERSION_NAME)) {
if (!version.equals(VERSION_NAME) && !version.equals("${version}")) {
VERSION_NAME = version;
RELEASE = true;
}
Expand All @@ -129,6 +129,10 @@ static public void main(String args[]) {
e.printStackTrace();
}

// help 3rd party installers find the correct hardware path
Preferences.set("last.ide." + VERSION_NAME + ".hardwarepath", getHardwarePath());
Preferences.set("last.ide." + VERSION_NAME + ".daterun", "" + (new Date()).getTime() / 1000);

// if (System.getProperty("mrj.version") != null) {
// //String jv = System.getProperty("java.version");
// String ov = System.getProperty("os.version");
Expand Down Expand Up @@ -1207,62 +1211,51 @@ public void actionPerformed(ActionEvent event) {
boolean ifound = false;

for (String potentialName : list) {
File subfolder = new File(folder, potentialName);
// File libraryFolder = new File(subfolder, "library");
// File libraryJar = new File(libraryFolder, potentialName + ".jar");
// // If a .jar file of the same prefix as the folder exists
// // inside the 'library' subfolder of the sketch
// if (libraryJar.exists()) {
String sanityCheck = Sketch.sanitizeName(potentialName);
if (!sanityCheck.equals(potentialName)) {
String mess = I18n.format(
_("The library \"{0}\" cannot be used.\n" +
"Library names must contain only basic letters and numbers.\n" +
"(ASCII only and no spaces, and it cannot start with a number)"),
potentialName
);
Base.showMessage(_("Ignoring bad library name"), mess);
continue;
}
File libFolder = new File(folder, potentialName);
String sanityCheck = Sketch.sanitizeName(potentialName);
if (!sanityCheck.equals(potentialName)) {
String mess = I18n.format(_("The library \"{0}\" cannot be used.\n"
+ "Library names must contain only basic letters and numbers.\n"
+ "(ASCII only and no spaces, and it cannot start with a number)"),
potentialName);
Base.showMessage(_("Ignoring bad library name"), mess);
continue;
}

String libraryName = potentialName;
// // get the path for all .jar files in this code folder
// String libraryClassPath =
// Compiler.contentsToClassPath(libraryFolder);
// // grab all jars and classes from this folder,
// // and append them to the library classpath
// librariesClassPath +=
// File.pathSeparatorChar + libraryClassPath;
// // need to associate each import with a library folder
// String packages[] =
// Compiler.packageListFromClassPath(libraryClassPath);
libraries.add(subfolder);
String libraryName = potentialName;
libraries.add(libFolder);
String libFolderPath = libFolder.getAbsolutePath();
try {
String packages[] =
Compiler.headerListFromIncludePath(subfolder.getAbsolutePath());
for (String pkg : packages) {
importToLibraryTable.put(pkg, subfolder);
String headers[] = Compiler.headerListFromIncludePath(libFolderPath);
for (String header : headers) {
// Extract file name (without extension ".h")
String name = header.substring(0, header.length() - 2);

// If the header name equals to the current library folder use it
if (libFolderPath.endsWith(name)) {
importToLibraryTable.put(header, libFolder);
continue;
}

// If a library was already found with this header, keep it if
// the library's directory name matches the header name.
File old = importToLibraryTable.get(header);
if (old != null) {
if (old.getPath().endsWith(name))
continue;
}
importToLibraryTable.put(header, libFolder);
}
} catch (IOException e) {
showWarning(_("Error"), I18n.format("Unable to list header files in {0}", subfolder), e);
showWarning(_("Error"), I18n.format(
"Unable to list header files in {0}", libFolder), e);
}

JMenuItem item = new JMenuItem(libraryName);
item.addActionListener(listener);
item.setActionCommand(subfolder.getAbsolutePath());
menu.add(item);
ifound = true;

// XXX: DAM: should recurse here so that library folders can be nested
// } else { // not a library, but is still a folder, so recurse
// JMenu submenu = new JMenu(libraryName);
// // needs to be separate var, otherwise would set ifound to false
// boolean found = addLibraries(submenu, subfolder);
// if (found) {
// menu.add(submenu);
// ifound = true;
// }
// }
JMenuItem item = new JMenuItem(libraryName);
item.addActionListener(listener);
item.setActionCommand(libFolderPath);
menu.add(item);
ifound = true;
}
return ifound;
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/processing/app/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ protected void applyPreferences() {
textarea.setEditable(!external);
saveMenuItem.setEnabled(!external);
saveAsMenuItem.setEnabled(!external);

textarea.setDisplayLineNumbers(Preferences.getBoolean("editor.linenumbers"));

TextAreaPainter painter = textarea.getPainter();
if (external) {
Expand Down
12 changes: 12 additions & 0 deletions app/src/processing/app/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ public class Preferences {
JCheckBox exportSeparateBox;
JCheckBox verboseCompilationBox;
JCheckBox verboseUploadBox;
JCheckBox displayLineNumbersBox;
JCheckBox verifyUploadBox;
JCheckBox externalEditorBox;
JCheckBox memoryOverrideBox;
Expand Down Expand Up @@ -382,6 +383,15 @@ public void actionPerformed(ActionEvent e) {
box.setBounds(left, top, d.width, d.height);
top += d.height + GUI_BETWEEN;

// [ ] Display line numbers

displayLineNumbersBox = new JCheckBox(_("Display line numbers"));
pain.add(displayLineNumbersBox);
d = displayLineNumbersBox.getPreferredSize();
displayLineNumbersBox.setBounds(left, top, d.width + 10, d.height);
right = Math.max(right, left + d.width);
top += d.height + GUI_BETWEEN;

// [ ] Verify code after upload

verifyUploadBox = new JCheckBox(_("Verify code after upload"));
Expand Down Expand Up @@ -571,6 +581,7 @@ protected void applyFrame() {
// put each of the settings into the table
setBoolean("build.verbose", verboseCompilationBox.isSelected());
setBoolean("upload.verbose", verboseUploadBox.isSelected());
setBoolean("editor.linenumbers", displayLineNumbersBox.isSelected());
setBoolean("upload.verify", verifyUploadBox.isSelected());

// setBoolean("sketchbook.closing_last_window_quits",
Expand Down Expand Up @@ -634,6 +645,7 @@ protected void showFrame(Editor editor) {
// set all settings entry boxes to their actual status
verboseCompilationBox.setSelected(getBoolean("build.verbose"));
verboseUploadBox.setSelected(getBoolean("upload.verbose"));
displayLineNumbersBox.setSelected(getBoolean("editor.linenumbers"));
verifyUploadBox.setSelected(getBoolean("upload.verify"));

//closingLastQuitsBox.
Expand Down
12 changes: 4 additions & 8 deletions app/src/processing/app/Sketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,11 @@
import static processing.app.I18n._;

import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.io.*;
import java.util.*;
import java.util.List;
import java.util.zip.*;

import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.border.TitledBorder;


/**
Expand Down Expand Up @@ -2024,7 +2019,7 @@ static public String checkName(String origName) {
String msg =
_("The sketch name had to be modified. Sketch names can only consist\n" +
"of ASCII characters and numbers (but cannot start with a number).\n" +
"They should also be less less than 64 characters long.");
"They should also be less than 64 characters long.");
System.out.println(msg);
}
return newName;
Expand Down Expand Up @@ -2063,9 +2058,10 @@ static public String sanitizeName(String origName) {
for (int i = 0; i < c.length; i++) {
if (((c[i] >= '0') && (c[i] <= '9')) ||
((c[i] >= 'a') && (c[i] <= 'z')) ||
((c[i] >= 'A') && (c[i] <= 'Z'))) {
((c[i] >= 'A') && (c[i] <= 'Z')) ||
((i > 0) && (c[i] == '-')) ||
((i > 0) && (c[i] == '.'))) {
buffer.append(c[i]);

} else {
buffer.append('_');
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/processing/app/SketchCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public SketchCode(File file, String extension) {

protected void makePrettyName() {
prettyName = file.getName();
int dot = prettyName.indexOf('.');
int dot = prettyName.lastIndexOf('.');
prettyName = prettyName.substring(0, dot);
}

Expand Down
Loading