Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurator in Manual Mode ignores user defines. #602

Closed
sokil opened this issue May 1, 2024 · 0 comments
Closed

Configurator in Manual Mode ignores user defines. #602

sokil opened this issue May 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sokil
Copy link

sokil commented May 1, 2024

Expected Behavior

Configurator in Manual Mode accepts user defines.

Current Behavior

If Manual Mode selected, passed to textarea user defines ignored, and options from Standard mode used instead

Steps to Reproduce

  1. Select Standard mode
  2. Define frequency REGULATORY_DOMAIN_AU_915
  3. Select Manual mode
  4. Define "-DRegulatory_Domain_FCC_915"
  5. Flash receiver
  6. Reveiver works on AU915 domain

Possible Solution

src/api/src/services/BinaryFlashingStrategy/index.ts

async buildFlashFirmware() {
    ...
    flasherArgs = this.binaryConfigurator.buildBinaryConfigFlags()

src/api/src/services/BinaryFlashingStrategy/BinaryConfigurator/index.ts

  buildBinaryConfigFlags(
    outputDirectory: string,
    firmwareBinaryPath: string,
    hardwareDefinitionsPath: string | null,
    firmwareArtifactsDirPath: string,
    params: BuildFlashFirmwareParams
  ): string[][] {
      ...
      flags.push(...this.userDefinesToFlags(params.userDefines));

As i understand, params.userDefinesTxt ignored, and params.userDefines contains options from Standart mode.
So next parameters passed to configurator:

{
  context: {
    flags: [
      [
        '--dir',
        '/home/user/.config/ExpressLRS Configurator/firmwares/binary-targets'
      ],
      [ '--fdir', '/src/ELRS/src' ],
      [ '--target', 'happymodel.rx_900.es900' ],
      [ '--phrase', '***' ],
      [ '--domain', 'au_915' ],
      [ '--auto-wifi', '20' ],
      [ '--flash', 'bf' ],
      [ '/tmp/happymodel.rx_900.es900.betaflight_q3taLO/firmware.bin' ]
    ],
    flasherPath: '/src/ELRS/src/python/binary_configurator.py'
  },
  level: 'info',
  message: 'flags',
  timestamp: '2024-05-01T12:31:46.061Z'
}

Context

Manual mode usefull due to simplifying configuration by passing user defines from file.

Your Environment

  • Build on Ubuntu with Configurator 1.6.1
  • RX hardware: Happymodel ES900 RX
@sokil sokil added the bug Something isn't working label May 1, 2024
@sokil sokil changed the title Configurator in Manual Mode innore user defines. Configurator in Manual Mode ignores user defines. May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant