mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
horn limits and such
This commit is contained in:
@@ -85,6 +85,7 @@ export function InlineCameraTilt({ keymap }) {
|
||||
const nightVisionAvailable = Boolean(roverId && pipeline?.nightVision);
|
||||
const nightVisionState = pipeline?.nightVisionState;
|
||||
const hornAvailable = Boolean(roverId && pipeline?.horn);
|
||||
const hornCooldownActive = (horn?.cooldownUntil ?? 0) > Date.now();
|
||||
const min = typeof config?.minAngle === 'number' ? config.minAngle : -30;
|
||||
const max = typeof config?.maxAngle === 'number' ? config.maxAngle : 30;
|
||||
const value =
|
||||
@@ -133,7 +134,7 @@ export function InlineCameraTilt({ keymap }) {
|
||||
)}
|
||||
{hornAvailable && (
|
||||
<HornControl
|
||||
disabled={!roverId}
|
||||
disabled={!roverId || hornCooldownActive}
|
||||
onStart={startHorn}
|
||||
onStop={stopHorn}
|
||||
keyLabel={hornLabel}
|
||||
|
||||
Reference in New Issue
Block a user