1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-30 11:24:12 +01:00
Commit Graph

3918 Commits

Author SHA1 Message Date
Kristian Lauszus
7fcc8ab08a Enable user to change the I2C clock frequency by calling setClock in the Wire library 2014-03-06 17:23:49 +01:00
Cristian Maglie
16915f12a3 Merge pull request #1899 from arduino/arduino_debug_master_backport
Windows: arduino_debug.exe
2014-03-04 14:17:33 +01:00
Federico Fissore
5a60f6b008 Windows: launch4j gets downloaded at build time 2014-03-04 13:13:48 +01:00
Cristian Maglie
4c8199e412 Merge pull request #1773 from oni303/minus_support
added support for '-' in filenames
2014-03-04 10:55:00 +01:00
Enrico Gueli
8642df71e6 Esplora: added reading form Tinkerkit inputs 2014-03-03 19:57:02 +01:00
Georg von Zengen
efedfa7049 cut the filename at the last '.' not at the first in tab-names of the editor 2014-02-27 14:30:19 +01:00
Cristian Maglie
d2ef583c2c Merge pull request #1902 from arduino/ide-1.5.x-hidden-files-removed
Removed useless hidden files
2014-02-27 14:24:33 +01:00
Federico Fissore
f3ca136cd9 Removed useless hidden files
Updated .gitignore
Closes #996
2014-02-27 14:21:48 +01:00
Georg von Zengen
3be6eb84b9 added support for '-' and '.' but both not as the first as first character 2014-02-27 14:14:36 +01:00
Cristian Maglie
c84e9ed21a Merge branch 'master' into ide-1.5.x 2014-02-27 13:32:35 +01:00
Federico Fissore
994f0d7bfd Windows: arduino_debug.exe. Backport of ad2ff737bb 2014-02-27 13:24:49 +01:00
Cristian Maglie
2380a8f3d7 Added copyright license for WiFi shield library
See #1117
2014-02-27 12:46:05 +01:00
Cristian Maglie
34009f075d Merge pull request #1886 from arduino/ide-1.5.6-r2
Fixes for 1.5.6-r2 release
2014-02-21 18:02:03 +01:00
Federico Fissore
f3619c3123 Closes #277. Cores files intentionally left out of the commit as they require a different approach and have a different history 2014-02-21 16:21:32 +01:00
Federico Fissore
79eb32f816 Fixed NPE when RXCHAR event with no bytes. Closes #1885 2014-02-21 11:14:30 +01:00
Cristian Maglie
c39a6a26da Update revision log 2014-02-20 14:52:01 +01:00
Cristian Maglie
f91670e0d0 Fixed JSSC upload problem with Arduino Due on MacOSX
JSSC, on unix based systems like linux and MacOSX, when listing serial ports
tries to open each port to ensure its existence. While this check works well for
linux ports /dev/ttyS0..31, it leads to unexpected behaviuors on MacOSX in
particular with USB-CDC virtual serial ports.
This patch disable the check and keep it enabled only for linux ttySxx ports.

This adds also tty.* and cu.* to the list of available serial ports on MacOSX.
2014-02-20 14:48:28 +01:00
Federico Fissore
a3632d53a2 Windows: launch4j gets downloaded at build time 2014-02-20 12:42:05 +01:00
Cristian Maglie
36b4248653 Fixed jar inclusion in launch4j config files 2014-02-20 11:12:42 +01:00
Federico Fissore
ad2ff737bb Windows: arduino_debug.exe: no splash screen, outputs messages to stdout 2014-02-20 11:06:30 +01:00
Cristian Maglie
781271e8a5 Robot_Control fixes. See #1709 #1599. 2014-02-19 18:44:01 +01:00
Cristian Maglie
2659b47587 Update revision log. Upped version to 1.5.6 2014-02-19 18:14:31 +01:00
Matthijs Kooijman
5c6ee6127c Remove const specifier from channelToTC array in analogWrite on SAM
Members of this array are later passed to functions that accept
non-const pointers. These functions probably don't modify their
arguments, so a better solution would be to update those functions to
accept const pointers. However, they look like third-party code, so that
would require changing the code again on every update. Removing const
here fixes at least the compiler warning for now.

This helps towards #1792.
2014-02-19 16:09:31 +01:00
Matthijs Kooijman
4b3db72a46 Fix two signedness warnings
This helps towards #1792
2014-02-19 16:09:30 +01:00
Matthijs Kooijman
1c6a57e15d Include stdio.h in dtostrf.c
This makes the declaration of sprintf available, so the function is not
implicitely declared, which triggers two compiler warnings.

This helps towards #1792
2014-02-19 16:09:30 +01:00
Matthijs Kooijman
8e35973ff9 Remove check that is always false
len is an unsigned variable, so it will never be less than 0.

This helps towards #1792.
2014-02-19 16:09:30 +01:00
Matthijs Kooijman
b196a4a9c5 Suppress "unused parameter" warnings
A bunch of functions have parameters they do not use, but which cannot
be removed for API compatibility.

In syscalls_sam3.c, there are a lot of these, so this adds an "UNUSED"
macro which adds the "unused" variable attribute if supported (GCC
specific), or is just a noop on other compilers.

In CDC.cpp, there's only three of these variables, so this commit just
forces a dummy evaluation of them to suppress the warnings.

This helps towards #1792.
2014-02-19 16:09:30 +01:00
Matthijs Kooijman
4cf21dcdd1 Don't store peeked characters in a char variable
peekNextDigit() returns an int, so it can return -1 in addition to all
256 possible bytes. By putting the result in a signe char, all bytes
over 128 will be interpreted as "no bytes available". Furthermore, it
seems that on SAM "char" is unsigned by default, causing the
"if (c < 0)" line a bit further down to always be false.

Using an int is more appropriate.

A different fix for this issue was suggested in #1399. This fix helps
towards #1728.
2014-02-19 16:09:30 +01:00
JC Wren
12b706551d SD.c: Fix error in comment for remove()
Comment was duplicated from mkdir() and not updated.
2014-02-19 16:09:30 +01:00
J.C. Wren
a991f26b8d Sd2Card.cpp: fix compiler warning
All the while() loops that check for the SPI transfer to be complete have the
semi-colon immediately after the closing parenthesis.  This both causes a
compiler warning of "warning: suggest a space before ';' or explicit braces
around empty body in 'while' statement", and is considered a less-than-ideal
programming practice.  This patch breaks the semi-colon on to the next line,
both eliminating the compiler error and making the code more readable.

In all probability the test should be moved into a macro or a inlineable
sub-routine.
2014-02-19 16:09:30 +01:00
Matthijs Kooijman
ece02e93bd Instead of #defining true and false, include stdbool.h
In C++, true and false are language keywords, so there is no need to
define them as macros. Including stdbool.h in C++ effectively changes
nothing. In C, true, false and also the bool type are not available, but
including stdbool.h will make them available.

Using stdbool.h means that we get true, false and the bool type in
whatever way the compiler thinks is best, which seems like a good idea
to me.

This also fixes the following compiler warnings if a .c file includes
both stdbool.h and Arduino.h:

	warning: "true" redefined [enabled by default]
	 #define true 0x1

	warning: "false" redefined [enabled by default]
	#define false 0x0

This fixes #1570 and helps toward fixing #1728.

This only changed the AVR core, the SAM core already doesn't define true
and false (but doesn't include stdbool.h either).
2014-02-19 16:09:29 +01:00
Matthijs Kooijman
3035239a4e Use a union in IPAddress for uint8_t[] <-> uint32_t conversion
Previously, pointer casting was used, but this resulted in strict-aliasing warnings:

IPAddress.h: In member function ‘IPAddress::operator uint32_t() const’:
IPAddress.h:46:61: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     operator uint32_t() const { return *((uint32_t*)_address); };
                                                             ^
IPAddress.h: In member function ‘bool IPAddress::operator==(const IPAddress&) const’:
IPAddress.h:47:81: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     bool operator==(const IPAddress& addr) const { return (*((uint32_t*)_address)) == (*((uint32_t*)addr._address)); };
                                                                                 ^
IPAddress.h:47:114: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     bool operator==(const IPAddress& addr) const { return (*((uint32_t*)_address)) == (*((uint32_t*)addr._address)); };

Converting between unrelated types like this is commonly done using a union,
which do not break the strict-aliasing rules. Using that union, inside
IPAddress there is now an attribute _address.bytes for the raw byte
arra, or _address.dword for the uint32_t version.

Since we now have easy access to the uint32_t version, this also removes
two memcpy invocations that can just become assignments.

This patch does not change the generated code in any way, the compiler
already optimized away the memcpy calls and the previous casts mean
exactly the same.

This is a different implementation of a part of #1399 and it helps
toward fixing #1728.
2014-02-19 16:09:29 +01:00
Matthijs Kooijman
9dca56dced Don't use IPAddress::_address from EthernetClass
EthernetClass is a friend class of IPAddress, so it is allowed to use
its _address attribute directly. However, it should be using
IPAddress::raw_address() instead, like all the other friend classes do.

This changes allows changing the _address attribute to fix some warnings
next.
2014-02-19 16:09:29 +01:00
Cristian Maglie
50abaaa23f Updated translations 2014-02-19 16:07:20 +01:00
Cristian Maglie
ab362fc726 Merge remote-tracking branch 'arduino/master' into ide-1.5.x 2014-02-19 10:40:44 +01:00
Cristian Maglie
27576919a4 Merge pull request #1879 from h2g2guy/master
Corrected repeated 'less' in checkName's message
2014-02-19 10:37:24 +01:00
h2g2guy
f3944b2df0 Corrected repeated 'less' in checkName's message 2014-02-18 23:32:22 -05:00
Cristian Maglie
c0396530e6 Merge pull request #1870 from matthijskooijman/ide-1.5.x-serial-int
In HardwareSerial::_rx_complete_irq, don't use int for buffer index
2014-02-18 22:43:16 +01:00
Cristian Maglie
9fcf005638 [sam] Removed workaround in banzai() subroutine after 8120558af5
See #1876
2014-02-18 22:32:55 +01:00
Matthijs Kooijman
8120558af5 Fix loops in the SAM banzai() reset function
The code used to say:

  while (EFC0->EEFC_FSR & EEFC_FSR_FRDY == 0);

This triggered a compiler warning, which is why I looked at this line
more closely:

	warning: suggest parentheses around comparison in operand of '&'

As the warning indicates, because the == operator has higher precedence
than the & operator, the compiler is interpreting this line as:

  while (EFC0->EEFC_FSR & (EEFC_FSR_FRDY == 0));

Since EEFC_FSR_FRDY is defined as 1, (EEFC_FSR_FRDY == 0) is always
false (== 0) and this reduces to:

  while (EFC0->EEFC_FSR & 0);

Which reduces to:

  while (0);

So effectively this line is a no-op.

This commit adds parenthesis to restore the intended behaviour.
2014-02-18 22:32:25 +01:00
Cristian Maglie
ce65ecec06 SpacebrewYun library is now vanilla (after 42d19b55c900cc33334d7938c9d7ec8c034e9c6e) 2014-02-18 22:32:24 +01:00
Cristian Maglie
0a126d75bb [sam] itoa() and related function are now available for the sketch 2014-02-18 22:32:24 +01:00
Cristian Maglie
bab0062998 Temboo library is now vanilla 2014-02-18 22:32:24 +01:00
Cristian Maglie
76ded605ff Updated all library.properties to 1.5 rev2 lib format 2014-02-18 22:32:24 +01:00
Matthijs Kooijman
5b83043290 Include stdint.h from IPAddress.h on SAM
This happened for AVR in 34885b01, this commit makes the SAM version
identical again.
2014-02-18 21:10:35 +01:00
Federico Fissore
170b742e4b Merge pull request #1871 from obra/dont-redownload-existing-files
Don't try to fetch astyle/jre on each build.
2014-02-18 19:58:23 +01:00
Jesse Vincent
dfa490f2c3 Be more consistent about not trying to redownload the JRE and astyle every time we build the IDE.
This is particularly nice when working offline
2014-02-18 14:37:05 -03:00
Matthijs Kooijman
39c5b3438a In HardwareSerial::_rx_complete_irq, don't use int for buffer index
This was already fixed for HardwareSerial.cpp in #1863, but there was
one more case hidden in HardwareSerial_private.h.

The index attributes have been uint8_t for a while, so there is no point
in using int for local variables. This should allow the compiler to
generate slightly more efficient code, but (at least on gcc 4.8.2) it
also confuses the register allocator, causing this change to increase
code size by 2 bytes instead due to extra push/pop instructions (but
this will probably change in the future if the compiler improves).
2014-02-18 17:14:42 +01:00
Cristian Maglie
4e334b2e96 Merge branch 'master' into ide-1.5.x
Conflicts:
	app/src/processing/app/Base.java
2014-02-17 14:39:17 +01:00
Cristian Maglie
3a72c02480 Removed unused code, fixed indentation. 2014-02-17 14:19:40 +01:00