int32 first number of the serie
int32 second number of the serie
bool32.rising trigger
bool32.rising reset
int32 output
int ntrig;
int rtrig;
int i1;
int i2;
ntrig = 0;
rtrig = 0;
i1 = 0;
i2 = 1;
if ((inlet_trig > 0) && !ntrig) {
i2 = i1 + i2;
i1 = i2 - i1;
ntrig = 1;
} else if (!(inlet_trig > 0))
ntrig = 0;
if ((inlet_r > 0) && !rtrig) {
if ((inlet_i1 + inlet_i2) + (inlet_i1 * inlet_i2)) {
i1 = inlet_i1;
i2 = inlet_i2;
} else {
i1 = 0;
i2 = 1;
}
rtrig = 1;
} else if (!(inlet_r > 0))
rtrig = 0;
outlet_o = i2;