Skip to content

Commit

Permalink
fixed 2d buffer ramp step bug
Browse files Browse the repository at this point in the history
  • Loading branch information
markzakharyan committed Oct 7, 2024
1 parent 021673f commit a26b1de
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions m4/src/Peripherals/God2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,9 @@ class God2D {
// Set slow DAC channels to the current slow step voltages
DACChannel::commsController.beginTransaction();
for (int i = 0; i < numSlowDacChannels; ++i) {
float currentVoltage = previousVoltageSet[i] + voltageStepSize[i];
previousVoltageSet[i] = currentVoltage;
DACController::setVoltageNoTransactionNoLdac(slowDacChannels[i],
currentVoltage);
previousVoltageSet[i]);
previousVoltageSet[i] += voltageStepSize[i];
}
DACController::toggleLdac();
DACChannel::commsController.endTransaction();
Expand Down Expand Up @@ -490,10 +489,9 @@ class God2D {
// Set slow DAC channels to the current slow step voltages
DACChannel::commsController.beginTransaction();
for (int i = 0; i < numSlowDacChannels; ++i) {
float currentVoltage = previousVoltageSet[i] + voltageStepSize[i];
previousVoltageSet[i] = currentVoltage;
DACController::setVoltageNoTransactionNoLdac(slowDacChannels[i],
currentVoltage);
previousVoltageSet[i]);
previousVoltageSet[i] += voltageStepSize[i];
}
DACController::toggleLdac();
DACChannel::commsController.endTransaction();
Expand Down

0 comments on commit a26b1de

Please sign in to comment.