2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file trigger_gm.cpp
|
|
|
|
*
|
|
|
|
* @date Mar 28, 2014
|
2015-12-31 13:02:30 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2016
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "trigger_gm.h"
|
|
|
|
|
|
|
|
void configureGmTriggerShape(TriggerShape *s) {
|
2015-10-29 11:02:52 -07:00
|
|
|
s->initialize(FOUR_STROKE_CAM_SENSOR, false);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
// all angles are x2 here - so, 5 degree width is 10
|
|
|
|
float w = 10;
|
|
|
|
|
2015-10-31 13:02:10 -07:00
|
|
|
s->addEvent(120 - w, T_PRIMARY, TV_RISE);
|
|
|
|
s->addEvent(120.0, T_PRIMARY, TV_FALL);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2015-10-31 13:02:10 -07:00
|
|
|
s->addEvent(240 - w, T_PRIMARY, TV_RISE);
|
|
|
|
s->addEvent(240.0, T_PRIMARY, TV_FALL);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2015-10-31 13:02:10 -07:00
|
|
|
s->addEvent(360 - w, T_PRIMARY, TV_RISE);
|
|
|
|
s->addEvent(360.0, T_PRIMARY, TV_FALL);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2015-10-31 13:02:10 -07:00
|
|
|
s->addEvent(480 - w, T_PRIMARY, TV_RISE);
|
|
|
|
s->addEvent(480.0, T_PRIMARY, TV_FALL);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2015-10-31 13:02:10 -07:00
|
|
|
s->addEvent(600 - w, T_PRIMARY, TV_RISE);
|
|
|
|
s->addEvent(600.0, T_PRIMARY, TV_FALL);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2015-10-31 13:02:10 -07:00
|
|
|
s->addEvent(700 - w, T_PRIMARY, TV_RISE);
|
|
|
|
s->addEvent(700.0, T_PRIMARY, TV_FALL);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2015-10-31 13:02:10 -07:00
|
|
|
s->addEvent(720 - w, T_PRIMARY, TV_RISE);
|
|
|
|
s->addEvent(720.0, T_PRIMARY, TV_FALL);
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|
|
|
|
|