Waveform generation clock settings #255

This commit is contained in:
Chris Esposito 2023-11-01 13:22:49 +11:00 committed by GitHub
parent 85b99a0567
commit 8aaaac42cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ void genericUsbDriver::sendFunctionGenData(functionGen::ChannelID channelID)
int validClockDivs[7] = {1, 2, 4, 8, 64, 256, 1024};
auto period = [&](int division) -> int
{
return CLOCK_FREQ / (division * channelData.samples.size() * channelData.freq);
return CLOCK_FREQ / (division * channelData.samples.size() * channelData.freq) - 0.5;
};
int* clkSettingIt = std::find_if(std::begin(validClockDivs), std::end(validClockDivs),