mirror of https://github.com/EspoTek/Labrador.git
Waveform generation clock settings #255
This commit is contained in:
parent
85b99a0567
commit
8aaaac42cb
|
@ -216,7 +216,7 @@ void genericUsbDriver::sendFunctionGenData(functionGen::ChannelID channelID)
|
||||||
int validClockDivs[7] = {1, 2, 4, 8, 64, 256, 1024};
|
int validClockDivs[7] = {1, 2, 4, 8, 64, 256, 1024};
|
||||||
auto period = [&](int division) -> int
|
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),
|
int* clkSettingIt = std::find_if(std::begin(validClockDivs), std::end(validClockDivs),
|
||||||
|
|
Loading…
Reference in New Issue