Skip to content

Commit a46259a

Browse files
committed
Merged 1.0.5
Still missing: - updates to WiFi lib for sam. - updates to examples of Ehternet and WiFi for sam. Merge remote-tracking branch 'arduino/master' into ide-1.5.x Conflicts: app/src/processing/app/Base.java app/src/processing/app/Editor.java app/src/processing/app/helpers/FileUtils.java app/src/processing/app/i18n/Resources_fr.po app/src/processing/app/i18n/Resources_fr.properties build/shared/revisions.txt hardware/arduino/avr/libraries/Ethernet/examples/DnsWebClient/DnsWebClient.ino hardware/arduino/avr/libraries/WiFi/examples/WifiChatServer/WifiChatServer.ino hardware/arduino/avr/libraries/WiFi/examples/WifiPachubeClient/WifiPachubeClient.ino hardware/arduino/avr/libraries/WiFi/examples/WifiPachubeClientString/WifiPachubeClientString.ino hardware/arduino/avr/libraries/WiFi/examples/WifiTwitterClient/WifiTwitterClient.ino hardware/arduino/avr/libraries/WiFi/examples/WifiUdpSendReceiveString/WifiUdpSendReceiveString.ino hardware/arduino/avr/libraries/WiFi/examples/WifiWebClient/WifiWebClient.ino hardware/arduino/avr/libraries/WiFi/examples/WifiWebClientRepeating/WifiWebClientRepeating.ino hardware/arduino/avr/libraries/WiFi/examples/WifiWebServer/WifiWebServer.ino libraries/WiFi/examples/WiFiChatServer/WiFiChatServer.ino libraries/WiFi/examples/WiFiPachubeClient/WiFiPachubeClient.ino libraries/WiFi/examples/WiFiPachubeClientString/WiFiPachubeClientString.ino libraries/WiFi/examples/WiFiTwitterClient/WiFiTwitterClient.ino libraries/WiFi/examples/WiFiUdpSendReceiveString/WiFiUdpSendReceiveString.ino libraries/WiFi/examples/WiFiWebClient/WiFiWebClient.ino libraries/WiFi/examples/WiFiWebClientRepeating/WiFiWebClientRepeating.ino libraries/WiFi/examples/WiFiWebServer/WiFiWebServer.ino libraries/WiFi/examples/WifiChatServer/WifiChatServer.ino libraries/WiFi/examples/WifiPachubeClient/WifiPachubeClient.ino libraries/WiFi/examples/WifiPachubeClientString/WifiPachubeClientString.ino libraries/WiFi/examples/WifiTwitterClient/WifiTwitterClient.ino libraries/WiFi/examples/WifiUdpSendReceiveString/WifiUdpSendReceiveString.ino libraries/WiFi/examples/WifiWebClient/WifiWebClient.ino libraries/WiFi/examples/WifiWebClientRepeating/WifiWebClientRepeating.ino libraries/WiFi/examples/WifiWebServer/WifiWebServer.ino
2 parents 5b8ac97 + 296bdac commit a46259a

File tree

36 files changed

+171
-137
lines changed

36 files changed

+171
-137
lines changed

app/src/processing/app/Base.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.util.List;
3030

3131
import javax.swing.*;
32+
import javax.swing.filechooser.FileNameExtensionFilter;
3233

3334
import processing.app.debug.TargetBoard;
3435
import processing.app.debug.TargetPackage;
@@ -38,7 +39,6 @@
3839
import processing.app.helpers.PreferencesMap;
3940
import processing.app.helpers.filefilters.OnlyDirs;
4041
import processing.app.helpers.filefilters.OnlyFilesWithExtension;
41-
import processing.app.javax.swing.filechooser.FileNameExtensionFilter;
4242
import processing.app.packages.Library;
4343
import processing.app.packages.LibraryList;
4444
import processing.app.tools.ZipDeflater;
@@ -1083,7 +1083,8 @@ public void actionPerformed(ActionEvent e) {
10831083
}
10841084
});
10851085
importMenu.add(addLibraryMenuItem);
1086-
1086+
importMenu.addSeparator();
1087+
10871088
// Split between user supplied libraries and IDE libraries
10881089
TargetPlatform targetPlatform = getTargetPlatform();
10891090

app/src/processing/app/EditorStatus.java

+40
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
import java.awt.event.*;
2828
import javax.swing.*;
2929

30+
import java.awt.datatransfer.*;
31+
import static processing.app.I18n._;
32+
3033

3134
/**
3235
* Panel just below the editing area that contains status messages.
@@ -68,6 +71,7 @@ public class EditorStatus extends JPanel /*implements ActionListener*/ {
6871
JButton okButton;
6972
JTextField editField;
7073
JProgressBar progressBar;
74+
JButton copyErrorButton;
7175

7276
//Thread promptThread;
7377
int response;
@@ -109,6 +113,7 @@ public void empty() {
109113
public void notice(String message) {
110114
mode = NOTICE;
111115
this.message = message;
116+
copyErrorButton.setVisible(false);
112117
//update();
113118
repaint();
114119
}
@@ -121,6 +126,7 @@ public void unnotice(String unmessage) {
121126
public void error(String message) {
122127
mode = ERR;
123128
this.message = message;
129+
copyErrorButton.setVisible(true);
124130
repaint();
125131
}
126132

@@ -178,6 +184,7 @@ public void progress(String message)
178184
this.message = message;
179185
progressBar.setIndeterminate(false);
180186
progressBar.setVisible(true);
187+
copyErrorButton.setVisible(false);
181188
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
182189
repaint();
183190
}
@@ -190,6 +197,7 @@ public void progressIndeterminate(String message)
190197
progressBar.setIndeterminate(true);
191198
progressBar.setValue(50);
192199
progressBar.setVisible(true);
200+
copyErrorButton.setVisible(false);
193201
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
194202
repaint();
195203
}
@@ -208,6 +216,7 @@ public void unprogress()
208216
if (Preferences.getBoolean("editor.beep.compile")) {
209217
Toolkit.getDefaultToolkit().beep();
210218
}
219+
if (progressBar == null) return;
211220
progressBar.setVisible(false);
212221
progressBar.setValue(0);
213222
setCursor(null);
@@ -217,6 +226,7 @@ public void unprogress()
217226

218227
public void progressUpdate(int value)
219228
{
229+
if (progressBar == null) return;
220230
progressBar.setValue(value);
221231
repaint();
222232
}
@@ -442,6 +452,32 @@ public void keyTyped(KeyEvent event) {
442452
add(progressBar);
443453
progressBar.setVisible(false);
444454

455+
copyErrorButton = new JButton(
456+
"<html>" + _("Copy error") + "<br>" + _("to clipboard") + "</html>");
457+
Font font = copyErrorButton.getFont();
458+
font = new Font(font.getName(), font.getStyle(), (int) (font.getSize()*0.7));
459+
copyErrorButton.setFont(font);
460+
copyErrorButton.setHorizontalAlignment(JLabel.CENTER);
461+
add(copyErrorButton);
462+
copyErrorButton.setVisible(false);
463+
copyErrorButton.addActionListener(new ActionListener() {
464+
public void actionPerformed(ActionEvent e) {
465+
String message="";
466+
if ((Preferences.getBoolean("build.verbose")) == false) {
467+
message = " " + _("This report would have more information with") + "\n";
468+
message += " \"" + _("Show verbose output during compilation") + "\"\n";
469+
message += " " + _("enabled in File > Preferences.") + "\n";
470+
}
471+
message += _("Arduino: ") + Base.VERSION_NAME + " (" + System.getProperty("os.name") + "), ";
472+
message += _("Board: ") + "\"" + Base.getBoardPreferences().get("name") + "\"\n";
473+
message += editor.console.consoleTextPane.getText().trim();
474+
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
475+
StringSelection data = new StringSelection(message);
476+
clipboard.setContents(data, null);
477+
Clipboard unixclipboard = Toolkit.getDefaultToolkit().getSystemSelection();
478+
if (unixclipboard != null) unixclipboard.setContents(data, null);
479+
}
480+
});
445481
}
446482
}
447483

@@ -474,6 +510,10 @@ protected void setButtonBounds() {
474510
editField.setBounds(yesLeft - Preferences.BUTTON_WIDTH, editTop,
475511
editWidth, editHeight);
476512
progressBar.setBounds(noLeft, editTop, editWidth, editHeight);
513+
514+
Dimension copyErrorButtonSize = copyErrorButton.getPreferredSize();
515+
copyErrorButton.setLocation(sizeW - copyErrorButtonSize.width - 5, top);
516+
copyErrorButton.setSize(copyErrorButtonSize.width, Preferences.BUTTON_HEIGHT);
477517
}
478518

479519

app/src/processing/app/syntax/JEditTextArea.java

+34-1
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,16 @@ public void select(int start, int end)
11911191
selectionEndLine = newEndLine;
11921192
biasLeft = newBias;
11931193

1194+
if (newStart != newEnd) {
1195+
Clipboard unixclipboard = getToolkit().getSystemSelection();
1196+
if (unixclipboard != null) {
1197+
String selection = getSelectedText();
1198+
if (selection != null) {
1199+
unixclipboard.setContents(new StringSelection(selection), null);
1200+
}
1201+
}
1202+
}
1203+
11941204
fireCaretEvent();
11951205
}
11961206

@@ -1653,7 +1663,11 @@ public void copy()
16531663
for(int i = 0; i < repeatCount; i++)
16541664
buf.append(selection);
16551665

1656-
clipboard.setContents(new StringSelection(buf.toString()),null);
1666+
Transferable t = new StringSelection(buf.toString());
1667+
clipboard.setContents(t, null);
1668+
1669+
Clipboard unixclipboard = getToolkit().getSystemSelection();
1670+
if (unixclipboard != null) unixclipboard.setContents(t, null);
16571671
}
16581672
}
16591673

@@ -2210,6 +2224,25 @@ public void mousePressed(MouseEvent evt)
22102224
return;
22112225
}
22122226

2227+
// on Linux, middle button pastes selected text
2228+
if ((evt.getModifiers() & InputEvent.BUTTON2_MASK) != 0) {
2229+
Clipboard unixclipboard = getToolkit().getSystemSelection();
2230+
if (unixclipboard != null) {
2231+
Transferable t = unixclipboard.getContents(null);
2232+
if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
2233+
try {
2234+
String s = (String)t.getTransferData(DataFlavor.stringFlavor);
2235+
s = s.replace('\u00A0', ' ');
2236+
if (editable) setSelectedText(s);
2237+
} catch (Exception e) {
2238+
System.err.println(e);
2239+
e.printStackTrace();
2240+
}
2241+
}
2242+
return;
2243+
}
2244+
}
2245+
22132246
int line = yToLine(evt.getY());
22142247
int offset = xToOffset(line,evt.getX());
22152248
int dot = getLineStartOffset(line) + offset;

app/src/processing/app/tools/DiscourseFormat.java

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ public void lostOwnership(Clipboard clipboard, Transferable contents) {
108108
// i don't care about ownership
109109
}
110110
});
111+
Clipboard unixclipboard = Toolkit.getDefaultToolkit().getSystemSelection();
112+
if (unixclipboard != null) unixclipboard.setContents(formatted, null);
111113

112114
editor.statusNotice("Code formatted for " +
113115
(html ? "HTML" : "the Arduino forum ") +

build/shared/examples/02.Digital/Debounce/Debounce.ino

+20-6
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@
1919
by David A. Mellis
2020
modified 30 Aug 2011
2121
by Limor Fried
22+
modified 28 Dec 2012
23+
by Mike Walters
2224
23-
This example code is in the public domain.
25+
This example code is in the public domain.
2426
2527
http://www.arduino.cc/en/Tutorial/Debounce
2628
*/
2729

2830
// constants won't change. They're used here to
2931
// set pin numbers:
30-
const int buttonPin = 2; // the number of the pushbutton pin
31-
const int ledPin = 13; // the number of the LED pin
32+
const int buttonPin = 2; // the number of the pushbutton pin
33+
const int ledPin = 13; // the number of the LED pin
3234

3335
// Variables will change:
3436
int ledState = HIGH; // the current state of the output pin
@@ -43,6 +45,9 @@ long debounceDelay = 50; // the debounce time; increase if the output flicker
4345
void setup() {
4446
pinMode(buttonPin, INPUT);
4547
pinMode(ledPin, OUTPUT);
48+
49+
// set initial LED state
50+
digitalWrite(ledPin, ledState);
4651
}
4752

4853
void loop() {
@@ -62,11 +67,20 @@ void loop() {
6267
if ((millis() - lastDebounceTime) > debounceDelay) {
6368
// whatever the reading is at, it's been there for longer
6469
// than the debounce delay, so take it as the actual current state:
65-
buttonState = reading;
70+
71+
// if the button state has changed:
72+
if (reading != buttonState) {
73+
buttonState = reading;
74+
75+
// only toggle the LED if the new button state is HIGH
76+
if (buttonState == HIGH) {
77+
ledState = !ledState;
78+
}
79+
}
6680
}
6781

68-
// set the LED using the state of the button:
69-
digitalWrite(ledPin, buttonState);
82+
// set the LED:
83+
digitalWrite(ledPin, ledState);
7084

7185
// save the reading. Next time through the loop,
7286
// it'll be the lastButtonState:

build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
http://www.arduino.cc/en/Tutorial/KeyboardButton
2020
*/
2121

22-
const int buttonPin = 2; // input pin for pushbutton
22+
const int buttonPin = 4; // input pin for pushbutton
2323
int previousButtonState = HIGH; // for checking the state of a pushButton
2424
int counter = 0; // button push counter
2525

build/shared/lib/arduino_icon.ico

359 KB
Binary file not shown.

build/shared/lib/keywords.txt

+2
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ parseInt KEYWORD2
184184
parseFloat KEYWORD2
185185
readBytes KEYWORD2
186186
readBytesUntil KEYWORD2
187+
readString KEYWORD2
188+
readStringUntil KEYWORD2
187189

188190
# USB-related keywords
189191

build/shared/revisions.txt

+11-1
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,32 @@ ARDUINO 1.5 BETA - 2012.10.22
9898
* For more info refer to this press release:
9999
http://arduino.cc/blog/2012/10/22/arduino-1-5-support-for-the-due-and-other-processors-easier-library-installation-simplified-board-menu-etc/
100100

101-
ARDUINO 1.0.5 - 2013.03.29
101+
ARDUINO 1.0.5 - 2013.05.15
102102

103103
[core]
104104

105105
* [avr] malloc bug: backported avr-libc 1.8.0 implementation
106106
* [avr] removed deprecated interrupt handlers causing compiler issues
107107
with newer avr-gcc.
108+
* [avr] added c_str() method to String
109+
* [avr] Stream "_timeout" field and related methods are now protected
108110

109111
[libraries]
110112

111113
* Upgrades to WiFi library
114+
* Fixed a bunch of examples
112115

113116
[firmwares]
114117

115118
* Upgrades to WiFi firmwares
116119

120+
[ide]
121+
122+
* Backport from 1.5: install Library from .zip file or folder
123+
* Added button "Copy error to clipboard" (Paul Stoffregen)
124+
* Updated windows drivers
125+
* Added Windows installer
126+
117127
ARDUINO 1.0.4 - 2013.03.11
118128

119129
[core]
-34 Bytes
Binary file not shown.

build/windows/dist/drivers/arduino.inf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; Copyright 2012 Blacklabel Development, Inc.
22

33
[Strings]
4-
DriverPackageDisplayName="Arduino Boards"
4+
DriverPackageDisplayName="Arduino USB Driver"
55
ManufacturerName="Arduino LLC (www.arduino.cc)"
66
ServiceName="USB RS-232 Emulation Driver"
77
due.bossa.name="Bossa Program Port"
1020 KB
Binary file not shown.
901 KB
Binary file not shown.

hardware/arduino/avr/cores/arduino/Arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void yield(void);
4848
#define EXTERNAL 1
4949
#define INTERNAL 2
5050
#else
51-
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644P__)
51+
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__)
5252
#define INTERNAL1V1 2
5353
#define INTERNAL2V56 3
5454
#else

hardware/arduino/avr/cores/arduino/Stream.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ readBytesBetween( pre_string, terminator, buffer, length)
3737

3838
class Stream : public Print
3939
{
40-
private:
40+
protected:
4141
unsigned long _timeout; // number of milliseconds to wait for the next char before aborting timed read
4242
unsigned long _startMillis; // used for timeout measurement
4343
int timedRead(); // private method to read stream with timeout

hardware/arduino/avr/cores/arduino/WString.h

+1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class String
147147
void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const;
148148
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
149149
{getBytes((unsigned char *)buf, bufsize, index);}
150+
const char * c_str() const { return buffer; }
150151

151152
// search
152153
int indexOf( char ch ) const;

hardware/arduino/avr/cores/arduino/wiring_analog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int analogRead(uint8_t pin)
4545
if (pin >= 54) pin -= 54; // allow for channel or pin numbers
4646
#elif defined(__AVR_ATmega32U4__)
4747
if (pin >= 18) pin -= 18; // allow for channel or pin numbers
48-
#elif defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644P__)
48+
#elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__)
4949
if (pin >= 24) pin -= 24; // allow for channel or pin numbers
5050
#elif defined(analogPinToChannel) && (defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__))
5151
pin = analogPinToChannel(pin);

hardware/arduino/avr/cores/arduino/wiring_private.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extern "C"{
5454

5555
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
5656
#define EXTERNAL_NUM_INTERRUPTS 8
57-
#elif defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644P__)
57+
#elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__)
5858
#define EXTERNAL_NUM_INTERRUPTS 3
5959
#elif defined(__AVR_ATmega32U4__)
6060
#define EXTERNAL_NUM_INTERRUPTS 4

0 commit comments

Comments
 (0)