basic hw in the loop - pwm self validation #2028
This commit is contained in:
parent
6b80297245
commit
96c29840ce
|
@ -233,7 +233,7 @@ void startLogicAnalyzerPins() {
|
||||||
|
|
||||||
void stopLogicAnalyzerPins() {
|
void stopLogicAnalyzerPins() {
|
||||||
for (int index = 0; index < LOGIC_ANALYZER_CHANNEL_COUNT; index++) {
|
for (int index = 0; index < LOGIC_ANALYZER_CHANNEL_COUNT; index++) {
|
||||||
brain_pin_e brainPin = CONFIG(logicAnalyzerPins)[index];
|
brain_pin_e brainPin = activeConfiguration.logicAnalyzerPins[index];
|
||||||
|
|
||||||
if (brainPin != GPIO_UNASSIGNED) {
|
if (brainPin != GPIO_UNASSIGNED) {
|
||||||
stopDigitalCapture("wave input", brainPin);
|
stopDigitalCapture("wave input", brainPin);
|
||||||
|
|
|
@ -219,7 +219,7 @@ void stopDigitalCapture(const char *msg, brain_pin_e brainPin) {
|
||||||
if (driver == NULL) {
|
if (driver == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
efiSetPadUnused(brainPin);
|
|
||||||
int regSize = registeredIcus.size;
|
int regSize = registeredIcus.size;
|
||||||
for (int i = 0; i < regSize; i++) {
|
for (int i = 0; i < regSize; i++) {
|
||||||
if (registeredIcus.elements[i].driver == driver) {
|
if (registeredIcus.elements[i].driver == driver) {
|
||||||
|
|
|
@ -151,6 +151,7 @@ void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->canReadEnabled = false;
|
engineConfiguration->canReadEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo: we usually use 'activeConfiguration' for 'stopPin' why this unusual code here?
|
||||||
// this is related to #1375
|
// this is related to #1375
|
||||||
static brain_pin_e currentTxPin = GPIO_UNASSIGNED;
|
static brain_pin_e currentTxPin = GPIO_UNASSIGNED;
|
||||||
static brain_pin_e currentRxPin = GPIO_UNASSIGNED;
|
static brain_pin_e currentRxPin = GPIO_UNASSIGNED;
|
||||||
|
|
|
@ -304,8 +304,14 @@ void stopSpi(spi_device_e device) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void applyNewHardwareSettings(void) {
|
void applyNewHardwareSettings(void) {
|
||||||
// all 'stop' methods need to go before we begin starting pins
|
/**
|
||||||
|
* All 'stop' methods need to go before we begin starting pins.
|
||||||
|
*
|
||||||
|
* We take settings from 'activeConfiguration' not 'engineConfiguration' while stopping hardware.
|
||||||
|
* Some hardware is restart unconditionally on change of parameters while for some systems we make extra effort and restart only
|
||||||
|
* relevant settings were changes.
|
||||||
|
*
|
||||||
|
*/
|
||||||
ButtonDebounce::stopConfigurationList();
|
ButtonDebounce::stopConfigurationList();
|
||||||
|
|
||||||
#if EFI_SHAFT_POSITION_INPUT
|
#if EFI_SHAFT_POSITION_INPUT
|
||||||
|
|
Loading…
Reference in New Issue