Simulator
{#if !running && !loading} {/if} {#if running} {/if} {#if fsReady} {#if fsHasContent} {/if} {/if}

{status}

{#snippet switchCtrl(sw: SwitchDef, index: number)}
{sw.name}
handleSwitchTrackClick(index, sw, e)} onkeydown={(e) => handleSwitchKey(index, sw, e)}> {#if sw.type === '3POS'}
{:else}
{/if}
{/snippet} {#snippet lcdScreen()}
{#key canvasKey} {/key}
{/snippet} {#snippet leftGimbalBlock()}
{#if (currentRadio?.trims?.length ?? 0) >= 4}
T3
{/if}
Left Stick
handleGimbalDown('left', e)} ontouchstart={(e) => handleGimbalTouchStart('left', e)} role="slider" aria-label="Left gimbal" tabindex="0" aria-valuemin={-1024} aria-valuemax={1024} aria-valuenow={analogValues[getStickIndices().lh] ?? 0} >
{#if (currentRadio?.trims?.length ?? 0) >= 4}
T4
{/if}
{/snippet} {#snippet rightGimbalBlock()}
Right Stick
handleGimbalDown('right', e)} ontouchstart={(e) => handleGimbalTouchStart('right', e)} role="slider" aria-label="Right gimbal" tabindex="0" aria-valuemin={-1024} aria-valuemax={1024} aria-valuenow={analogValues[getStickIndices().rv] ?? 0} >
{#if (currentRadio?.trims?.length ?? 0) >= 2}
T1
{/if}
{#if (currentRadio?.trims?.length ?? 0) >= 2}
T2
{/if}
{/snippet} {#snippet flexCtrl(input: InputDef, index: number)} {#if input.default === 'MULTIPOS'}
{input.label}
{#each [0, 1, 2, 3, 4, 5] as pos} {/each}
 
{:else} {@render potCtrl(input, index)} {/if} {/snippet} {#snippet potsRow()} {#if getPotsAndMultipos().length > 0}
{#if getCustomSwitches().length > 0} {#each getLeftPotsAndMultipos() as { input, index }} {@render flexCtrl(input, index)} {/each} {#each getCustomSwitches() as { sw, index: swIdx }, csIdx}
{sw.name}
{/each} {#each getRightPotsAndMultipos() as { input, index }} {@render flexCtrl(input, index)} {/each} {:else} {#each getPotsAndMultipos() as { input, index }} {@render flexCtrl(input, index)} {/each} {/if}
{/if} {/snippet} {#snippet customSwitchesRow()} {#if getCustomSwitches().length > 0}
{#each getCustomSwitches() as { sw, index }, csIdx}
{sw.name}
{/each}
{/if} {/snippet} {#snippet potCtrl(input: InputDef, index: number)}
{input.label} handlePotChange(index, e)} class="pot-knob" /> {analogValues[index]}
{/snippet} {#snippet keyRow()} {#if currentRadio?.keys?.length}
{#each getLeftKeys() as keyDef} {/each} {#each getRightKeys() as keyDef} {/each}
{/if} {/snippet} {#snippet extraTrims()} {#if (currentRadio?.trims?.length ?? 0) > 4}
{#each (currentRadio?.trims ?? []).slice(4) as trim, i}
{trim.name}
{/each}
{/if} {/snippet}
{#if isPortrait && currentRadio}
{#each getLeftSwitches() as { sw, index }} {@render switchCtrl(sw, index)} {/each}
{#if getLeftPotsAndMultipos().length > 0}
{#each getLeftPotsAndMultipos() as { input, index }} {@render flexCtrl(input, index)} {/each}
{/if} {#if getSliders().length > 0}
{#each getSliders().slice(0, 1) as { input, index }}
{input.label} handlePotChange(index, e)} orient="vertical" class="vertical-slider" />
{/each}
{/if} {@render leftGimbalBlock()}
{@render lcdScreen()} {@render keyRow()}
{#each getRightSwitches() as { sw, index }} {@render switchCtrl(sw, index)} {/each}
{#if getRightPotsAndMultipos().length > 0}
{#each getRightPotsAndMultipos() as { input, index }} {@render flexCtrl(input, index)} {/each}
{/if} {#if getSliders().length > 1}
{#each getSliders().slice(1, 2) as { input, index }}
{input.label} handlePotChange(index, e)} orient="vertical" class="vertical-slider" />
{/each}
{/if} {@render rightGimbalBlock()}
{#if getPotsAndMultipos().length === 0} {@render customSwitchesRow()} {/if} {@render extraTrims()} {:else}
{#if currentRadio?.keys?.length}
{#each getLeftKeys() as keyDef} {/each}
{/if} {@render lcdScreen()} {#if currentRadio?.keys?.length}
{#each getRightKeys() as keyDef} {/each}
{/if}
{#if currentRadio} {@render potsRow()} {#if getPotsAndMultipos().length === 0} {@render customSwitchesRow()} {/if}
{#each getLeftSwitches() as { sw, index }} {@render switchCtrl(sw, index)} {/each}
{#if getSliders().length > 0}
{#each getSliders().slice(0, 1) as { input, index }}
{input.label} handlePotChange(index, e)} orient="vertical" class="vertical-slider" />
{/each}
{/if} {@render leftGimbalBlock()} {@render rightGimbalBlock()} {#if getSliders().length > 1}
{#each getSliders().slice(1, 2) as { input, index }}
{input.label} handlePotChange(index, e)} orient="vertical" class="vertical-slider" />
{/each}
{/if}
{#each getRightSwitches() as { sw, index }} {@render switchCtrl(sw, index)} {/each}
{@render extraTrims()} {/if} {/if}
Trace output{#if running}{fps} fps{/if}
{traceLog}