only: Detected gear is not current gear? fix #5850
This commit is contained in:
parent
3526c8789f
commit
2b692470bf
|
@ -14,6 +14,7 @@ DDEFS += -DHW_ATLAS=1
|
|||
# Atlas needs networking library
|
||||
LWIP = yes
|
||||
ALLOW_SHADOW = yes
|
||||
DDEFS += -DEFI_TCU=TRUE
|
||||
DDEFS += -DEFI_ETHERNET=TRUE
|
||||
DDEFS += -DSTATIC_BOARD_ID=STATIC_BOARD_ID_ATLAS
|
||||
|
||||
|
|
|
@ -24,8 +24,7 @@ const knock_controller_s* getLiveData(size_t) {
|
|||
template<>
|
||||
const tcu_controller_s* getLiveData(size_t) {
|
||||
#if EFI_TCU
|
||||
fix me here
|
||||
return &engine->
|
||||
return engine->gearController->transmissionController;
|
||||
#else
|
||||
return nullptr;
|
||||
#endif // EFI_TCU
|
||||
|
|
|
@ -16,10 +16,10 @@ public:
|
|||
virtual GearControllerMode getMode() const {
|
||||
return GearControllerMode::ButtonShift;
|
||||
}
|
||||
TransmissionControllerBase *transmissionController;
|
||||
protected:
|
||||
virtual gear_e setDesiredGear(gear_e);
|
||||
void initTransmissionController();
|
||||
TransmissionControllerBase *transmissionController;
|
||||
uint8_t* getRangeStateArray(int);
|
||||
private:
|
||||
gear_e desiredGear = NEUTRAL;
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#if EFI_TCU
|
||||
Gm4l6xTransmissionController gm4l6xTransmissionController;
|
||||
static SimplePwm tccPwm("TCC Control");
|
||||
static SimplePwm pcPwm("Pressure Control");
|
||||
static SimplePwm shift32Pwm("3-2 Shift Control");
|
||||
static SimplePwm tccPwm("TCC Control");
|
||||
static SimplePwm pcPwm("Pressure Control");
|
||||
static SimplePwm shift32Pwm("3-2 Shift Control");
|
||||
|
||||
void Gm4l6xTransmissionController::init() {
|
||||
for (size_t i = 0; i < efi::size(engineConfiguration->tcu_solenoid); i++) {
|
||||
|
@ -56,7 +56,7 @@ void Gm4l6xTransmissionController::update(gear_e gear) {
|
|||
|
||||
float time = isShiftCompleted();
|
||||
if (time != 0) {
|
||||
engine->outputChannels.lastShiftTime = time;
|
||||
lastShiftTime = time;
|
||||
isShifting = false;
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ void Gm4l6xTransmissionController::set32State(gear_e gear) {
|
|||
int pct = interpolate2d(vss.Value, config->tcu_32SpeedBins, config->tcu_32Vals);
|
||||
shift32Pwm.setSimplePwmDutyCycle(pct*0.01);
|
||||
} else {
|
||||
shift32Pwm.setSimplePwmDutyCycle(0);
|
||||
shift32Pwm.setSimplePwmDutyCycle(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <rusefi/timer.h>
|
||||
|
||||
#if EFI_TCU
|
||||
class TransmissionControllerBase, public tcu_controller_s {
|
||||
class TransmissionControllerBase: public tcu_controller_s {
|
||||
private:
|
||||
Timer m_shiftTimer;
|
||||
bool m_shiftTime;
|
||||
|
|
|
@ -2,5 +2,5 @@ struct_no_prefix tcu_controller_s
|
|||
int8_t tcuCurrentGear;@@GAUGE_NAME_CURRENT_GEAR@@;"gear", 1, 0, -1, 10, 0
|
||||
uint16_t autoscale tcRatio;@@GAUGE_NAME_TC_RATIO@@;"value",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
|
||||
float lastShiftTime
|
||||
! uint8_t tcu_currentRange;"TCU: Current Range";"", 1, 0, 0, 0, 0
|
||||
uint8_t tcu_currentRange;"TCU: Current Range";"", 1, 0, 0, 0, 0
|
||||
end_struct
|
||||
|
|
Loading…
Reference in New Issue