Skip to content

Commit

Permalink
Merge branch 'release/0.32.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
stylesuxx committed Jul 19, 2024
2 parents d1e0684 + 121e4a6 commit ef0c148
Show file tree
Hide file tree
Showing 19 changed files with 417 additions and 35 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esc-configurator",
"version": "0.31.0",
"version": "0.32.0",
"private": false,
"license": "AGPL-3.0",
"dependencies": {
Expand Down
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
4 changes: 2 additions & 2 deletions src/Components/Home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function HomeColumnCenter() {
</strong>

<br />
If you are still on 0.20.0, please downgrade to 0.19.2 - there have been issues with stall detection and motor protection which might result in broken ESCs and/or motors.
If you are still on 0.20.0, please upgrade to version 0.21.0 - there have been issues with stall detection and motor protection which might result in broken ESCs and/or motors.
</div>

<h2>
Expand Down 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
4 changes: 2 additions & 2 deletions src/Components/MainContent/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
}

.input-wrapper {
flex: 0 0 195px;
flex: 0 0 218px;

input:not([type="checkbox"]),
select {
Expand All @@ -170,7 +170,7 @@

label {
flex: 1;
flex: 0 0 195px;
flex: 0 0 218px;
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"title": "0.32.0",
"items": [
"Bugfix: Add more space to display ESC information",
"Translation: Add Russian translations",
"Translation: Fixed typo",
"Enhancement: More melodies"
]
},
{
"title": "0.31.0",
"items": [
Expand Down
46 changes: 46 additions & 0 deletions src/melodies.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@
"Melody:b=180,o=5,d=8:1p,1p,1p,1p,a4,a#4,b4,c,p,c,b4,c,4p,p,d,p,d,e,f#,4g,g,16g,32g,32p,2g,a,g#,g,f"
]
},
{
"name": "Deco*27 - Vampire",
"tracks": [
"bluejay:b=163,o=5,d=8:a5,g5,f5,g5,p,4f5,f6,p,a5,16a5,g5,16p,f5,p,f6,p,1p,1p,1p,1p,1p,1p",
"bluejay:b=163,o=5,d=8:1p,1p,1p,1p,4p,a5,d6,e6,4f6,a5,g5,p,f6,p,g6,16g6,32g6,32p,g6,f6,g6,4a6,1p,2p,p",
"bluejay:b=163,o=5,d=8:1p,1p,a5,g5,16g5,16f5,p,g5,p,f5,g5,32f5,32p,16f5,a5,16p,16g5,p,d6,16d6,32d6,32p,d6,c#6,d6,e6,1p,1p,1p,2p,4p",
"bluejay:b=163,o=5,d=8:1p,1p,1p,1p,1p,1p,4p,p,g6,16f6,32f6,32p,f6,p,4a6,g6,f6,g6,2f6"
]
},
{
"name": "Devil's Swing",
"tracks": [
Expand Down Expand Up @@ -207,6 +216,15 @@
"FF8Laguna4:d=16,o=4,b=140:a,p,d5,p,c5,p,g,a,p,a,d5,p,c5,8p.,a,p,d5,p,c5,p,g,a,p,a,d5,p,c5,8p.,a,p,d5,p,c5,p,g,a,p,a,d5,p,c5,8p.,a,p,d5,p,c5,p,g,a,p,a,d5,p,c5,8p.,2c,8c"
]
},
{
"name": "Future - Mask off",
"tracks": [
"mask_off:d=4,o=5,b=200:2e,8g,8b,8g,1a,8b,8a,8g,4f#,4e,8d,8b4,1e",
"mask_off:d=4,o=5,b=200:1e2,8p,1a2,8p,1d2,32p,1e2",
"mask_off:d=4,o=5,b=200:1e3,8p,1a3,8p,1d3,32p,1e3",
"mask_off:d=4,o=5,b=200:2e6,8g6,8b6,8g6,1a6,8b6,8a6,8g6,4f#6,4e6,8d6,8b,1e6"
]
},
{
"name": "Guns n Roses - Sweet Child O Mine",
"tracks": [
Expand Down Expand Up @@ -386,6 +404,13 @@
"Kalyna:b=260,o=5,d=4:f,p,f,p,g#,g#,p,f,g,g#,g,f,2e,2c,2f,f,g,2g#,2g,1f,p,p,p"
]
},
{
"name": "Ой у лузі червона калина (Ukrainian Patriotic Song - Polyphonic)",
"tracks": [
"kalyna:d=4,o=5,b=260: 4d6,4p, 4d6, 4p, 2f6, 4p, 4d6, 4e6, 4f6, 4e6, 4d6,4c#6, 4p, 4a5,4p, 2d6,4p, 4e6,4f6, 4p, 4e6, 4p, 4d6",
"kalyna:d=4,o=5,b=260: 4d4, 4f4,4d4, 4f4,4d4, 4f4,4d4, 4f4, 4e4, 4g4,4e4, 4g4, 4a4,4c#,4a4,4c#, 4d4, 4f4,4d4, 4f4, 4c4, 4e4,4c4, 4e4,4d4, 4f4,4d4, 4f4"
]
},
{
"name": "Owl City - Fireflies",
"tracks": [
Expand All @@ -404,6 +429,12 @@
"pacman4:d=32,o=5,b=112:c#,p,c#6,p,g#,p,f,p,c#6,g#,16p,16f.,p,d,p,d6,p,a,p,f#,p,d6,a,16p,16f#.,p,c#,p,c#6,p,g#,p,f,p,c#6,g#,16p,16f.,p,e,f,f#,p,f#,g,g#,p,g#,a,a#,p,16c#6"
]
},
{
"name": "Peppa Pig - Theme",
"tracks": [
"PeppaPig:b=300,o=5,d=4:g,p,e,c,d,p,g4,p,g4,b4,d,f,e,p,c,p"
]
},
{
"name": "Perfume - Glitter",
"tracks": [
Expand Down Expand Up @@ -503,6 +534,15 @@
"PushIt:d=8,o=5,b=165:a,p,e,a,p,e,p,g,p,e,p,e,b,c6,b,g,a,p,e,a,p,e,p,g,p,e,p,e,b,c6,b,g,a,p,e6,d6,p,c6,p,b,p,g,p,g,b,c6,b,g,a"
]
},
{
"name": "Sea of Thieves - Maiden Voyage",
"tracks": [
"Melody:b=125,o=5,d=4:d,8p,16d,16e,f#,8e,16e,16d,e,a,p,16g,16f#,8e,d,16f#,8p,16a,b,8a,8p,2e,e",
"Melody:b=125,o=4,d=4:p,d,8p,32d,32p,32a3,32p,8d,8p,p,16c#,16p,32a3,32p,32c#,32p,a3,2p,d,p,8e,8p,p,16a3,16p,32a3,32p,32a3,32p,8a3,8p",
"Melody:b=125,o=6,d=4:d,8p,16d,16e,f#,8e,16e,16d,e,a,p,16g,16f#,8e,d,16f#,8p,16a,b,8a,8p,2e,e",
"Melody:b=125,o=4,d=4:p,a3,8p,32a3,32p,32d,32p,a3,p,16a3,16p,32c#,32p,32a3,32p,c#,p,p,a3,p,8a3,8p,p,16c#,16p,32c#,32p,32c#,32p,8c#,8p"
]
},
{
"name": "Shaun the Sheep - Theme",
"tracks": [
Expand Down Expand Up @@ -633,6 +673,12 @@
"ts_hof_b:b=85,o=3,d=1:8g,8d4,8g4,4d#,8a#,4d#4,8a#,8f4,8a#4,4f,8c4,4f4"
]
},
{
"name": "T-Motor Default",
"tracks": [
"tmotor:b=130,o=5,d=8:c,16f,16e,f,e,4c"
]
},
{
"name": "Tristam - Till It's Over",
"tracks": [
Expand Down
4 changes: 4 additions & 0 deletions src/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"label": "Polski",
"value": "pl"
},
{
"label": "Русский",
"value": "ru"
},
{
"label": "Українська",
"value": "uk"
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
1 change: 1 addition & 0 deletions src/sources/AM32/eeprom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const BOOT_LOADER_PINS = {
PA2: 0x02,
PB4: 0x14,
PA6: 0x06,
};

const RESET_DELAY_MS = 5000;
Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -40,7 +40,7 @@ class AM32Source extends GithubSource {
const settings = flash.settings;
let revision = 'Unsupported/Unrecognized';
if(settings.MAIN_REVISION !== undefined && settings.SUB_REVISION !== undefined) {
revision = `${settings.MAIN_REVISION}.${settings.SUB_REVISION}`;
revision = `${settings.MAIN_REVISION}.${settings.SUB_REVISION > 9 ? '' : '0'}${settings.SUB_REVISION}`;
}

if(make === 'NOT READY') {
Expand Down
6 changes: 3 additions & 3 deletions src/sources/Bluejay/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ describe('Bluejay', () => {
expect(name).toEqual('MAKE - Bluejay, 0.20.0, Dynamic PWM');
});

it('should return a list of PWM for versions < v0.21.0', () => {
it('should return a list of PWM for versions < v0.22.0', () => {
const frequencies = source.getPwm('v0.10.0');
expect(frequencies.length).toEqual(3);
});

it('should return an empty list for versions >= v0.21.0', () => {
const frequencies = source.getPwm('v0.21.0');
it('should return an empty list for versions >= v0.22.0', () => {
const frequencies = source.getPwm('v0.22.0');
expect(frequencies.length).toEqual(0);
});

Expand Down
4 changes: 2 additions & 2 deletions src/sources/Bluejay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class BluejaySource extends GithubSource {
}

getPwm(version) {
// Before v0.21.0 PWM was a build time option and should be selectable
// Before v0.22.0 PWM was a build time option and should be selectable
// in the firmware selector.
if(semver.lt(version, '0.21.0')) {
if(semver.lt(version, '0.22.0')) {
return [24, 48, 96];
}

Expand Down
19 changes: 9 additions & 10 deletions src/sources/Bluejay/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,30 +429,28 @@ COMMON['209'] = {
}],
},
{
name: 'THRESHOLD_48to24',
name: 'THRESHOLD_96to48',
type: 'number',
min: 0,
max: 255,
step: 1,
displayFactor: 100 / 255,
label: '48to24Threshold',
label: '96to48Threshold',
visibleIf: (settings) => ('PWM_FREQUENCY' in settings) && (parseInt(settings.PWM_FREQUENCY, 10) === 0),
sanitize: (value, settings) => {
if(value > settings.THRESHOLD_96to48) {
return settings.THRESHOLD_96to48;
sanitize: (settings) => {
if(settings.THRESHOLD_96to48 > settings.THRESHOLD_48to24) {
return { THRESHOLD_96to48: settings.THRESHOLD_48to24 };
}

return value;
return {};
},
},
{
name: 'THRESHOLD_96to48',
name: 'THRESHOLD_48to24',
type: 'number',
min: 0,
max: 255,
step: 1,
displayFactor: 100 / 255,
label: '96to48Threshold',
label: '48to24Threshold',
visibleIf: (settings) => ('PWM_FREQUENCY' in settings) && (parseInt(settings.PWM_FREQUENCY, 10) === 0),
},
],
Expand Down Expand Up @@ -608,6 +606,7 @@ DEFAULTS['209'] = { // v0.22
...DEFAULTS['208'],
PWM_FREQUENCY: 24,
STARTUP_MELODY_WAIT_MS: 0,
THRESHOLD_96to48: 85,
THRESHOLD_48to24: 170,
};

Expand Down
2 changes: 1 addition & 1 deletion src/translations/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"disabled": "Disabled",
"selectionAttention": "Attention!",
"selectionHint": "When flashing new (or different) ESC firmware it is best practice to adhere to the following checklist:",
"selectionLi1": "Read the relese notes to understand what changed and what you might need to adjust",
"selectionLi1": "Read the release notes to understand what changed and what you might need to adjust",
"selectionLi2": "Make sure your motors spin up reliably on arm and in the correct direction",
"selectionLi3": "Check motor temperatures after a short test flight and adjust tune if they are too hot",
"selectionLinkText": "Show release notes on Github"
Expand Down
Loading

0 comments on commit ef0c148

Please sign in to comment.