Mangue Baja team's code to rear ECU

Committer:
einsteingustavo
Date:
Wed Jul 24 20:04:55 2019 +0000
Revision:
0:80950b84a6c4
Mangue Baja team's code to rear ECU

Who changed what in which revision?

UserRevisionLine numberNew contents of line
einsteingustavo 0:80950b84a6c4 1 #ifndef REARDEFS_H
einsteingustavo 0:80950b84a6c4 2 #define REARDEFS_H
einsteingustavo 0:80950b84a6c4 3
einsteingustavo 0:80950b84a6c4 4 #define SERVO_RUN 866
einsteingustavo 0:80950b84a6c4 5 #define RUN_MODE 0x01
einsteingustavo 0:80950b84a6c4 6 #define SERVO_MID 1320
einsteingustavo 0:80950b84a6c4 7 #define MID_MODE 0x00
einsteingustavo 0:80950b84a6c4 8 #define SERVO_CHOKE 1780
einsteingustavo 0:80950b84a6c4 9 #define CHOKE_MODE 0x02
einsteingustavo 0:80950b84a6c4 10 #define VCC 3.3
einsteingustavo 0:80950b84a6c4 11 #define R_TERM 1000
einsteingustavo 0:80950b84a6c4 12
einsteingustavo 0:80950b84a6c4 13 /* Radio definitions */
einsteingustavo 0:80950b84a6c4 14 #define NETWORK_ID 101
einsteingustavo 0:80950b84a6c4 15 #define BOXRADIO_ID 69
einsteingustavo 0:80950b84a6c4 16 #define MB1_ID 41
einsteingustavo 0:80950b84a6c4 17 #define MB2_ID 55
einsteingustavo 0:80950b84a6c4 18 #define FREQUENCY_915MHZ 91
einsteingustavo 0:80950b84a6c4 19 #define NORMAL_THRESHOLD 68
einsteingustavo 0:80950b84a6c4 20
einsteingustavo 0:80950b84a6c4 21 typedef enum
einsteingustavo 0:80950b84a6c4 22 {
einsteingustavo 0:80950b84a6c4 23 IDLE_ST, // wait
einsteingustavo 0:80950b84a6c4 24 TEMP_ST, // measure temperatures
einsteingustavo 0:80950b84a6c4 25 FUEL_ST, // proccess fuel data sampling
einsteingustavo 0:80950b84a6c4 26 RPM_ST, // calculate speed
einsteingustavo 0:80950b84a6c4 27 THROTTLE_ST, // write throttle position (PWM)
einsteingustavo 0:80950b84a6c4 28 RADIO_ST, // send data for box via radio (SPI)
einsteingustavo 0:80950b84a6c4 29 DEBUG_ST // send data for debug
einsteingustavo 0:80950b84a6c4 30 } state_t;
einsteingustavo 0:80950b84a6c4 31
einsteingustavo 0:80950b84a6c4 32 #endif