Skip to content

Commit 321a369

Browse files
committed
Correctly print file sizes in file manager
1 parent 8c9a1b0 commit 321a369

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Firmware/RTK_Surveyor/Form.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ static void handleFirmwareFileUpload(AsyncWebServerRequest * request, String fil
380380
void onWsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t *data, size_t len)
381381
{
382382
if (type == WS_EVT_CONNECT) {
383+
log_d("Websocket client connected");
383384
client->text(settingsCSV);
384385
lastCoordinateUpdate = millis();
385386
}
@@ -1268,7 +1269,7 @@ String stringHumanReadableSize(uint64_t bytes)
12681269
else if (strcmp(suffix, "MB") == 0)
12691270
sprintf(readableSize, "%0.1f %s", cardSize, suffix); //Print decimal portion
12701271
else
1271-
sprintf(readableSize, "%lld %s", cardSize, suffix); //Don't print decimal portion
1272+
sprintf(readableSize, "%0.0f %s", cardSize, suffix); //Don't print decimal portion
12721273

12731274
return String(readableSize);
12741275
}

0 commit comments

Comments
 (0)