cjheath / AD9959

AD9959 4-channel Direct Digital Synthesis Arduino Library
13 stars 11 forks source link

Found misprint in sweepPhase() #10

Closed schtangel closed 1 year ago

schtangel commented 1 year ago

Hi! I found a typo in the code - it should be CFR_Bits::MatchPipeDelay instead of CFR_Bits::MatchPipeDela

  void sweepPhase(ChannelNum chan, uint16_t phase, bool follow = true)          // Target phase (180 degrees)
  {
    setChannels(chan);

    // Set up for phase sweep
    write(
      CFR,
      CFR_Bits::PhaseModulation |
      CFR_Bits::SweepEnable |
      CFR_Bits::DACFullScale |
      CFR_Bits::MatchPipeDela |
      (follow ? 0 : CFR_Bits::SweepNoDwell)
    );
cjheath commented 1 year ago

Thankyou, fixed in https://github.com/cjheath/AD9959/commit/7152ca6812db830743fb8176bfe1893078a5f0af One of the perils of template metaprogramming is that such errors don't get detected unless the template gets expanded.