Skip to content

Commit

Permalink
2023.48.1
Browse files Browse the repository at this point in the history
Remove the wifi hotspot switch, update display resize alignment
  • Loading branch information
mikegapinski committed Dec 3, 2023
1 parent 863f6e5 commit b352978
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 82 deletions.
4 changes: 2 additions & 2 deletions lib/feature/display/cubit/display_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class DisplayCubit extends Cubit<DisplayState> with Logger {
double bestHeight = maxHeight;
double minEmptySpace = maxWidth * maxHeight;

for (double height = maxHeight; height >= 320; height -= 16) {
for (double height = maxHeight; height >= 320; height -= 32) {
double width = height * aspectRatio;

if (width > maxWidth) {
Expand All @@ -223,7 +223,7 @@ class DisplayCubit extends Cubit<DisplayState> with Logger {
continue;
}

width = (width ~/ 16) * 16;
width = (width ~/ 32) * 32;

double emptySpace = (maxWidth - width) * (maxHeight - height);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,24 @@ import 'package:tesla_android/feature/releaseNotes/model/version.dart';
class ReleaseNotesRepository {
static const ReleaseNotes _releaseNotes = ReleaseNotes(versions: [
Version(
versionName: "2023.42.1",
versionName: "2023.48.1",
changelogItems: [
ChangelogItem(
title: "Wi-Fi Hotspot",
shortDescription: "Bugfix",
descriptionMarkdown:
"Some users unintentionally disabled the Hotspot without using a 3rd party router. The ability to disable the broadcasting has been removed in this version since it does not make a lot of sense with the current networking setup that does not rely on using a public IP range in the DHCP server.",
),
ChangelogItem(
title: "Android Platform",
shortDescription: "Security improvements",
descriptionMarkdown:
"The platform has been updated to the latest Android 13 release",
),
],
),
Version(
versionName: "2023.45.1",
changelogItems: [
ChangelogItem(
title: "SSL certificate reneval",
Expand Down
155 changes: 77 additions & 78 deletions lib/feature/settings/widget/hotspot_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,89 +70,88 @@ class HotspotSettings extends SettingsSection {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// SettingsTile(
// icon: Icons.wifi,
// title: 'Wi-Fi Hotspot',
// subtitle:
// 'Disable only if you use and external router and you don\'t need the Tesla Android Wi-Fi network',
// trailing: Switch(
// value: isSoftApEnabled,
// onChanged: (value) {
// cubit.updateSoftApState(value);
// })),
// divider,

SettingsTile(
icon: Icons.wifi_channel,
title: 'Frequency band',
trailing: DropdownButton<SoftApBandType>(
value: selectedBand,
icon: const Icon(Icons.arrow_drop_down_outlined),
underline: Container(
height: 2,
color: Theme.of(context).primaryColor,
),
onChanged: (SoftApBandType? value) {
if (value != null) {
cubit.updateSoftApBand(value);
}
},
items: SoftApBandType.values
.map<DropdownMenuItem<SoftApBandType>>(
(SoftApBandType value) {
return DropdownMenuItem<SoftApBandType>(
value: value,
child: Text(value.name),
);
}).toList(),
)),
const Padding(
padding: EdgeInsets.all(TADimens.PADDING_S_VALUE),
child: Text(
'The utilization of the 5 GHz operation mode enhances the performance of the Tesla Android system while effectively resolving Bluetooth-related challenges. This mode is anticipated to be designated as the default option in a future versions.\n\nConversely, when operating on the 2.4 GHz frequency, the allocation of resources between the hotspot and Bluetooth can lead to dropped frames, particularly when utilizing AD2P audio.'),
),
divider,
SettingsTile(
icon: Icons.wifi,
title: 'Wi-Fi Hotspot',
subtitle:
'Disable only if you use and external router and you don\'t need the Tesla Android Wi-Fi network',
icon: Icons.wifi_off,
title: 'Offline mode',
subtitle: 'Persistent Wi-Fi connection',
trailing: Switch(
value: isSoftApEnabled,
value: isOfflineModeEnabled,
onChanged: (value) {
cubit.updateSoftApState(value);
cubit.updateOfflineModeState(value);
})),
divider,
if (isSoftApEnabled) ...[
SettingsTile(
icon: Icons.wifi_channel,
title: 'Frequency band',
trailing: DropdownButton<SoftApBandType>(
value: selectedBand,
icon: const Icon(Icons.arrow_drop_down_outlined),
underline: Container(
height: 2,
color: Theme.of(context).primaryColor,
),
onChanged: (SoftApBandType? value) {
if (value != null) {
cubit.updateSoftApBand(value);
}
},
items: SoftApBandType.values
.map<DropdownMenuItem<SoftApBandType>>(
(SoftApBandType value) {
return DropdownMenuItem<SoftApBandType>(
value: value,
child: Text(value.name),
);
}).toList(),
)),
const Padding(
padding: EdgeInsets.all(TADimens.PADDING_S_VALUE),
child: Text(
'The utilization of the 5 GHz operation mode enhances the performance of the Tesla Android system while effectively resolving Bluetooth-related challenges. This mode is anticipated to be designated as the default option in a future versions.\n\nConversely, when operating on the 2.4 GHz frequency, the allocation of resources between the hotspot and Bluetooth can lead to dropped frames, particularly when utilizing AD2P audio.'),
),
divider,
SettingsTile(
icon: Icons.wifi_off,
title: 'Offline mode',
subtitle: 'Persistent Wi-Fi connection',
trailing: Switch(
value: isOfflineModeEnabled,
onChanged: (value) {
cubit.updateOfflineModeState(value);
})),
divider,
const Padding(
padding: EdgeInsets.all(TADimens.PADDING_S_VALUE),
child: Text(
'To ensure continuous internet access, your Tesla vehicle relies on Wi-Fi networks that have an active internet connection. However, if you encounter a situation where Wi-Fi connectivity is unavailable, there is a solution called "offline mode" to address this limitation. In offline mode, certain features like Tesla Mobile App access and other car-side functionalities that rely on internet connectivity will be disabled. To overcome this limitation, you can establish internet access in your Tesla Android setup by using an LTE Modem or enabling tethering.'),
),
divider,
SettingsTile(
icon: Icons.data_thresholding_sharp,
title: 'Tesla Telemetry',
subtitle: 'Reduces data usage, uncheck to disable',
trailing: Switch(
value: isOfflineModeTelemetryEnabled,
onChanged: (value) {
cubit.updateOfflineModeTelemetryState(value);
})),
divider,
SettingsTile(
icon: Icons.update,
title: 'Tesla Software Updates',
subtitle: 'Reduces data usage, uncheck to disable',
trailing: Switch(
value: isOfflineModeTeslaFirmwareDownloadsEnabled,
onChanged: (value) {
cubit.updateOfflineModeTeslaFirmwareDownloadsState(value);
})),
const Padding(
padding: EdgeInsets.all(TADimens.PADDING_S_VALUE),
child: Text(
'Your car will still be able to check the availability of new updates. With this option enabled they won\'t immediately start downloading'),
),
],
const Padding(
padding: EdgeInsets.all(TADimens.PADDING_S_VALUE),
child: Text(
'To ensure continuous internet access, your Tesla vehicle relies on Wi-Fi networks that have an active internet connection. However, if you encounter a situation where Wi-Fi connectivity is unavailable, there is a solution called "offline mode" to address this limitation. In offline mode, certain features like Tesla Mobile App access and other car-side functionalities that rely on internet connectivity will be disabled. To overcome this limitation, you can establish internet access in your Tesla Android setup by using an LTE Modem or enabling tethering.'),
),
divider,
SettingsTile(
icon: Icons.data_thresholding_sharp,
title: 'Tesla Telemetry',
subtitle: 'Reduces data usage, uncheck to disable',
trailing: Switch(
value: isOfflineModeTelemetryEnabled,
onChanged: (value) {
cubit.updateOfflineModeTelemetryState(value);
})),
divider,
SettingsTile(
icon: Icons.update,
title: 'Tesla Software Updates',
subtitle: 'Reduces data usage, uncheck to disable',
trailing: Switch(
value: isOfflineModeTeslaFirmwareDownloadsEnabled,
onChanged: (value) {
cubit.updateOfflineModeTeslaFirmwareDownloadsState(value);
})),
const Padding(
padding: EdgeInsets.all(TADimens.PADDING_S_VALUE),
child: Text(
'Your car will still be able to check the availability of new updates. With this option enabled they won\'t immediately start downloading'),
),
],
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Tesla Android

publish_to: 'none'

version: 2023.45.1
version: 2023.48.1

environment:
flutter: "3.13.3"
Expand Down

0 comments on commit b352978

Please sign in to comment.