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

Hardware list is always loaded from S3, even for local source #580

Closed
devbranch-vadym opened this issue Dec 31, 2023 · 0 comments
Closed
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@devbranch-vadym
Copy link

The hardware list (targets.json file) is always loaded from S3, even if the local repository is used.
Thus, it's not possible to build a firmware with for custom device or e.g. customized hardware options using ExpressLRS Configurator.

Steps to reproduce:

  1. Have a local copy of ExpressLRS source code with customized targets.json. For reproducing an issue, I'd suggest just removing some entries, e.g. anyleaf since it's at the top of the list.
  2. Run the ExpressLRS Configurator.
  3. Select Local at Firmware version selector.
  4. Input local repository path.
  5. Wait for the models data to load.
  6. Select Device category.

Expected Behavior

The anyleaf entry removed from targets.json is not present in models list.

Current Behavior

The anyleafe entry removed from targets.json is still seen in models list.

Steps to Reproduce

Follow the steps above (sorry to break the issue template but it's way more obvious this way).

Possible Solution (Not obligatory)

In DeviceDescriptionsLoader.loadTargetsData, replace:

    if (gitRepository.hardwareArtifactUrl) {

with:

    if (
      args.source !== FirmwareSource.Local &&
      gitRepository.hardwareArtifactUrl
    ) {

This way, the artifacts download logic won't apply for local repositories.
I doubt if that's the correct fix though as e.g. pull requests may also include changes to targets.json which should be accounted. I guess the correct fix would be unsetting hardwareArtifactUrl property from gitRepository but I'm not really sure where it comes from (and I just wanted to be able to build my custom firmware locally so didn't investigate any further).

Context

N/A

Your Environment

  • Operating System and version: Ubuntu 23.10, ExpressLRS and ExpressLRS Configurator from master.
  • TX hardware: N/A
  • RX hardware: N/A
@devbranch-vadym devbranch-vadym added the bug Something isn't working label Dec 31, 2023
@jurgelenas jurgelenas added the good first issue Good for newcomers label Jun 15, 2024
jurgelenas added a commit that referenced this issue Jun 29, 2024
use local targetsdata for local builds, fixes #580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants