mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Don't report memory usage if it's unknown
This commit is contained in:
parent
7c87db3532
commit
c35e57ab4e
@ -1631,14 +1631,16 @@ public class Sketch {
|
||||
System.out.println(I18n
|
||||
.format(_("Binary sketch size: {0} bytes (of a {1} byte maximum) - {2}% used"),
|
||||
textSize, maxTextSize, textSize * 100 / maxTextSize));
|
||||
if(maxDataSize > 0) {
|
||||
System.out.println(I18n
|
||||
.format(_("Memory usage: {0} bytes (of a {1} byte maximum) - {2}% used"),
|
||||
dataSize, maxDataSize, dataSize * 100 / maxDataSize));
|
||||
} else {
|
||||
System.out.println(I18n
|
||||
.format(_("Memory usage: {0} bytes"),
|
||||
dataSize));
|
||||
if(dataSize >= 0) {
|
||||
if(maxDataSize > 0) {
|
||||
System.out.println(I18n
|
||||
.format(_("Memory usage: {0} bytes (of a {1} byte maximum) - {2}% used"),
|
||||
dataSize, maxDataSize, dataSize * 100 / maxDataSize));
|
||||
} else {
|
||||
System.out.println(I18n
|
||||
.format(_("Memory usage: {0} bytes"),
|
||||
dataSize));
|
||||
}
|
||||
}
|
||||
} catch (RunnerException e) {
|
||||
System.err.println(I18n.format(_("Couldn't determine program size: {0}"),
|
||||
|
Loading…
Reference in New Issue
Block a user