1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-13 10:29:35 +01:00

913 Commits

Author SHA1 Message Date
Cristian Maglie
95ccb804d5 Fixed wrong check for LibraryLocation enum 2020-07-24 12:37:53 +02:00
Cristian Maglie
6983be0bda Updated arduino-cli and java bindings to 0.11.0 2020-07-24 12:37:53 +02:00
Cristian Maglie
52b54b386a Proxy configuration is now properly handled 2020-07-24 12:37:53 +02:00
Cristian Maglie
0a3370ccc6 Added method to extract Proxy URI from configuration 2020-07-24 12:37:53 +02:00
Cristian Maglie
6dd8ec8665 Setting are applied automatically when preferences dialog is closed 2020-07-24 12:37:53 +02:00
Cristian Maglie
7b79ec848e Compiler now read progress through GRPC 2020-07-24 12:37:53 +02:00
Cristian Maglie
b8e8e7842d Updated java bindings 2020-07-24 12:37:53 +02:00
Cristian Maglie
727e3694c4 Slightly simplified loop 2020-07-24 12:37:53 +02:00
Cristian Maglie
b306f84038 Removed testing/debugging leftvoers 2020-07-24 12:37:53 +02:00
Cristian Maglie
8f1f4be95c compile/verify now uses arduino-cli daemon
The build options are now passed through GRPC.
There should be no need to pass library or hardware paths anymore.
By default the daemon compiles and export the hex in the sketch folder
but this is disallowed by the IDE unless the user explicitly run
the "Export .hex" command.

All the business logic to compose board properties and command line
for the build is now embedded in the daemon and has been removed from
the IDE. \o/
2020-07-24 12:37:53 +02:00
Cristian Maglie
8cf4d20493 Updated cli java bindings 2020-07-24 12:37:53 +02:00
Cristian Maglie
a27aad37fd Using GRPC enumerations for LibraryLayout 2020-07-24 12:37:53 +02:00
Martino Facchin
8757f7c6ed INITIAL: integrate compile with arduino-cli 2020-07-24 12:37:53 +02:00
Martino Facchin
a0d73d3bf6 LibManager: avoid throwing an exception to allow correct error handling 2020-07-24 12:37:53 +02:00
Cristian Maglie
108a0c0994 Added missing fields in ContributedLibrary 2020-07-24 12:37:53 +02:00
Cristian Maglie
60dd0945d6 Using enumerations for LibraryLocation 2020-07-24 12:37:53 +02:00
Cristian Maglie
decf40813c Update GRPC/arduino-cli to 0.8.0 2020-07-24 12:37:53 +02:00
Cristian Maglie
b30379dfbc Updated GRPC/arduino-cli to version 0.7.2 2020-07-24 12:37:53 +02:00
Cristian Maglie
2fd0d35a6e Small update to ProgressWrapper 2020-07-24 12:37:53 +02:00
Cristian Maglie
ce05a6831b Removed no more needed UserLibrary constructor/parser 2020-07-24 12:37:53 +02:00
Cristian Maglie
5295e106db Use Library.RealName for installed libraries 2020-07-24 12:37:53 +02:00
Cristian Maglie
bdd621786a Removed no more needed LibraryInstaller (it's now done via GRPC) 2020-07-24 12:37:53 +02:00
Cristian Maglie
401fe65418 Removed, no more needed, LibraryInstaller::updateIndex method 2020-07-24 12:37:53 +02:00
Cristian Maglie
0056cbc545 Removed the now useless UserLibraryFolder 2020-07-24 12:37:53 +02:00
Cristian Maglie
3c46af8d2c Removed the, now useless, library folder handling 2020-07-24 12:37:53 +02:00
Cristian Maglie
56bd779288 Installed libraries are now detected via GPRC calls 2020-07-24 12:37:53 +02:00
Cristian Maglie
7da6bd91aa Using Collection instead of List on some Library types
This helps in transitioning to GRPC on next commits.
2020-07-24 12:37:53 +02:00
Cristian Maglie
e5e1892037 Added GRPC libraryList command 2020-07-24 12:37:53 +02:00
Cristian Maglie
f6ca1f7b16 Library manager through arduino-cli (WIP, part 1)
- library index is now fetched arduino-cli
- ContributedLibraries and derivatives classes have been adapted
  to arduino-cli structure
- install/update/remove are temporary disabled
- library index updated is now done trough arduino-cli
- added progress wrapper

Next steps:

- detect installed libraries using arduino-cli
- implement install/update/remove using arduino-cli
2020-07-24 12:37:53 +02:00
Cristian Maglie
cc26e75e96 GRPC: Added lib index update command with progress wrapper 2020-07-24 12:37:53 +02:00
Cristian Maglie
84b9518776 GRPC: removed limit to max message size 2020-07-24 12:37:53 +02:00
Cristian Maglie
310a5df5e1 Rename ContributeLibrary and ContributeLibraryReleases
the classes have been renamed as:

  ContributedLibrary -> ContributedLibraryRelease
  ContributedLibraryReleases -> ContributedLibrary

The reason is that a ContributedLibrary will have a name and a list of
releases, each one containing the relative metadata. The changes to
reflect that will be made in the next commits.
2020-07-24 12:37:53 +02:00
Cristian Maglie
9500b34719 Added more GRPC commands 2020-07-24 12:37:52 +02:00
Cristian Maglie
a9681bd833 Added arduino-cli daemon startup and some basic control code 2020-07-24 12:37:52 +02:00
Cristian Maglie
6c7c24f25b GRPC binding to arduino-cli (EXPERIMENTAL) 2020-07-24 12:37:52 +02:00
Cristian Maglie
8625b14de3 fixed some trivial warnings 2020-07-24 12:37:52 +02:00
Cristian Maglie
ab9ba6ad4b Use Optional<> for getting selected Board/Platform
Optionals should make explicit the possibility to get empty results from
BaseNoGui.getTargetBoard/Platform methods.
2020-07-24 12:37:52 +02:00
Cristian Maglie
bbb81671d6 Removed TargetBoard parameter from newUploader factory
The parameter is not used.
2020-07-24 12:37:52 +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