added DRS control
This commit is contained in:
parent
1a72d6aa0f
commit
28b4e15ed2
@ -88,6 +88,7 @@ typedef struct {
|
|||||||
uint8_t t_trr; // Tire temp rear right
|
uint8_t t_trr; // Tire temp rear right
|
||||||
uint8_t u_batt; // Batteriespannung
|
uint8_t u_batt; // Batteriespannung
|
||||||
uint8_t rev_lim; // Drehzahllimit Bit
|
uint8_t rev_lim; // Drehzahllimit Bit
|
||||||
|
bool drs_active; // DRS status from BCU
|
||||||
uint8_t p_wat;
|
uint8_t p_wat;
|
||||||
uint8_t p_fuel;
|
uint8_t p_fuel;
|
||||||
uint8_t p_oil;
|
uint8_t p_oil;
|
||||||
|
@ -71,6 +71,7 @@ void Receive_Can_0(CAN_FRAME *temp_message) {
|
|||||||
case CAN_ID_BCU_APS_BRAKE: {
|
case CAN_ID_BCU_APS_BRAKE: {
|
||||||
Vehicle_data.p_brake_front = temp_message->data.byte[1];
|
Vehicle_data.p_brake_front = temp_message->data.byte[1];
|
||||||
Vehicle_data.p_brake_rear = temp_message->data.byte[2];
|
Vehicle_data.p_brake_rear = temp_message->data.byte[2];
|
||||||
|
Vehicle_data.drs_active = ((temp_message->data.byte[0] >> 7) & 0b00000001);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CAN_ID_BCU_ETC: { // eDrossel error bit
|
case CAN_ID_BCU_ETC: { // eDrossel error bit
|
||||||
@ -154,7 +155,7 @@ void update_LED() {
|
|||||||
((Vehicle_data.t_mot - 40) >= 0x69) and
|
((Vehicle_data.t_mot - 40) >= 0x69) and
|
||||||
((Vehicle_data.t_mot - 40) != 0xC8); // 105°C temp.water und !=200
|
((Vehicle_data.t_mot - 40) != 0xC8); // 105°C temp.water und !=200
|
||||||
|
|
||||||
bool g_auto = Vehicle_data.g_auto;
|
bool g_auto = Vehicle_data.drs_active;
|
||||||
bool u_batt = Vehicle_data.u_batt <= 0xA9; // 11.95V batt.spann.
|
bool u_batt = Vehicle_data.u_batt <= 0xA9; // 11.95V batt.spann.
|
||||||
bool e_dros = Vehicle_data.e_thro; // error-bit
|
bool e_dros = Vehicle_data.e_thro; // error-bit
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user