fix: DDS couldn't apply
This commit is contained in:
@@ -253,7 +253,7 @@ const waveformSlots = ref<
|
||||
{ name: "正弦波", type: "sine", data: null },
|
||||
{ name: "方波", type: "square", data: null },
|
||||
{ name: "三角波", type: "triangle", data: null },
|
||||
{ name: "", type: "", data: null },
|
||||
{ name: "锯齿波", type: "sawtooth", data: null },
|
||||
]);
|
||||
|
||||
// 绘图相关
|
||||
@@ -408,7 +408,7 @@ async function applyOutputWave() {
|
||||
eqps.boardPort,
|
||||
0,
|
||||
currentWaveformIndex.value,
|
||||
frequency.value * Math.pow(2, 32 - 20),
|
||||
toInteger( frequency.value * Math.pow(2, 32 - 20) / 10 ),
|
||||
);
|
||||
if (!ret) {
|
||||
dialog.error("应用失败");
|
||||
|
||||
@@ -34,6 +34,9 @@ const eqps = useEquipments();
|
||||
const bitstreamFile = ref<File | null>();
|
||||
|
||||
watchEffect(() => {
|
||||
console.log(
|
||||
`board监听改动: ${props.size} ${props.boardAddr}:${props.boardPort}`,
|
||||
);
|
||||
eqps.setAddr(props.boardAddr);
|
||||
eqps.setPort(props.boardPort);
|
||||
});
|
||||
@@ -64,14 +67,12 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<script lang="tsx">
|
||||
const eqps = useEquipments();
|
||||
// 添加一个静态方法来获取默认props
|
||||
export function getDefaultProps(): MotherBoardProps {
|
||||
console.log(`board监听改动: ${eqps.boardAddr}:${eqps.boardPort}`);
|
||||
return {
|
||||
size: 1,
|
||||
boardAddr: eqps.boardAddr,
|
||||
boardPort: eqps.boardPort.toString(),
|
||||
boardAddr: "127.0.0.1",
|
||||
boardPort: "1234",
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user