Skip to content

Commit

Permalink
Feature: show ESP32 flash memory size in system info
Browse files Browse the repository at this point in the history
  • Loading branch information
schlimmchen committed May 27, 2024
1 parent edf493b commit bdc9c09
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/WebApi_sysstatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void WebApiSysstatusClass::onSystemStatus(AsyncWebServerRequest* request)
root["chiprevision"] = ESP.getChipRevision();
root["chipmodel"] = ESP.getChipModel();
root["chipcores"] = ESP.getChipCores();
root["flashsize"] = ESP.getFlashChipSize();

String reason;
reason = ResetReason::get_reset_reason_verbose(0);
Expand Down
7 changes: 7 additions & 0 deletions webapp/src/components/HardwareInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
<th>{{ $t('hardwareinfo.CpuFrequency') }}</th>
<td>{{ systemStatus.cpufreq }} {{ $t('hardwareinfo.Mhz') }}</td>
</tr>
<tr>
<th>{{ $t('hardwareinfo.FlashSize') }}</th>
<td>
{{ systemStatus.flashsize }} {{ $t('hardwareinfo.Bytes') }}
({{ systemStatus.flashsize / 1024 / 1024 }} {{ $t('hardwareinfo.MegaBytes') }})
</td>
</tr>
</tbody>
</table>
</div>
Expand Down
5 changes: 4 additions & 1 deletion webapp/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@
"ChipRevision": "Chip-Revision",
"ChipCores": "Chip-Kerne",
"CpuFrequency": "CPU-Frequenz",
"Mhz": "MHz"
"Mhz": "MHz",
"FlashSize": "Flash-Speichergröße",
"Bytes": "Bytes",
"MegaBytes": "MB"
},
"memoryinfo": {
"MemoryInformation": "Speicherinformationen",
Expand Down
5 changes: 4 additions & 1 deletion webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@
"ChipRevision": "Chip Revision",
"ChipCores": "Chip Cores",
"CpuFrequency": "CPU Frequency",
"Mhz": "MHz"
"Mhz": "MHz",
"FlashSize": "Flash Memory Size",
"Bytes": "Bytes",
"MegaBytes": "MB"
},
"memoryinfo": {
"MemoryInformation": "Memory Information",
Expand Down
5 changes: 4 additions & 1 deletion webapp/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@
"ChipRevision": "Révision de la puce",
"ChipCores": "Nombre de cœurs",
"CpuFrequency": "Fréquence du CPU",
"Mhz": "MHz"
"Mhz": "MHz",
"FlashSize": "Taille de la mémoire flash",
"Bytes": "octets",
"MegaBytes": "Mo"
},
"memoryinfo": {
"MemoryInformation": "Informations sur la mémoire",
Expand Down
1 change: 1 addition & 0 deletions webapp/src/types/SystemStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface SystemStatus {
chiprevision: number;
chipcores: number;
cpufreq: number;
flashsize: number;
// FirmwareInfo
hostname: string;
sdkversion: string;
Expand Down

0 comments on commit bdc9c09

Please sign in to comment.