//	Synapse.cxx

#include "Synapse.h"

void Synapse::Step( const real dt )
{
	if (itsComp->GetV() > Vthresh) {
		// above threshold; reset pulse (if not already pulsing)
		if (Lconc > 0.1) return;
		Lconc = 1.0;
		t = 0;
		return;
	}
	
	// not above threshold... but within pulseTime?
	if (t < pulseTime) {
		// yes, just update the timer
		t += dt;
		return;
	}
	
	// Nope... so make sure we're not pulsing
	if (Lconc > 0.1) Lconc = 0.0;
}