From fa33d531809ab8d9e0f5ffa9a7e9d27c252f8ca2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 10 Sep 2015 20:41:23 +0300 Subject: [PATCH] Show float RAM values for boards // Issue #286 --- platformio/commands/boards.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio/commands/boards.py b/platformio/commands/boards.py index 0681623a..dcec8f69 100644 --- a/platformio/commands/boards.py +++ b/platformio/commands/boards.py @@ -56,7 +56,10 @@ def cli(query, json_output): # pylint: disable=R0912 if "maximum_ram_size" in data.get("upload", None): ram_size = int(data['upload']['maximum_ram_size']) if ram_size >= 1024: - ram_size = "%dKb" % (ram_size / 1024) + if ram_size % 1024: + ram_size = "%.1fKb" % (ram_size / 1024.0) + else: + ram_size = "%dKb" % (ram_size / 1024) else: ram_size = "%dB" % ram_size