triangle waveform signal generator bugfix