mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev
This commit is contained in:
@@ -7,9 +7,9 @@ import type { HardwareStatus, LogSettings, SystemStatus } from 'types';
|
||||
|
||||
import { alovaInstance, alovaInstanceGH } from './endpoints';
|
||||
|
||||
// HardwareStatus - also used to ping in Restart monitor for pinging
|
||||
// hardwareStatus - also used to ping in Restart monitor for pinging
|
||||
export const readHardwareStatus = () =>
|
||||
alovaInstance.Get<HardwareStatus>('/rest/HardwareStatus');
|
||||
alovaInstance.Get<HardwareStatus>('/rest/hardwareStatus');
|
||||
|
||||
// SystemStatus
|
||||
export const readSystemStatus = () =>
|
||||
|
||||
@@ -50,6 +50,10 @@ export function boardProfileSelectItems() {
|
||||
}
|
||||
|
||||
const ApplicationSettings: FC = () => {
|
||||
const { data: hardwareData, error } = useRequest(SystemApi.readHardwareStatus, {
|
||||
force: true
|
||||
});
|
||||
|
||||
const {
|
||||
loadData,
|
||||
saveData,
|
||||
@@ -835,7 +839,7 @@ const ApplicationSettings: FC = () => {
|
||||
checked={data.modbus_enabled}
|
||||
onChange={updateFormValue}
|
||||
name="modbus_enabled"
|
||||
disabled={saving}
|
||||
disabled={!hardwareData.psram}
|
||||
/>
|
||||
}
|
||||
label={LL.ENABLE_MODBUS()}
|
||||
|
||||
@@ -21,6 +21,7 @@ export interface HardwareStatus {
|
||||
fs_used: number;
|
||||
fs_free: number;
|
||||
free_mem: number;
|
||||
psram: boolean;
|
||||
psram_size?: number;
|
||||
free_psram?: number;
|
||||
has_loader: boolean;
|
||||
|
||||
Reference in New Issue
Block a user