diff --git a/src/app/src/features/MachineStatus/MachineStatus.tsx b/src/app/src/features/MachineStatus/MachineStatus.tsx index 0e496aadb..1e662d6e1 100644 --- a/src/app/src/features/MachineStatus/MachineStatus.tsx +++ b/src/app/src/features/MachineStatus/MachineStatus.tsx @@ -47,8 +47,6 @@ interface Message { * @param {Object} actions Actions object given from parent component */ const MachineStatus: React.FC = ({ activeState, alarmCode, isConnected }) => { - console.log(activeState); - const unlock = (): void => { if ( alarmCode === 1 || @@ -113,7 +111,7 @@ const MachineStatus: React.FC = ({ activeState, alarmCode, i }
- { activeState === GRBL_ACTIVE_STATE_ALARM && } + { (activeState === GRBL_ACTIVE_STATE_ALARM || activeState === GRBL_ACTIVE_STATE_HOLD) && }
) diff --git a/src/app/src/features/MachineStatus/UnlockButton.tsx b/src/app/src/features/MachineStatus/UnlockButton.tsx index 52150d4ce..07a04cb2a 100644 --- a/src/app/src/features/MachineStatus/UnlockButton.tsx +++ b/src/app/src/features/MachineStatus/UnlockButton.tsx @@ -24,7 +24,7 @@ import React, { MouseEventHandler } from 'react'; import cx from 'classnames'; -import { GRBL_ACTIVE_STATE_ALARM, GRBL_ACTIVE_STATE_HOLD } from '../../constants'; +import { GRBL_ACTIVE_STATE_ALARM } from '../../constants'; import { GRBL_ACTIVE_STATES_T } from 'definitions/general'; import { ALARM_CODE } from './definitions'; @@ -36,9 +36,7 @@ export interface UnlockProps { const UnlockButton: React.FC = ({ activeState, alarmCode, onClick }) => { const getButtonText = (): string => { - if (activeState === GRBL_ACTIVE_STATE_HOLD) { - return 'Cycle Start'; - } else if (alarmCode === 11) { + if (alarmCode === 11) { return 'Click to Run Homing'; } return 'Click to Unlock Machine'; @@ -49,10 +47,11 @@ const UnlockButton: React.FC = ({ activeState, alarmCode, onClick }