Skip to content

Commit f5fb0fe

Browse files
authored
Merge pull request #737 from ExpressLRS/remove-manual-user-defines
Remove manual user defines mode
2 parents fc46caf + e9fcf6f commit f5fb0fe

File tree

23 files changed

+154
-580
lines changed

23 files changed

+154
-580
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
os: ['ubuntu-22.04', 'windows-2019', 'macos-13']
10+
os: ['ubuntu-22.04', 'windows-2022', 'macos-13']
1111
steps:
1212
- name: Setup apt dependencies
1313
if: matrix.os == 'ubuntu-22.04'
@@ -37,7 +37,7 @@ jobs:
3737
yarn install --prefer-offline --network-timeout 180000
3838
3939
- name: Publish Windows releases
40-
if: matrix.os == 'windows-2019'
40+
if: matrix.os == 'windows-2022'
4141
shell: powershell
4242
env:
4343
# These values are used for auto updates signing

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
os: ['ubuntu-22.04', 'windows-2019', 'macos-latest']
18+
os: ['ubuntu-22.04', 'windows-2022', 'macos-latest']
1919

2020
steps:
2121
- name: Setup apt dependencies

graphql.schema.json

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@
8787
"isDeprecated": false,
8888
"deprecationReason": null
8989
},
90-
{
91-
"name": "BUILDING_USER_DEFINES",
92-
"description": null,
93-
"isDeprecated": false,
94-
"deprecationReason": null
95-
},
9690
{
9791
"name": "DOWNLOADING_FIRMWARE",
9892
"description": null,
@@ -235,38 +229,6 @@
235229
"defaultValue": "[]",
236230
"isDeprecated": false,
237231
"deprecationReason": null
238-
},
239-
{
240-
"name": "userDefinesMode",
241-
"description": null,
242-
"type": {
243-
"kind": "NON_NULL",
244-
"name": null,
245-
"ofType": {
246-
"kind": "ENUM",
247-
"name": "UserDefinesMode",
248-
"ofType": null
249-
}
250-
},
251-
"defaultValue": "UserInterface",
252-
"isDeprecated": false,
253-
"deprecationReason": null
254-
},
255-
{
256-
"name": "userDefinesTxt",
257-
"description": null,
258-
"type": {
259-
"kind": "NON_NULL",
260-
"name": null,
261-
"ofType": {
262-
"kind": "SCALAR",
263-
"name": "String",
264-
"ofType": null
265-
}
266-
},
267-
"defaultValue": "\"\"",
268-
"isDeprecated": false,
269-
"deprecationReason": null
270232
}
271233
],
272234
"interfaces": null,
@@ -3572,29 +3534,6 @@
35723534
],
35733535
"possibleTypes": null
35743536
},
3575-
{
3576-
"kind": "ENUM",
3577-
"name": "UserDefinesMode",
3578-
"description": null,
3579-
"fields": null,
3580-
"inputFields": null,
3581-
"interfaces": null,
3582-
"enumValues": [
3583-
{
3584-
"name": "Manual",
3585-
"description": null,
3586-
"isDeprecated": false,
3587-
"deprecationReason": null
3588-
},
3589-
{
3590-
"name": "UserInterface",
3591-
"description": null,
3592-
"isDeprecated": false,
3593-
"deprecationReason": null
3594-
}
3595-
],
3596-
"possibleTypes": null
3597-
},
35983537
{
35993538
"kind": "OBJECT",
36003539
"name": "__Directive",

src/api/src/graphql/inputs/BuildFlashFirmwareInput.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Field, InputType } from 'type-graphql';
22
import BuildJobType from '../../models/enum/BuildJobType';
33
import FirmwareVersionDataInput from './FirmwareVersionDataInput';
4-
import UserDefinesMode from '../../models/enum/UserDefinesMode';
54
import UserDefineInput from './UserDefineInput';
65

76
@InputType('BuildFlashFirmwareInput')
@@ -18,15 +17,9 @@ export default class BuildFlashFirmwareInput {
1817
@Field(() => String)
1918
target: string;
2019

21-
@Field(() => UserDefinesMode)
22-
userDefinesMode: UserDefinesMode;
23-
2420
@Field(() => [UserDefineInput])
2521
userDefines: UserDefineInput[];
2622

27-
@Field(() => String)
28-
userDefinesTxt: string;
29-
3023
@Field(() => Boolean)
3124
erase: boolean;
3225

@@ -37,9 +30,7 @@ export default class BuildFlashFirmwareInput {
3730
this.type = BuildJobType.Build;
3831
this.firmware = new FirmwareVersionDataInput();
3932
this.target = 'DIY_2400_TX_ESP32_SX1280_E28_via_UART';
40-
this.userDefinesMode = UserDefinesMode.UserInterface;
4133
this.userDefines = [];
42-
this.userDefinesTxt = '';
4334
this.erase = false;
4435
this.forceFlash = false;
4536
}

src/api/src/graphql/inputs/BuildUserDefinesTxtInput.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/api/src/graphql/objects/BuilduserDefinesTxtResult.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/api/src/graphql/resolvers/Firmware.resolver.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ import FlashingStrategyLocatorService from '../../services/FlashingStrategyLocat
2424
import { BuildProgressNotificationPayload } from '../../services/FlashingStrategyLocator/BuildProgressNotificationPayload';
2525
import { BuildLogUpdatePayload } from '../../services/FlashingStrategyLocator/BuildLogUpdatePayload';
2626
import Platformio from '../../library/Platformio';
27-
import BuildUserDefinesTxtInput from '../inputs/BuildUserDefinesTxtInput';
28-
import BuildUserDefinesTxtResult from '../objects/BuilduserDefinesTxtResult';
29-
import UserDefinesTxtFactory from '../../factories/UserDefinesTxtFactory';
3027

3128
@Service()
3229
@Resolver()
@@ -72,15 +69,6 @@ export default class FirmwareResolver {
7269
return strategy.buildFlashFirmware(input, gitRepository);
7370
}
7471

75-
@Mutation(() => BuildUserDefinesTxtResult)
76-
async buildUserDefinesTxt(
77-
@Arg('input', () => BuildUserDefinesTxtInput)
78-
input: BuildUserDefinesTxtInput
79-
): Promise<BuildUserDefinesTxtResult> {
80-
const userDefinesTxt = new UserDefinesTxtFactory().build(input.userDefines);
81-
return new BuildUserDefinesTxtResult(userDefinesTxt);
82-
}
83-
8472
@Mutation(() => ClearPlatformioCoreDirResult)
8573
async clearPlatformioCoreDir(): Promise<ClearPlatformioCoreDirResult> {
8674
try {

src/api/src/models/enum/FirmwareBuildStep.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { registerEnumType } from 'type-graphql';
33
enum BuildFirmwareStep {
44
VERIFYING_BUILD_SYSTEM = 'VERIFYING_BUILD_SYSTEM',
55
DOWNLOADING_FIRMWARE = 'DOWNLOADING_FIRMWARE',
6-
BUILDING_USER_DEFINES = 'BUILDING_USER_DEFINES',
76
BUILDING_FIRMWARE = 'BUILDING_FIRMWARE',
87
FLASHING_FIRMWARE = 'FLASHING_FIRMWARE',
98
}

src/api/src/models/enum/UserDefinesMode.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import UserDefineKey from '../../../library/FirmwareBuilder/Enum/UserDefineKey';
55
import { NoOpFunc, OnOutputFunc } from '../../../library/Commander';
66
import Python from '../../../library/Python';
77
import { LoggerService } from '../../../logger';
8-
import UserDefinesMode from '../../../models/enum/UserDefinesMode';
98

109
const maskSensitiveFlags = (data: string[][]): string[][] => {
1110
const sensitiveData = ['--phrase', '--ssid', '--password'];
@@ -57,9 +56,7 @@ export default class BinaryConfigurator {
5756
flags.push(['--tx']);
5857
}
5958

60-
if (params.userDefinesMode === UserDefinesMode.UserInterface) {
61-
flags.push(...this.userDefinesToFlags(params.userDefines));
62-
}
59+
flags.push(...this.userDefinesToFlags(params.userDefines));
6360

6461
if (params.forceFlash) {
6562
flags.push(['--force']);

0 commit comments

Comments
 (0)