auto-sync
This commit is contained in:
parent
657c57723b
commit
84ed2bf87a
|
@ -349,7 +349,7 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
|||
boardConfiguration->max31855_cs[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
||||
boardConfiguration->gpioPins[i] = GPIO_UNASSIGNED;
|
||||
boardConfiguration->fsioPins[i] = GPIO_UNASSIGNED;
|
||||
boardConfiguration->le_formulas[i][0] = 0;
|
||||
}
|
||||
for (int i = 0; i < JOYSTICK_PIN_COUNT; i++) {
|
||||
|
|
|
@ -220,7 +220,7 @@ typedef struct {
|
|||
|
||||
spi_device_e max31855spiDevice;
|
||||
|
||||
brain_pin_e gpioPins[LE_COMMAND_COUNT];
|
||||
brain_pin_e fsioPins[LE_COMMAND_COUNT];
|
||||
pin_output_mode_e gpioPinModes[LE_COMMAND_COUNT];
|
||||
|
||||
brain_pin_e joystickPins[JOYSTICK_PIN_COUNT];
|
||||
|
@ -244,7 +244,9 @@ typedef struct {
|
|||
brain_pin_e hip9011CsPin;
|
||||
brain_pin_e hip9011IntHoldPin;
|
||||
brain_pin_e hip9011OutPin;
|
||||
int unusedbs[38];
|
||||
|
||||
float fsio_setting[LE_COMMAND_COUNT];
|
||||
int unusedbs[22];
|
||||
|
||||
le_formula_t le_formulas[LE_COMMAND_COUNT];
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ static void cylinderCleanupControl(Engine *engine) {
|
|||
}
|
||||
|
||||
static void handleGpio(Engine *engine, int index) {
|
||||
if (boardConfiguration->gpioPins[index] == GPIO_UNASSIGNED)
|
||||
if (boardConfiguration->fsioPins[index] == GPIO_UNASSIGNED)
|
||||
return;
|
||||
|
||||
bool_t isPwmMode = boardConfiguration->fsioFrequency[index] != 0;
|
||||
|
@ -348,7 +348,7 @@ static void setFsioPin(const char *indexStr, const char *pinName) {
|
|||
scheduleMsg(&logger, "invalid pin name [%s]", pinName);
|
||||
return;
|
||||
}
|
||||
boardConfiguration->gpioPins[index] = pin;
|
||||
boardConfiguration->fsioPins[index] = pin;
|
||||
scheduleMsg(&logger, "FSIO pin #%d [%s]", (index + 1), hwPortname(pin));
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ void initEngineContoller(Engine *engine) {
|
|||
addConsoleAction("analoginfo", printAnalogInfo);
|
||||
|
||||
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
||||
brain_pin_e brainPin = boardConfiguration->gpioPins[i];
|
||||
brain_pin_e brainPin = boardConfiguration->fsioPins[i];
|
||||
|
||||
if (brainPin != GPIO_UNASSIGNED) {
|
||||
|
||||
|
@ -517,7 +517,7 @@ void initEngineContoller(Engine *engine) {
|
|||
|
||||
int frequency = boardConfiguration->fsioFrequency[i];
|
||||
if (frequency == 0) {
|
||||
outputPinRegisterExt2(getPinName(pin), pin, boardConfiguration->gpioPins[i], &d);
|
||||
outputPinRegisterExt2(getPinName(pin), pin, boardConfiguration->fsioPins[i], &d);
|
||||
} else {
|
||||
startSimplePwmExt(&fsioPwm[i], "FSIO", brainPin, pin, frequency, 0.5f, applyPinState);
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ void printConfiguration(engine_configuration_s *engineConfiguration, engine_conf
|
|||
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
||||
char * exp = boardConfiguration->le_formulas[i];
|
||||
if (exp[0] != 0) {
|
||||
scheduleMsg(&logger, "FSIO #%d [%s] at %s@%dHz = %f", (i + 1), exp, hwPortname(boardConfiguration->gpioPins[i]),
|
||||
scheduleMsg(&logger, "FSIO #%d [%s] at %s@%dHz = %f", (i + 1), exp, hwPortname(boardConfiguration->fsioPins[i]),
|
||||
boardConfiguration->fsioFrequency[i],
|
||||
engineConfiguration2->fsioLastValue[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue