forked from Churrosoft/OpenEFI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSPWM.h
36 lines (32 loc) · 936 Bytes
/
SPWM.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// PWM.h
#ifndef _PWM_h
#define _PWM_h
#include "Arduino.h"
class SPWM{
public:
//avance encendido | dientes entre pms | pines inyeccion | pines encendido
SPWM(byte avance, byte dientesPMS, byte PinesI[], byte PinesE[]);
void Ecn(byte Time, byte Avc);
void Iny(byte Time);
void Intrr(); //void de interrupcion
private:
/*-----( Variables C_PWM )-----*/
byte
PMSI = 30, //Cantidad de dientes entre PMS
AVCI = 10, //Avance de inyeccion
AVC = 15, //Avance de encendido
PWM_FLAG_1 = 0,
PWM_FLAG_1A = 0,
PWM_FLAG_2 = 0,
PWM_FLAG_3 = 0,
i = 0; //para for viteh.
byte INY[16];
unsigned long //temporizados:
T1 = 250, //tiempo de inyeccion combustible
T2 = 1800, //tiempo de encendido bobina
T1X = 0, //lo uso para controlar temporizado con micros()
T2X = 0; //idem pero para encendido
bool t1 = false,
t2 = false; //bool para control de temperizado
};
#endif