fix: 修复旋转编码器地址与控制问题

This commit is contained in:
SikongJueluo 2025-08-17 17:09:42 +08:00
parent 4a55143b8e
commit cbb83d3dcd
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ namespace Peripherals.RotaryEncoderClient;
class RotaryEncoderCtrlAddr class RotaryEncoderCtrlAddr
{ {
public const UInt32 BASE = 0xB0_00_00_20; public const UInt32 BASE = 0xB0_00_00_30;
public const UInt32 ENABLE = BASE; public const UInt32 ENABLE = BASE;
} }

View File

@ -258,6 +258,8 @@ watchEffect(() => {
watch( watch(
() => rotationStep.value, () => rotationStep.value,
(newStep, oldStep) => { (newStep, oldStep) => {
if (!props.enableDigitalTwin) return;
if (newStep > oldStep) { if (newStep > oldStep) {
rotataryEncoderStore.rotateOnce( rotataryEncoderStore.rotateOnce(
props.encoderNumber, props.encoderNumber,