import { useBackend } from '../backend';
import { Window } from '../layouts';
import { Button, Section, Table, Knob } from '../components';
import { BooleanLike } from 'common/react';
export const GyrotronControl = () => (
);
type Data = {
gyros: { name: string; x; y; z; active: BooleanLike; deployed: BooleanLike; ref: string; fire_delay; strength }[];
};
export const GyrotronControlContent = (props, context) => {
const { act, data } = useBackend(context);
const { gyros } = data;
return (
act('set_tag')} />}>
Name
Position
Status
Fire Delay
Strength
{gyros.map((gyro) => (
{gyro.name}
{gyro.x}, {gyro.y}, {gyro.z}
act('set_rate', {
gyro: gyro.ref,
rate: value,
})
}
/>
act('set_str', {
gyro: gyro.ref,
str: value,
})
}
/>
))}
);
};