Skip to content

Commit

Permalink
Merge branch 'tk/hbridge' of https://github.com/tknopp/RedPitayaDAQSe…
Browse files Browse the repository at this point in the history
…rver into tk/hbridge
  • Loading branch information
tknopp committed Dec 9, 2024
2 parents 5b56591 + 3f89cc1 commit 2a8da4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/rp-daq-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,11 +784,11 @@ int setPDMAllValuesVolt(float voltage, int channel) {

int getSamplesPerStep() {
int32_t value = *((int32_t *)(cfg + 4));
return value*2/getDecimation();
return value/getDecimation();
}

int setSamplesPerStep(int samples) {
*((int32_t *)(cfg + 4)) = samples/2*getDecimation();
*((int32_t *)(cfg + 4)) = samples*getDecimation();
return 0;
}

Expand Down

0 comments on commit 2a8da4a

Please sign in to comment.