/*
* Bizi-TripComp
* Computer to for AFC,IFC,SPEED,RPM
* Trip Computer
*/
#include < EEPROMex.h >
#include < EEPROMVar.h >
#include < Wire.h >
#include < LiquidCrystal_I2C.h >
#define BACKLIGHT_PIN 13
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); //
volatile static double pulse_distance = 0.00040225;
volatile static long double injection_value = 0.0031666666666667;
volatile double traveled_distance, display_traveled_distance, injector_open_time, used_fuel, tank_capacity = 45, instant_fuel_consumption, display_instant_fuel_consumption;
volatile float all_fuel_consumption_values, average_fuel_consumption;
volatile unsigned long counter, avg_speed_divider, dist_pulse_count, temp_dist_pulse_count, all_speed_values, injector_pulse_time, temp_injector_pulse_time, injTime1, injTime2, save_number;
volatile unsigned int speed, display_speed, avg_speed, max_speed = 0, fccounter, save_counter, i;
volatile boolean to_be_saved;