Merge pull request #400 from qitechgmbh/342-mode-button-switches-back-and-forth

Fixed Mode button and Regulation button switching back and forth
This commit is contained in:
Robin Krämer authored and GitHub committed 2025-06-26 13:44:55 +02:00
commit d74f3aad96
1 file changed
+9 -3
@@ -229,7 +229,7 @@ export function useMode(
if (modeState?.data) {
state.setReal(modeState.data.mode);
}
}, [modeState]);
}, [modeState?.data.mode]);
return {
mode: state.value,
@@ -331,7 +331,13 @@ export function useMotor(
if (motorRegulationState?.data) {
regulationState.setReal(motorRegulationState.data.uses_rpm);
}
}, [motorRpmState, motorBarState, motorRegulationState]);
}, [
motorRpmState?.data.rpm,
motorRpmState?.data.target_rpm,
motorBarState?.data.bar,
motorBarState?.data.target_bar,
motorRegulationState?.data.uses_rpm,
]);
return {
rpm: rpm,
@@ -352,7 +358,7 @@ export function usePidSettings(
pressurePidSettings: PidSettings | undefined;
setPressurePid: (settings: PidSettings) => void;
} {
const { pressurePidSettings, temperaturePidSettings } = useExtruder2Namespace(
const { pressurePidSettings } = useExtruder2Namespace(
machine_identification_unique,
);