avoid vexing parse

This commit is contained in:
Matthew Kennedy 2023-11-01 15:51:44 -07:00 committed by rusefillc
parent 02621224a7
commit 93e3e75a36
3 changed files with 6 additions and 7 deletions

View File

@ -606,11 +606,9 @@ void updateTunerStudioState() {
tsOutputChannels->tsConfigVersion = TS_FILE_VERSION;
static_assert(offsetof (TunerStudioOutputChannels, tsConfigVersion) == TS_FILE_VERSION_OFFSET);
DcHardware *getdcHardware();
DcHardware *dc = getdcHardware();
engine->dc_motors.dcOutput0 = dc->dcMotor.get();
engine->dc_motors.isEnabled0_int = dc->msg() == nullptr;
DcHardware *dc = getdcHardware();
engine->dc_motors.dcOutput0 = dc->dcMotor.get();
engine->dc_motors.isEnabled0_int = dc->msg() == nullptr;
tsOutputChannels->RPMValue = rpm;
#if EFI_SHAFT_POSITION_INPUT

View File

@ -86,7 +86,7 @@
static DcHardware dcHardware[ETB_COUNT + DC_PER_STEPPER];
DcHardware *getdcHardware() {
return &dcHardware[0];
return &dcHardware[0];
}
DcMotor* initDcMotor(const char *disPinMsg,const dc_io& io, size_t index, bool useTwoWires) {

View File

@ -74,5 +74,6 @@ public:
void stop() {
// todo: replace 'isStarted' with 'stop'
}
};
DcHardware *getdcHardware();