Skip to content

Commit

Permalink
Add missing AUTO_WIFI_ON_INTERVAL user define
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgelenas committed Apr 22, 2021
1 parent cf0f578 commit 2b55af3
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 0 deletions.
6 changes: 6 additions & 0 deletions graphql.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,12 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "AUTO_WIFI_ON_INTERVAL",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "USE_ESP8266_BACKPACK",
"description": null,
Expand Down
4 changes: 4 additions & 0 deletions src/api/src/factories/TargetUserDefinesFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default class TargetUserDefinesFactory {
UserDefine.Boolean(UserDefineKey.USE_500HZ),
// other options
UserDefine.Boolean(UserDefineKey.AUTO_WIFI_ON_BOOT),
UserDefine.Text(UserDefineKey.AUTO_WIFI_ON_INTERVAL, '20', true),
];
const NamimnoRC_FLASH_2400_ESP_RX: UserDefine[] = [
// regulatory options
Expand Down Expand Up @@ -137,6 +138,7 @@ export default class TargetUserDefinesFactory {
UserDefine.Boolean(UserDefineKey.LOCK_ON_FIRST_CONNECTION, true),
// other options
UserDefine.Boolean(UserDefineKey.AUTO_WIFI_ON_BOOT),
UserDefine.Text(UserDefineKey.AUTO_WIFI_ON_INTERVAL, '20', true),
];

const NeutronRC_900_RX: UserDefine[] = [
Expand Down Expand Up @@ -480,6 +482,7 @@ export default class TargetUserDefinesFactory {
UserDefine.Boolean(UserDefineKey.LOCK_ON_FIRST_CONNECTION, true),
// other options
UserDefine.Boolean(UserDefineKey.AUTO_WIFI_ON_BOOT),
UserDefine.Text(UserDefineKey.AUTO_WIFI_ON_INTERVAL, '20', true),
];

const DIY_2400_TX_ESP32_SX1280_Mini: UserDefine[] = [
Expand Down Expand Up @@ -632,6 +635,7 @@ export default class TargetUserDefinesFactory {
UserDefine.Boolean(UserDefineKey.USE_500HZ),
// other options
UserDefine.Boolean(UserDefineKey.AUTO_WIFI_ON_BOOT),
UserDefine.Text(UserDefineKey.AUTO_WIFI_ON_INTERVAL, '20', true),
];

const DIY_2400_RX_STM32_CCG_Nano_v0_5: UserDefine[] = [
Expand Down
1 change: 1 addition & 0 deletions src/api/src/library/FirmwareBuilder/Enum/UserDefineKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ enum UserDefineKey {
USE_R9MM_R9MINI_SBUS = 'DUSE_R9MM_R9MINI_SBUS',
// Other options
AUTO_WIFI_ON_BOOT = 'DAUTO_WIFI_ON_BOOT',
AUTO_WIFI_ON_INTERVAL = 'DAUTO_WIFI_ON_INTERVAL',
USE_ESP8266_BACKPACK = 'DUSE_ESP8266_BACKPACK',
JUST_BEEP_ONCE = 'DJUST_BEEP_ONCE',
MY_STARTUP_MELODY = 'DMY_STARTUP_MELODY',
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/DeviceOptionsForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const userDefinesToCategories = (
],
[UserDefineCategory.OtherOptions]: [
UserDefineKey.AUTO_WIFI_ON_BOOT,
UserDefineKey.AUTO_WIFI_ON_INTERVAL,
UserDefineKey.USE_ESP8266_BACKPACK,
UserDefineKey.JUST_BEEP_ONCE,
UserDefineKey.MY_STARTUP_MELODY,
Expand Down
24 changes: 24 additions & 0 deletions src/ui/components/UserDefineDescription/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,30 @@ const UserDefineDescription: FunctionComponent<UserDefineDescriptionProps> = mem
</p>
</div>
);
case UserDefineKey.AUTO_WIFI_ON_INTERVAL:
return (
<div>
<p>
This will automatically turn the wifi on for any module that has
an ESP8285 on it if no connection is found after set amount of
seconds from boot. This enables pushing firmware updates to the
RX by connecting to its wifi network and visiting 10.0.0.1
</p>
<p>
Wifi internal is defined in <strong>seconds</strong>. Default is
20 seconds.
</p>
<p>
<a
target="_blank"
rel="noreferrer noreferrer"
href="https://github.com/ExpressLRS/ExpressLRS/wiki/User-Defines#other-options"
>
Check our Wiki page for latest definition.
</a>
</p>
</div>
);
case UserDefineKey.FAST_SYNC:
return (
<div>
Expand Down
1 change: 1 addition & 0 deletions src/ui/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export enum UserDefineKey {
UART_INVERTED = 'UART_INVERTED',
USE_R9MM_R9MINI_SBUS = 'USE_R9MM_R9MINI_SBUS',
AUTO_WIFI_ON_BOOT = 'AUTO_WIFI_ON_BOOT',
AUTO_WIFI_ON_INTERVAL = 'AUTO_WIFI_ON_INTERVAL',
USE_ESP8266_BACKPACK = 'USE_ESP8266_BACKPACK',
JUST_BEEP_ONCE = 'JUST_BEEP_ONCE',
MY_STARTUP_MELODY = 'MY_STARTUP_MELODY',
Expand Down

0 comments on commit 2b55af3

Please sign in to comment.