diff --git a/README.md b/README.md index b7e2cd8..d02469a 100644 --- a/README.md +++ b/README.md @@ -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 \ No newline at end of file diff --git a/src/features/dsp408/components/CompressorSection/CompressorSection.tsx b/src/features/dsp408/components/CompressorSection/CompressorSection.tsx index f49c1f8..d274239 100644 --- a/src/features/dsp408/components/CompressorSection/CompressorSection.tsx +++ b/src/features/dsp408/components/CompressorSection/CompressorSection.tsx @@ -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: 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); diff --git a/src/features/dsp408/components/MiscellaneousSection/MiscellaneousSection.tsx b/src/features/dsp408/components/MiscellaneousSection/MiscellaneousSection.tsx index 6d398ef..0480940 100644 --- a/src/features/dsp408/components/MiscellaneousSection/MiscellaneousSection.tsx +++ b/src/features/dsp408/components/MiscellaneousSection/MiscellaneousSection.tsx @@ -37,10 +37,8 @@ function MiscellaneousPanel({ const [isLinkModalOpen, setIsLinkModalOpen] = useState(false); const [isCopyModalOpen, setIsCopyModalOpen] = useState(false); - const [inputSource, setInputSourceState] = useState({ - type: InputType.Analog, - frequency: DiscreteFrequency.F20, - }); + const [liveInputSource, setLiveInputSource] = useState(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 = () => {