Skip to content

Commit

Permalink
New am32 repo url (#455)
Browse files Browse the repository at this point in the history
* new am32 github url
  • Loading branch information
freasy authored Feb 2, 2024
1 parent 570e7f3 commit 0ac984d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Components/FirmwareSelector/__tests__/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ describe('FirmwareSelector', () => {

fireEvent.change(screen.getByRole(/combobox/i, { name: 'Version' }), {
target: {
value: 'https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/releases/download/v1.94/',
value: 'https://github.com/am32-firmware/AM32/releases/download/v1.94/',
name: 'Version',
},
});
Expand Down Expand Up @@ -377,7 +377,7 @@ describe('FirmwareSelector', () => {

fireEvent.change(screen.getByRole(/combobox/i, { name: 'Version' }), {
target: {
value: 'https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/releases/download/v1.94/',
value: 'https://github.com/am32-firmware/AM32/releases/download/v1.94/',
name: 'Version',
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function HomeColumnCenter() {

<li>
<a
href="https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware"
href="https://github.com/am32-firmware/AM32"
rel="noreferrer"
target="_blank"
>
Expand Down
20 changes: 10 additions & 10 deletions src/sources/AM32/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,40 +115,40 @@ describe('AM32', () => {
expect(name).toEqual('NOT READY - AM32, FLASH FIRMWARE, Bootloader v8 (PB2)');
});

it('should return valid URL for version 1.94', () => {
it('should return valid URL for version 2.08', () => {
const firmwareConfig = {
escKey: 'IFlight_50A',
version: '1.94',
url: 'https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/releases/download/v1.94/',
version: '2.08',
url: 'https://github.com/am32-firmware/AM32/releases/download/v2.08/',
esc: { meta: {} },
};

const url = source.getFirmwareUrl(firmwareConfig);
expect(url).toEqual('https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/releases/download/v1.94/AM32_IFLIGHT_F051_1.94.hex');
expect(url).toEqual('https://github.com/am32-firmware/AM32/releases/download/v2.08/AM32_IFLIGHT_F051_2.08.hex');
});

it('should return valid URL for version included in patterns', () => {
const firmwareConfig = {
escKey: 'IFlight_50A',
version: 'v1.91',
url: 'https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/releases/download/v1.91/',
version: 'v2.08',
url: 'https://github.com/am32-firmware/AM32/releases/download/v2.08/',
esc: { meta: {} },
};

const url = source.getFirmwareUrl(firmwareConfig);
expect(url).toEqual('https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/releases/download/v1.91/AM32_IFLIGHT_F051_1.91.hex');
expect(url).toEqual('https://github.com/am32-firmware/AM32/releases/download/v2.08/AM32_IFLIGHT_F051_2.08.hex');
});

it('should return valid URL for version with name detected', () => {
const firmwareConfig = {
escKey: 'DOES_NOT_EXIST',
version: 'v1.95',
url: 'https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/releases/download/v1.95/',
version: 'v2.08',
url: 'https://github.com/am32-firmware/AM32/releases/download/v2.08/',
esc: { meta: { am32: { fileName: 'DETECTED_FILENAME' } } },
};

const url = source.getFirmwareUrl(firmwareConfig, 'DETECTED');
expect(url).toEqual('https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/releases/download/v1.95/AM32_DETECTED_FILENAME_1.95.hex');
expect(url).toEqual('https://github.com/am32-firmware/AM32/releases/download/v2.08/AM32_DETECTED_FILENAME_2.08.hex');
});

it('should return a list of valid names', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/sources/AM32/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Arm from '../../utils/Hardware/Arm';
import semver from 'semver';
import { fetchJsonCached } from '../../utils/Fetch';

const GITHUB_REPO = 'AlkaMotors/AM32-MultiRotor-ESC-firmware';
const GITHUB_REPO = 'am32-firmware/AM32';

class AM32Source extends GithubSource {
minVersion = "1.94";
Expand Down

0 comments on commit 0ac984d

Please sign in to comment.