Skip to content

Commit

Permalink
Tcc allow for locking in shifts
Browse files Browse the repository at this point in the history
  • Loading branch information
rnd-ash committed Jul 18, 2024
1 parent fdd60be commit c723665
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
11 changes: 4 additions & 7 deletions src/torque_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ TorqueConverter::TorqueConverter(uint16_t max_gb_rating) {
this->slip_average = new FirstOrderAverage<int32_t>(50); // 20ms div * 50 = 1 second moving average
}

void TorqueConverter::set_shift_target_state(InternalTccState target_state) {
this->shift_req_tcc_state = target_state;
void TorqueConverter::set_shift_target_state(SensorData* sd, InternalTccState target_state) {
if (sd->output_rpm < TCC_CURRENT_SETTINGS.force_lock_min_output_rpm) {
this->shift_req_tcc_state = target_state;
}
this->is_shifting = true;
}

Expand Down Expand Up @@ -232,11 +234,6 @@ void TorqueConverter::update(GearboxGear curr_gear, GearboxGear targ_gear, Press
pm->set_target_tcc_pressure(this->tcc_pressure_current);
}

uint8_t TorqueConverter::progress_to_next_phase(void) {
uint8_t ret = 100;
return ret;
}

TccClutchStatus TorqueConverter::get_clutch_state(void) {
TccClutchStatus ret = TccClutchStatus::Open;
InternalTccState targ = this->target_tcc_state;
Expand Down
5 changes: 1 addition & 4 deletions src/torque_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ class TorqueConverter {
this->tcc_slip_map->save_to_eeprom();
}
};
void set_shift_target_state(InternalTccState target_state);
void set_shift_target_state(SensorData* sd, InternalTccState target_state);
void on_shift_ending(void);

void diag_toggle_tcc_sol(bool en);

// In % (0-100) - 100 is returned if already at next phase
uint8_t progress_to_next_phase(void);

void set_stationary();

int16_t get_slip_filtered();
Expand Down

0 comments on commit c723665

Please sign in to comment.