evil manual merge of https://github.com/DonaldBecker/rusefi
This commit is contained in:
parent
a41b4c896d
commit
2530f31498
|
@ -37,7 +37,7 @@ public:
|
|||
// F4 does not care
|
||||
__ALIGNED(32) adcsample_t samples[ADC_MAX_CHANNELS_COUNT * MAX_ADC_GRP_BUF_DEPTH];
|
||||
// Assert multiple of 32 bytes long so we don't stomp on the data after the buffer
|
||||
static_assert(sizeof(samples) % 32 == 0);
|
||||
static_assert(sizeof(samples) % 32 == 0, "ADC sample buffer alignment");
|
||||
|
||||
int getAdcValueByHwChannel(int hwChannel) const;
|
||||
|
||||
|
|
|
@ -305,11 +305,13 @@ void setCanType(int type) {
|
|||
canInfo();
|
||||
}
|
||||
|
||||
#if defined(EFI_TUNER_STUDIO)
|
||||
void postCanState(TunerStudioOutputChannels *tsOutputChannels) {
|
||||
tsOutputChannels->debugIntField1 = isCanEnabled ? canReadCounter : -1;
|
||||
tsOutputChannels->debugIntField2 = isCanEnabled ? canWriteOk : -1;
|
||||
tsOutputChannels->debugIntField3 = isCanEnabled ? canWriteNotOk : -1;
|
||||
}
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
CONFIGB(canTxPin) = GPIOB_6;
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
* @author Andrey Belomutskiy, (c) 2012-2019
|
||||
*/
|
||||
|
||||
#ifndef CAN_HW_H_
|
||||
#define CAN_HW_H_
|
||||
#pragma once
|
||||
|
||||
#include "efifeatures.h"
|
||||
#if EFI_TUNER_STUDIO
|
||||
|
@ -48,7 +47,9 @@ void setTxBit(int offset, int index);
|
|||
void stopCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void startCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
#if defined(EFI_TUNER_STUDIO)
|
||||
void postCanState(TunerStudioOutputChannels *tsOutputChannels);
|
||||
#endif
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
#endif /* EFI_CAN_SUPPORT */
|
||||
|
||||
|
||||
#endif /* CAN_HW_H_ */
|
||||
|
|
|
@ -143,20 +143,21 @@ void StepperMotor::setDirection(bool isIncrementing) {
|
|||
|
||||
void StepperMotor::pulse() {
|
||||
#if EFI_PROD_CODE
|
||||
palWritePad(enablePort, enablePin, false); // enable stepper
|
||||
palWritePad(stepPort, stepPin, true);
|
||||
palWritePad(enablePort, enablePin, 0); // enable stepper
|
||||
palWritePad(stepPort, stepPin, 1);
|
||||
chThdSleepMilliseconds(reactionTime);
|
||||
|
||||
palWritePad(stepPort, stepPin, false);
|
||||
palWritePad(stepPort, stepPin, 0);
|
||||
chThdSleepMilliseconds(reactionTime);
|
||||
|
||||
palWritePad(enablePort, enablePin, true); // disable stepper
|
||||
#endif
|
||||
palWritePad(enablePort, enablePin, 1); // disable stepper
|
||||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
void StepperMotor::initialize(brain_pin_e stepPin, brain_pin_e directionPin, pin_output_mode_e directionPinMode,
|
||||
float reactionTime, int totalSteps,
|
||||
brain_pin_e enablePin, pin_output_mode_e enablePinMode, Logging *sharedLogger) {
|
||||
UNUSED(enablePinMode);
|
||||
this->reactionTime = maxF(1, reactionTime);
|
||||
this->totalSteps = maxI(3, totalSteps);
|
||||
|
||||
|
|
Loading…
Reference in New Issue