don't expose private state (#2696)
* don't expose private state * fix tle init
This commit is contained in:
parent
70f65e0652
commit
c2cdc382a3
|
@ -18,9 +18,12 @@ public:
|
|||
bool init(brain_pin_e scl, brain_pin_e sda);
|
||||
|
||||
expected<float> readPressureKpa();
|
||||
// todo: make this private and get getter?
|
||||
bool m_hasInit = false;
|
||||
bool hasInit() const {
|
||||
return m_hasInit;
|
||||
}
|
||||
|
||||
private:
|
||||
BitbangI2c m_i2c;
|
||||
|
||||
bool m_hasInit = false;
|
||||
};
|
||||
|
|
|
@ -240,7 +240,6 @@ void initSmartGpio() {
|
|||
}
|
||||
|
||||
void tle8888startup() {
|
||||
tle8888startup();
|
||||
static efitick_t tle8888CrankingResetTime = 0;
|
||||
|
||||
if (CONFIG(useTLE8888_cranking_hack) && ENGINE(rpmCalculator).isCranking()) {
|
||||
|
|
|
@ -22,7 +22,7 @@ void initBaro(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
void baroLps25Update() {
|
||||
#if EFI_PROD_CODE
|
||||
if (device.m_hasInit) {
|
||||
if (device.hasInit()) {
|
||||
sensor.update();
|
||||
}
|
||||
#endif // EFI_PROD_CODE
|
||||
|
|
Loading…
Reference in New Issue