🎨 Format and simplify controls

This commit is contained in:
Rune Harlyk
2026-01-02 22:35:04 +01:00
committed by nikguin04
parent a6b5b0881a
commit 0ef55bcc7e
25 changed files with 6424 additions and 5981 deletions
@@ -12,16 +12,16 @@
const throttler = new Throttler()
const activateServo = () => {
socket.sendEvent(ServoStateData, ServoStateData.create({active: true}))
socket.sendEvent(ServoStateData, ServoStateData.create({ active: true }))
}
const deactivateServo = () => {
socket.sendEvent(ServoStateData, ServoStateData.create({active: false}))
socket.sendEvent(ServoStateData, ServoStateData.create({ active: false }))
}
const updatePWM = () => {
throttler.throttle(() => {
socket.sendEvent(ServoPWMData, ServoPWMData.create({ servoId: servoId, servoPwm: pwm }))
socket.sendEvent(ServoPWMData, ServoPWMData.create({ servoId: servoId, servoPwm: pwm }))
}, 10)
}