mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fetch hardware status on load, so we have the psram setting
This commit is contained in:
@@ -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()}
|
||||
|
||||
Reference in New Issue
Block a user