Example #1
0
void freq_main(void) 
{
	cli();
    counter_init();
	gate_init();
	stop();
	reset();
	ff_clr();
	key_init();
	
	setup_timers();

	setup_interrupts();
	adc_init();
	sti();

	/*clear counter*/
	TCNT2= 0;
	TCNT0= 0;
	TCNT1= 0xFF00;
	T0_ovc = T1_ovc =0;
	start();
	//fast clear screen...
	post_display(filter());//really result
	
	while(1) {

		key_process();	

		keep_live();
		
		mode = read_adc_mode();
	
		update_lcd_status();
	
	    if(is_stop()&&soft_stop){
		  	calc_freq();
			post_display(filter());//really result
				c_live() ; //mark succeufull ..
			if(loop>=(ST)){  //never clear
				reset();
			
			}
			loop=0;
		
		    start();
		}
  	}



}
static void display_func ( void )
{
	pre_display ();

		if ( dvel ) draw_velocity ();
		else		draw_density ();

	post_display ();
}
Example #3
0
static void display_func(void) {
    pre_display();

    draw_forces();
    draw_constraints();
    draw_particles();

    post_display();
}
Example #4
0
static void display_func ( void )
{
	pre_display ();

		if ( dvel == 1 ) draw_velocity ();
		else if (dvel == 0)		draw_density ();
    else if (dvel == 2) {
      draw_density ();
      draw_velocity ();
    }

	post_display ();
}
///////////////////////////////////////////////////////////////////////////////
/// FFD routines for GLUT display callback routines
///
///\param para Pointer to FFD parameters
///\param var Pointer to all variables
///
///\return No return needed
///////////////////////////////////////////////////////////////////////////////
void ffd_display_func(PARA_DATA *para, REAL **var) {
  int k = (int) para->geom->kmax/2;
  pre_2d_display(para);

  switch(para->outp->screen) {
    case 1:
      draw_xy_velocity(para, var, k); break;
    case 2:
      draw_xy_density(para, var, k); break;
    case 3: 
      draw_xy_temperature(para, var, k); break;
    default: 
      break;
  }

  post_display();
} // End of ffd_display_func()
Example #6
0
static void display_func(void) {
    pre_display();

    if (dvel) draw_velocity();
    else draw_density();

    if (dpar) {
	    draw_forces();
	    draw_constraints();
	    draw_particles();
    }

    for(int i = 0; i < bodies.size(); i++){
        bodies[i]->draw();
    }

    post_display();
}
Example #7
0
static void display_func ( void )
{
	pre_display ();



		if ( dvel )
    {
      draw_pressure();
      draw_velocity ();
    }
		else
    {
      draw_density ();
    }

	post_display ();
}
static void display_func ( void )
{	
	fps_time += timer.GetElapsedTime();
    rot_time += timer.GetElapsedTime();
	timer.Reset();
	frames++;

	if(fps_time >= 10.0 && rate)
	{
		cout<<"Framerate:"<<(frames/fps_time)<<endl;
		frames = 0;
		fps_time = 0;
	}
	pre_display ();

		if      ( dvel==0 ) draw_velocity ();
		else if	( dvel==1 )	draw_density ();
        else if ( dvel==2 ) draw_points ();
        else if ( dvel==3 ) draw_particles ();

	post_display ();
}