mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Don't report memory usage if it's unknown
This commit is contained in:
@ -1631,6 +1631,7 @@ public class Sketch {
|
|||||||
System.out.println(I18n
|
System.out.println(I18n
|
||||||
.format(_("Binary sketch size: {0} bytes (of a {1} byte maximum) - {2}% used"),
|
.format(_("Binary sketch size: {0} bytes (of a {1} byte maximum) - {2}% used"),
|
||||||
textSize, maxTextSize, textSize * 100 / maxTextSize));
|
textSize, maxTextSize, textSize * 100 / maxTextSize));
|
||||||
|
if(dataSize >= 0) {
|
||||||
if(maxDataSize > 0) {
|
if(maxDataSize > 0) {
|
||||||
System.out.println(I18n
|
System.out.println(I18n
|
||||||
.format(_("Memory usage: {0} bytes (of a {1} byte maximum) - {2}% used"),
|
.format(_("Memory usage: {0} bytes (of a {1} byte maximum) - {2}% used"),
|
||||||
@ -1640,6 +1641,7 @@ public class Sketch {
|
|||||||
.format(_("Memory usage: {0} bytes"),
|
.format(_("Memory usage: {0} bytes"),
|
||||||
dataSize));
|
dataSize));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (RunnerException e) {
|
} catch (RunnerException e) {
|
||||||
System.err.println(I18n.format(_("Couldn't determine program size: {0}"),
|
System.err.println(I18n.format(_("Couldn't determine program size: {0}"),
|
||||||
e.getMessage()));
|
e.getMessage()));
|
||||||
|
Reference in New Issue
Block a user