add updating init percent and add getting OBD2 PIDS

This commit is contained in:
Sem van der Hoeven
2024-01-21 20:14:21 +01:00
parent 5fbafa3dc9
commit 0da353338e
4 changed files with 111 additions and 35 deletions

View File

@@ -58,8 +58,7 @@ Be sure to disconnect the TX and RX pins from the BT module when programming the
enum BluetoothState
{
BT_INITIALISING = 0,
BT_CONNECTING = 1,
BT_CONNECTED = 2
BT_CONNECTED = 1
};
/**
@@ -73,6 +72,17 @@ typedef struct obt2_elm327_tag
ELM327 *elm327;
enum BluetoothState bt_state;
void (*on_state_change)();
uint16_t rpm;
uint8_t throttle_percent;
uint8_t engine_coolant_temp;
uint8_t intake_air_temp;
uint8_t ambient_air_temp;
float engine_oil_temp;
uint8_t engine_load;
float battery_voltage;
float fuel_pressure;
uint8_t speed;
uint8_t manifold_pressure;
} obd2_elm327_t;
/**