feat: 增加云台数码变焦按钮
This commit is contained in:
@@ -245,12 +245,12 @@
|
||||
|
||||
<body>
|
||||
<div id="connection-status" class="disconnected">未连接</div>
|
||||
|
||||
|
||||
<div class="gimbal-controls">
|
||||
<div class="control-group">
|
||||
<button id="gimbal_center">云台回中</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<label for="gimbal_pip">画中画模式:</label>
|
||||
<select id="gimbal_pip">
|
||||
@@ -260,7 +260,7 @@
|
||||
<option value="3">IR主</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<label for="ir_mode">IR模式:</label>
|
||||
<select id="ir_mode">
|
||||
@@ -276,6 +276,11 @@
|
||||
<option value="9">9</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<button id="gimbal_zoom_in">放大</button>
|
||||
<button id="gimbal_zoom_out">缩小</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
@@ -336,6 +341,8 @@
|
||||
const button_gimbal_center = document.getElementById('gimbal_center');
|
||||
const select_gimbal_pip = document.getElementById('gimbal_pip');
|
||||
const select_ir_mode = document.getElementById('ir_mode');
|
||||
const button_gimbal_zoom_in = document.getElementById('gimbal_zoom_in');
|
||||
const button_gimbal_zoom_out = document.getElementById('gimbal_zoom_out');
|
||||
|
||||
button_gimbal_center.addEventListener('click', function () {
|
||||
socket.emit('gimbal_center');
|
||||
@@ -351,6 +358,14 @@
|
||||
socket.emit('gimbal_ir_mode', selectedValue);
|
||||
})
|
||||
|
||||
button_gimbal_zoom_in.addEventListener('click', function () {
|
||||
socket.emit('gimbal_zoom_in');
|
||||
});
|
||||
|
||||
button_gimbal_zoom_out.addEventListener('click', function () {
|
||||
socket.emit('gimbal_zoom_out');
|
||||
})
|
||||
|
||||
// 获取摇杆元素
|
||||
const joystick = document.querySelector('virtual-joystick');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user