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

899 Commits

Author SHA1 Message Date
Cristian Maglie
18f55445ab Starting Arduino IDE 1.8.20 2021-12-20 18:36:16 +01:00
Cristian Maglie
c16b9f5f26 Use PreferencesData.getInteger when applicable 2021-12-20 12:55:10 +01:00
Cristian Maglie
66a973af18 Renamed varible (typo) 2021-12-20 12:54:43 +01:00
Cristian Maglie
9f8d19244a Removed log4j
Fix #11727
2021-12-20 12:53:48 +01:00
Cristian Maglie
dfeff7df4c Starting IDE 1.8.19 2021-12-16 09:52:25 +01:00
Cristian Maglie
1005ab11fe Updated log4j to version 2.16.0 2021-12-14 13:59:52 +01:00
Cristian Maglie
e0be6c37aa starting 1.8.18 2021-12-14 13:59:45 +01:00
Cristian Maglie
2bf44d48d0 updated translations 2021-12-14 11:10:18 +01:00
Cristian Maglie
640a956743 Upgrade log4j to 2.15.0 - CVE-2021-44228 2021-12-13 09:48:13 +01:00
Russell Howe
8ae1f94553
Upgrade log4j to 2.15.0 - CVE-2021-44228 2021-12-11 10:32:01 +00:00
Cristian Maglie
21293c33bc Starting Arduino IDE 1.8.17 2021-09-06 13:02:57 +02:00
Antoni Spaanderman
30c49a0278
spelling mistake that made my brain hurt 2021-09-04 15:32:13 +02:00
Cristian Maglie
cea203e0a9 Release 1.8.16 2021-09-03 09:49:28 +02:00
Cristian Maglie
4ffeb6c7de Updated translations 2021-09-01 17:50:38 +02:00
Cristian Maglie
17f5719caf Gracefully handle malformed additional board manager urls 2021-05-27 09:30:17 +02:00
Cristian Maglie
1ed8776eb3 Starting Arduino IDE 1.8.15 2021-05-12 15:20:13 +02:00
Cristian Maglie
9279f61554 Updated translations 2021-05-11 15:20:23 +02:00
Cristian Maglie
bf2f90dfff Added deprecated field in index parsing 2021-05-10 09:38:31 +02:00
Cristian Maglie
b68d4b64e6 Fixed some trivial warnings 2021-05-10 09:38:31 +02:00
Cristian Maglie
c82005c2c0 Do not delete unused 3rd party index files 2021-05-06 10:27:27 +02:00
Cristian Maglie
ba7140e3b0 Updated all translations 2021-04-08 15:16:58 +02:00
Cristian Maglie
f4f98cf25e Fixed wrong translation 2021-04-08 15:16:27 +02:00
Cristian Maglie
e915f4d356 Downloaded new translations from transifex 2021-04-08 13:55:17 +02:00
per1234
03f5f8adc4 Update links to troubleshooting guides in error messages
When the compiled size of a sketch exceeds the available flash or RAM on the board, the error message includes a link to
a troubleshooting guide:

Sketch uses 16110 bytes (112%) of program storage space. Maximum is 14336 bytes.
Global variables use 685 bytes (66%) of dynamic memory, leaving 339 bytes for local variables. Maximum is 1024 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.

When an upload fails, the error message includes a link to a troubleshooting guide:

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
http://www.arduino.cc/en/Guide/Troubleshooting was recently replaced with the Arduino Help Center. Even though that URL
redirects to the Help Center, it only goes to the home page, leaving the user to hunt for the relevant article.

A better user experience is provided by linking directly to the relevant content in the Help Center.
2021-04-08 13:51:42 +02:00
Cristian Maglie
ea84e7383a Starting Arduino IDE 1.8.14 2020-06-24 12:48:12 +02:00
Cristian Maglie
43da7400e4 Fixed invalid http accept header
This patch overrides the default JDK accept header that happens to be
invalid, as per RFC 7231.

Real issue: https://bugs.openjdk.java.net/browse/JDK-8163921

Fix https://github.com/arduino/Arduino/issues/10264
2020-06-15 18:14:07 +02:00
Cristian Maglie
5693423bfe Updated translations 2020-06-15 17:29:51 +02:00
Martino Facchin
bd0e74345a Update jmdns to 3.5.5 2020-06-03 10:21:06 +02:00
Ricardo JL Rufino
b914070c90 Avoid usueless double calls to rescanLibraries()
Previously rescanLibraries() was automatically called internally in
setLibrariesFolder(). This lead to double calls to rescanLibraries()
when setLibrariesFolder() was used in combination with an explicit
call to rescanLibraries().

This commit adds a new method setLibrariesFoldersAndRescan(..) and
removes the internal call to rescanLibraries() from setLibrariesFolder().

The existing setLibrariesFolder()+rescanLibraries() combos have been
replaced with setLibrariesFoldersAndRescan().

Fix #10228
2020-05-25 17:09:20 +02:00
Matthijs Kooijman
149aa529e7 PreferencesData: Recreate PreferencesMap in init
Normally, init is only called once during startup, so this does not add
anything. However, when running the testsuite, PreferencesData could be
initialized multiple times in a single test run. To prevent preferences
from a previous test from interfering with subsequent tests, always
start with a clean slate when calling init.
2020-05-11 17:13:17 +02:00
Martino Facchin
156d5d8956 Update arduino-core/src/processing/app/debug/LegacyTargetPlatform.java
Co-Authored-By: Matthijs Kooijman <matthijs@stdin.nl>
2020-04-27 17:04:49 +02:00
Martino Facchin
8c91692845 Boards Menu: add hint if core lives in sketchbook 2020-04-27 17:04:49 +02:00
Richard Körber
ca20093472 Remove Java version evaluation
According to JEP223, Java versions do not include trailing zero
elements. This means that e.g. Java 14.0.0 reports its version just as
"14". The changed code part expected at least three characters, so it
failed to start on such "zero-zero" Java releases. The evaluated java
version was not used anywhere, so the code block was removed.
2020-04-21 11:43:09 +02:00
Cristian Maglie
931c2b7f21 Do not translate labels of boards submenus
Otherwise it may happen some weird sorting when untraslated and
translated labels are sorted together:

    Arduino megaAVR Boards
    Arduino nRF52 Board
    ESP32 Arduino
    ESP8266 Modules
    Schede Arduino AVR   <-- the localized string falls to the bottom

Also there is no way for 3rd party boards developers to actually provide
a translation, so let's just remove them.
2020-03-25 15:26:53 +01:00
Matthijs Kooijman
a1d6da9dfe Prevent bytes from lingering in the serial buffer
This fixes a problem with the Serial UTF-8 decoder. This decoding moves
data from char[] buf, into a ByteBuffer inFromSerial, then decodes them
into a CharBuffer outToMessage and converts to a char[] to pass on.

When the buf read contained just over a full buffer worth of bytes and
contained some multi-byte characters, a situation could arise where two
decodes were needed to fill up outToMessage, leaving some data in
inFromSerial. If in this case no data would be left in buf, decoding
would stop until more data came in from serial.

This commit fixes this problem by:
 - Changing the outer loop to continue running when buf is empty, but
   inFromSerial is not.
 - Changing the inner loop to run at least once (so it runs when buf is
   empty, but inFromSerial is no).
 - Breaking out of the outer loop when no characters were produced (this
   handles the case where only an incomplete UTF-8 character remains in
   inFromSerial, which would otherwise prevent the loop from
   terminating.
 - Removes a `if (outToMessage.hasRemaining()` check that is now
   necessarily true if the break was not done.

This fixes #9808.
2020-03-24 15:24:50 +01:00
Matthijs Kooijman
d244a45c4a Use Math.min instead of ternary if in Serial data copy
This makes the code slightly more compact and easier to read.
2020-03-24 15:24:50 +01:00
Cristian Maglie
d6667dd4ca Added unit testing for UTF8 decoder in Serial 2020-03-24 15:24:50 +01:00
Cristian Maglie
bc54dd8ef5 SerialDiscovery: reorder a bit the discovery phases to make it clearer 2020-03-23 18:37:59 +01:00
Cristian Maglie
8208376507 SerialDiscovery: refactor search loop 2020-03-23 18:37:59 +01:00
Martino Facchin
d154120f0e Fix bogus port disconnection during serial event
Fixes https://github.com/arduino/Arduino/issues/9785 and probably many others

This commit strongly simplyfies the serial list code

Pluggable discovery introduced a bug since BoardPort.toString() started reporting only the name of the port, not the complete name_vid_pid needed to match liblistserial output.
Adding .toCompleteString() almost solves the bogus disconnection part alone, but resolveDeviceByVendorIdProductId() uses "0x" prefixes VID/PID, breaking it again.

In addition, all the logic used to match a board with its bootloader (to obtain a serial number on 32u4 boards) has been completely removed since it is currently useless (and unused).
2020-03-23 17:37:01 +01:00
Cristian Maglie
fcb53ba6e1 Fixed user/pass preferences save for "manual" proxy settings.
There was an error in the following constants:

  PREF_PROXY_AUTO_USERNAME = "proxy.manual.username"
  PREF_PROXY_AUTO_PASSWORD = "proxy.manual.password"

they should be set to "auto" and not "manual":

  PREF_PROXY_AUTO_USERNAME = "proxy.auto.username"
  PREF_PROXY_AUTO_PASSWORD = "proxy.auto.password"

Changing the constants to the correct value now will fix the problem for
future installations of the IDE but will produce an annoying side-effect
for users upgrading from previous version of the IDE: they will lose
their saved user and pass (because it was saved as "proxy.manual.*")
and the IDE will suddenly stop working without any clear reason.

To avoid this I've left the value to "proxy.manual.*" and removed
the distinction from AUTO and MANUAL, so now we have only:

  PREF_PROXY_USERNAME = "proxy.manual.username"
  PREF_PROXY_PASSWORD = "proxy.manual.password"

The corresponding textbox in the preference dialog will be filled based on
the PROXY_TYPE selection.
2020-03-06 18:55:50 +01:00
Thomas L. Kjeldsen
b40f54af06 Declare fields at the top of the class
Improve Codacy PR quality requirements:
Fields should be declared at the top of the class, before any method
declarations, constructors, initializers or inner classes.
2020-02-19 15:13:47 +01:00
Thomas L. Kjeldsen
488388050e Remove "MrBean" dependency
Sacrifice abstract classes and interfaces to reduce the amount of magic
performed by MrBean.

Refs https://github.com/HuayraLinux/pkg-arduino/issues/4
2020-02-19 15:13:47 +01:00
Cristian Maglie
15133a0720 Starting Arduino IDE 1.8.13 2020-02-14 15:29:26 +01:00
per1234
33ff49566c Start Arduino IDE 1.8.12 2020-02-07 23:16:20 +01:00
Cristian Maglie
b59c91ebe2 Fixed failures in download tests 2020-02-06 16:04:39 +01:00
Matthijs Kooijman
3d4b026b50 Preserve "fatal" in compiler errors
When transforming compiler errors (to make filenames more friendly), it
would match "fatal error" or "error" but then always reconstruct as
"error", modifying the compiler error in a way that is not intended.

This commit fixes that, as well as the previous hardcoding of the
"error: " prefix when rebuilding the error message, by capturing this
entire prefix and simply reproducing it in the resulting error message.
2020-01-29 19:38:03 +01:00
Matthijs Kooijman
e387c23b60 Slightly simplify error message rebuilding
This removes some duplicate code for with and without column number by
building the column number string separately first.
2020-01-29 19:04:43 +01:00
Matthijs Kooijman
8e9f7a630a Fix exception on compiler errors with column numbers
Error messages are detected and parsed using a regex. Part of this regex
matches the optional column number.

The code that handled this assumed that a missing column would result in
less elements in the matches array, but a regex always results in one
element per set of parenthesis in the regex, which will be null if no
capture was made for that element.

In practice, this meant that if no column was present in the error
message, a NullPointerException would be raised. Furthermore, gcc 9
seems to have started outputting omitting column numbers (instead of
printing 0) for some errors (such as unterminated #ifdef), which exposed
this problem.

This commit fixes this by simply using the fixed match numbers to take
apart the regex match, and by checking for a null column number (all
other captures are non-optional, so no need to check there).
2020-01-29 19:04:43 +01:00
Cristian Maglie
113c56d657 Even stricter sanity checks 2020-01-21 14:39:02 +01:00