Skip to content

Commit

Permalink
Indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jack2game committed Oct 29, 2023
1 parent d94928f commit 3d45ad5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
4 changes: 2 additions & 2 deletions headers/addons/tilt.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ class TiltInput : public GPAddon {
uint8_t pinRotate1;
uint8_t pinRotate2;
uint16_t rotate1FactorLeft;
uint16_t rotate2FactorLeft;
uint16_t rotate2FactorLeft;
uint16_t rotate3FactorLeft;
uint16_t rotate4FactorLeft;
uint16_t rotate5FactorLeft;
uint16_t rotate6FactorLeft;
uint16_t rotate1FactorRight;
uint16_t rotate1FactorRight;
uint16_t rotate2FactorRight;
uint16_t rotate3FactorRight;
uint16_t rotate4FactorRight;
Expand Down
32 changes: 16 additions & 16 deletions src/config_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,22 +459,22 @@ void ConfigUtils::initUnsetPropertiesWithDefaults(Config& config)
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, tiltRightAnalogUpPin, PIN_TILT_RIGHT_ANALOG_UP);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, tiltRightAnalogLeftPin, PIN_TILT_RIGHT_ANALOG_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, tiltRightAnalogRightPin, PIN_TILT_RIGHT_ANALOG_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, tiltLeftSOCDMode, TILT_LEFT_SOCD_MODE);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, tiltRightSOCDMode, TILT_RIGHT_SOCD_MODE);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, rotate1Pin, PIN_ROTATE_1);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, rotate2Pin, PIN_ROTATE_2);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate1Left, ROTATE1_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate2Left, ROTATE2_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate3Left, ROTATE3_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate4Left, ROTATE4_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate5Left, ROTATE5_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate6Left, ROTATE6_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate1Right, ROTATE1_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate2Right, ROTATE2_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate3Right, ROTATE3_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate4Right, ROTATE4_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate5Right, ROTATE5_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate6Right, ROTATE6_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, tiltLeftSOCDMode, TILT_LEFT_SOCD_MODE);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, tiltRightSOCDMode, TILT_RIGHT_SOCD_MODE);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, rotate1Pin, PIN_ROTATE_1);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, rotate2Pin, PIN_ROTATE_2);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate1Left, ROTATE1_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate2Left, ROTATE2_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate3Left, ROTATE3_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate4Left, ROTATE4_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate5Left, ROTATE5_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate6Left, ROTATE6_FACTOR_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate1Right, ROTATE1_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate2Right, ROTATE2_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate3Right, ROTATE3_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate4Right, ROTATE4_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate5Right, ROTATE5_FACTOR_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorRotate6Right, ROTATE6_FACTOR_RIGHT);

// addonOptions.buzzerOptions
INIT_UNSET_PROPERTY(config.addonOptions.buzzerOptions, enabled, !!BUZZER_ENABLED);
Expand Down
4 changes: 2 additions & 2 deletions src/configs/webconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ std::string setAddonOptions()
docToValue(dualDirectionalOptions.fourWayMode, doc, "dualDirFourWayMode");
docToValue(dualDirectionalOptions.enabled, doc, "DualDirectionalInputEnabled");

TiltOptions& tiltOptions = Storage::getInstance().getAddonOptions().tiltOptions;
TiltOptions& tiltOptions = Storage::getInstance().getAddonOptions().tiltOptions;
docToPin(tiltOptions.tilt1Pin, doc, "tilt1Pin");
docToValue(tiltOptions.factorTilt1LeftX, doc, "factorTilt1LeftX");
docToValue(tiltOptions.factorTilt1LeftY, doc, "factorTilt1LeftY");
Expand Down Expand Up @@ -1442,7 +1442,7 @@ std::string getAddonOptions()
writeDoc(doc, "dualDirFourWayMode", dualDirectionalOptions.fourWayMode);
writeDoc(doc, "DualDirectionalInputEnabled", dualDirectionalOptions.enabled);

const TiltOptions& tiltOptions = Storage::getInstance().getAddonOptions().tiltOptions;
const TiltOptions& tiltOptions = Storage::getInstance().getAddonOptions().tiltOptions;
writeDoc(doc, "tilt1Pin", cleanPin(tiltOptions.tilt1Pin));
writeDoc(doc, "factorTilt1LeftX", tiltOptions.factorTilt1LeftX);
writeDoc(doc, "factorTilt1LeftY", tiltOptions.factorTilt1LeftY);
Expand Down
1 change: 0 additions & 1 deletion www/src/Locales/en/AddonsConfig.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,4 @@ export default {
'pspassthrough-d-plus-label': 'D+',
'pspassthrough-d-minus-label': 'D-',
'pspassthrough-five-v-label': '5V Power (optional)',
'pin-config-moved-to-core-text': 'Note: the pins for this add-on are now configured on the Pin Mapping page.',
};

0 comments on commit 3d45ad5

Please sign in to comment.