fix: bugs using real hardware

This commit is contained in:
2026-10-04 21:01:09 +02:00
parent e28f61447f
commit e151ab4f26
3 changed files with 30 additions and 20 deletions
+14 -3
View File
@@ -7,14 +7,25 @@ This template should help get you started developing with Tauri, React and Types
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
# TODO
- Move meters polling logic outside dsp state because it causes re-render of everything tied to dsp constantly
- Check render to improve perfoormances
- Check in meter if clip bool is limit instead
- On close disconenct all ds^p
- Q out of range
- Check end to end behavioour
504 27.139876100 192.168.49.83 192.168.49.30 TCP 67 2d 10020001052d31313131100328 31 31 31 56870 → 9761 [PSH, ACK] Seq=545 Ack=2312 Win=65408 Len=13
1158 75.734957800 192.168.49.83 192.168.49.30 TCP 68 2d 10020001062d003131313110032b 00 31 31 50440 → 9761 [PSH, ACK] Seq=82 Ack=106 Win=65430 Len=14
- Roll back on scroll when 2 scroll
- test en dto end connection
Data: 10020001052f 31313131 10032a // lock
Data: 10020001052d 31313131 100328 // unlock fail
Data: 10020100032d 3100 10031f
Data: 10020001062d 0031313131 10032b // unlock success
Data: 10020100032d 0001 10032f
@@ -213,7 +213,7 @@ function CompressorSection({ dsp, set_compressor }: { dsp: DSP; set_compressor:
const steps = 120;
const points: [number, number][] = [];
for (let i = 0; i <= steps; i++) {
const x = -100 + (100 * i) / steps;
const x = -100 + (120 * i) / steps;
points.push([x, compressorOutputDb(x, threshold, ratioNumeric, knee)]);
}
return points;
@@ -227,9 +227,9 @@ function CompressorSection({ dsp, set_compressor }: { dsp: DSP; set_compressor:
<LinearGraph
xMin={-100}
xMax={0}
xMax={20}
yMin={-100}
yMax={0}
yMax={20}
xLabel="in dB"
yLabel="out dB"
formatX={(v) => Math.round(v).toString()}
@@ -240,7 +240,7 @@ function CompressorSection({ dsp, set_compressor }: { dsp: DSP; set_compressor:
ctx.lineWidth = 1;
ctx.setLineDash([4, 4]);
const [ux0, uy0] = toPx(-100, -100);
const [ux1, uy1] = toPx(0, 0);
const [ux1, uy1] = toPx(20, 20);
ctx.beginPath();
ctx.moveTo(ux0, uy0);
ctx.lineTo(ux1, uy1);
@@ -252,7 +252,7 @@ function CompressorSection({ dsp, set_compressor }: { dsp: DSP; set_compressor:
ctx.lineWidth = 1;
ctx.setLineDash([2, 3]);
const [tx0, ty0] = toPx(activeComp.threshold, -100);
const [tx1, ty1] = toPx(activeComp.threshold, 0);
const [tx1, ty1] = toPx(activeComp.threshold, 20);
ctx.beginPath();
ctx.moveTo(tx0, ty0);
ctx.lineTo(tx1, ty1);
@@ -37,10 +37,8 @@ function MiscellaneousPanel({
const [isLinkModalOpen, setIsLinkModalOpen] = useState(false);
const [isCopyModalOpen, setIsCopyModalOpen] = useState(false);
const [inputSource, setInputSourceState] = useState<InputSource>({
type: InputType.Analog,
frequency: DiscreteFrequency.F20,
});
const [liveInputSource, setLiveInputSource] = useState<InputSource | null>(null);
const inputSource = liveInputSource ?? dsp.state.current_config.input_source;
const [password, setPassword] = useState('');
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
@@ -51,18 +49,19 @@ function MiscellaneousPanel({
frequency: type === InputType.SineWave ? inputSource.frequency : DiscreteFrequency.F20,
};
setInputSourceState(nextSource);
await setInputSource(nextSource);
setLiveInputSource(nextSource);
const success = await setInputSource(nextSource);
if (success) setLiveInputSource(null);
};
const handleFrequencyChange = async (frequency: DiscreteFrequency) => {
const nextSource: InputSource = {
...inputSource,
frequency,
};
const nextSource: InputSource = { ...inputSource, frequency };
setInputSourceState(nextSource);
await setInputSource(nextSource);
setLiveInputSource(nextSource);
const success = await setInputSource(nextSource);
if (success) setLiveInputSource(null);
};
const handleFactoryReset = () => {