1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix formatting in fpga

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2024-03-25 09:36:21 +01:00 committed by pipeacosta
parent 87a1628c4a
commit 98c1f36a02

View file

@ -197,7 +197,7 @@ int FpgaNode::fastWrite(Sample *smps[], unsigned cnt) {
float scaled;
for (unsigned i = 0; i < smp->length; i++) {
if (smp->signals->getByIndex(i)->type == SignalType::FLOAT) {
if (smp->signals->getByIndex(i)->type == SignalType::FLOAT) {
scaled = smp->data[i].f;
if (scaled > 10.) {
scaled = 10.;
@ -205,9 +205,9 @@ int FpgaNode::fastWrite(Sample *smps[], unsigned cnt) {
scaled = -10.;
}
mem[i] = (scaled + 10.) * ((float)0xFFFF / 20.);
} else {
} else {
mem[i] = smp->data[i].i;
}
}
}
dma->writeScatterGatherFast();