Skip to content

Commit

Permalink
Re-add physical flash
Browse files Browse the repository at this point in the history
  • Loading branch information
Pelsin committed Jan 2, 2025
1 parent cad1c24 commit 3a93a48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions www/src/Pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export default function HomePage() {
{t('HomePage:memory-static-allocations-text')}:{' '}
{memoryReport.staticAllocs}
</div>
<div>
{t('HomePage:memory-board-text')}: {memoryReport.physicalFlash}
</div>

<ProgressBar
className="my-1 system-text w-50"
Expand Down
14 changes: 8 additions & 6 deletions www/src/Store/useSystemStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ type State = {
fileName: string;
};
memoryReport: {
totalFlash: number;
usedFlash: number;
percentageFlash: number;
percentageHeap: number;
physicalFlash: number;
staticAllocs: number;
totalFlash: number;
totalHeap: number;
usedFlash: number;
usedHeap: number;
percentageFlash: number;
percentageHeap: number;
};
loading: boolean;
error: boolean;
Expand Down Expand Up @@ -82,10 +83,11 @@ const useSystemStats = create<State & Actions>()((set) => ({
fileName: firmwareVersion.boardConfigFileName,
},
memoryReport: {
totalFlash: toKB(memoryReport.totalFlash),
usedFlash: toKB(memoryReport.usedFlash),
physicalFlash: toKB(memoryReport.physicalFlash),
staticAllocs: toKB(memoryReport.staticAllocs),
totalFlash: toKB(memoryReport.totalFlash),
totalHeap: toKB(memoryReport.totalHeap),
usedFlash: toKB(memoryReport.usedFlash),
usedHeap: toKB(memoryReport.usedHeap),
percentageFlash: percentage(
memoryReport.usedFlash,
Expand Down

0 comments on commit 3a93a48

Please sign in to comment.