Skip to content

Commit

Permalink
Merge pull request #14 from FreeSK8/0.18.1
Browse files Browse the repository at this point in the history
0.18.1
  • Loading branch information
r3n33 authored Aug 12, 2021
2 parents 8968a98 + f918451 commit d501f1a
Show file tree
Hide file tree
Showing 19 changed files with 727 additions and 175 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
v0.18.1

* Fixed UART Input Configuration
* Updated Help & Support links
* Updated FreeSK8 Mobile graphics
* Updated GPS route colors
* Improved Ride Merge process
* Improved exception handling
* Display dialog with Data Import/Export processes
* Confirm switch to GPS metrics
* Other fixes and improvements

v0.18.0

* Added Vehicle Manager
Expand Down
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
android:name="io.flutter.app.FlutterApplication"
android:label="FreeSK8"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyCsIGgpekUPDXwYhEhbUDxGuZSf33yQQxI"/>
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
Expand Down
Binary file added assets/FreeSK8_Icon_Dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/FreeSK8_Mobile.jpg
Binary file not shown.
Binary file added assets/FreeSK8_Mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/FreeSK8_MobileLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/FreeSK8.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 29;
CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = VPZR953W7D;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -418,7 +418,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.17.1;
MARKETING_VERSION = 0.18.1;
PRODUCT_BUNDLE_IDENTIFIER = com.derelictrobot.freesk8mobile;
PRODUCT_NAME = FreeSK8;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -543,7 +543,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/FreeSK8.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 29;
CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = VPZR953W7D;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -557,7 +557,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.17.1;
MARKETING_VERSION = 0.18.1;
PRODUCT_BUNDLE_IDENTIFIER = com.derelictrobot.freesk8mobile;
PRODUCT_NAME = FreeSK8;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -577,7 +577,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/FreeSK8.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 29;
CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = VPZR953W7D;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -591,7 +591,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.17.1;
MARKETING_VERSION = 0.18.1;
PRODUCT_BUNDLE_IDENTIFIER = com.derelictrobot.freesk8mobile;
PRODUCT_NAME = FreeSK8;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
116 changes: 116 additions & 0 deletions lib/components/smartSlider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

import 'package:flutter/material.dart';

///
/// A slider that doesn't shit it's pants when you give a value outside min<>max :tada:
///
class SmartSlider extends Slider {

const SmartSlider({
@required this.value,
@required this.onChanged,
@required this.mini, //TODO: super().assert(value >= min && value <= max) will fail without renaming
@required this.maxi, //TODO: Discover a way to use min/max without failing super()'s assert
this.divisions,
@required this.label,
})
: assert(value != null),
assert(mini != null),
assert(maxi != null),
assert(mini <= maxi),
assert(divisions == null || divisions > 0),
super(
value: value,
onChanged: onChanged,
min: mini < value ? mini : value,
max: maxi > value ? maxi : value,
divisions: divisions,
label: label
);

/// The currently selected value for this slider.
///
/// The slider's thumb is drawn at a position that corresponds to this value.
final double value;

/// Called during a drag when the user is selecting a new value for the slider
/// by dragging.
///
/// The slider passes the new value to the callback but does not actually
/// change state until the parent widget rebuilds the slider with the new
/// value.
///
/// If null, the slider will be displayed as disabled.
///
/// The callback provided to onChanged should update the state of the parent
/// [StatefulWidget] using the [State.setState] method, so that the parent
/// gets rebuilt; for example:
///
/// {@tool snippet}
///
/// ```dart
/// Slider(
/// value: _duelCommandment.toDouble(),
/// min: 1.0,
/// max: 10.0,
/// divisions: 10,
/// label: '$_duelCommandment',
/// onChanged: (double newValue) {
/// setState(() {
/// _duelCommandment = newValue.round();
/// });
/// },
/// )
/// ```
/// {@end-tool}
///
/// See also:
///
/// * [onChangeStart] for a callback that is called when the user starts
/// changing the value.
/// * [onChangeEnd] for a callback that is called when the user stops
/// changing the value.
final ValueChanged<double> onChanged;

/// The minimum value the user can select.
///
/// Defaults to 0.0. Must be less than or equal to [maxi].
///
/// If the [maxi] is equal to the [mini], then the slider is disabled.
final double mini;

/// The maximum value the user can select.
///
/// Defaults to 1.0. Must be greater than or equal to [mini].
///
/// If the [maxi] is equal to the [mini], then the slider is disabled.
final double maxi;

/// The number of discrete divisions.
///
/// Typically used with [label] to show the current discrete value.
///
/// If null, the slider is continuous.
final int divisions;

/// A label to show above the slider when the slider is active.
///
/// It is used to display the value of a discrete slider, and it is displayed
/// as part of the value indicator shape.
///
/// The label is rendered using the active [ThemeData]'s [TextTheme.bodyText1]
/// text style, with the theme data's [ColorScheme.onPrimary] color. The
/// label's text style can be overridden with
/// [SliderThemeData.valueIndicatorTextStyle].
///
/// If null, then the value indicator will not be displayed.
///
/// Ignored if this slider is created with [Slider.adaptive].
///
/// See also:
///
/// * [SliderComponentShape] for how to create a custom value indicator
/// shape.
final String label;

}
4 changes: 2 additions & 2 deletions lib/components/userSettings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Future<File> exportSettings(String filePath) async {
List<String> knownDevices = prefs.getStringList('knownDevices');
for (int i=0; i<knownDevices.length; ++i) {
await settings.loadSettings(knownDevices[i]);
globalLogger.wtf(settings.settings.toString());
//globalLogger.wtf(settings.settings.toString());
exportFile.writeAsBytesSync(utf8.encode(settings.settings.toString()), mode: FileMode.append);
if (i!=knownDevices.length-1) {
exportFile.writeAsStringSync(",", mode: FileMode.append);
Expand All @@ -307,7 +307,7 @@ Future<bool> importSettings(String filePath) async {
globalLogger.e("importSettings: version mismatch: expected 0 received: ${value['version']}");
return false;
}
globalLogger.wtf(value);
//globalLogger.wtf(value);
UserSettings importSettings = UserSettings();
await importSettings.loadSettings(value['deviceID']);
importSettings.settings.motorPoles = value['motorPoles'];
Expand Down
49 changes: 49 additions & 0 deletions lib/globalUtilities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,55 @@ import 'package:path/path.dart' as path;

import 'package:latlong/latlong.dart';

class Dialogs {
static Future<void> showPleaseWaitDialog(
BuildContext context, GlobalKey key) async {
return showDialog<void>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return new WillPopScope(
onWillPop: () async => false,
child: SimpleDialog(
key: key,
backgroundColor: Colors.black54,
children: <Widget>[
Center(
child: Column(children: [
Icon(Icons.watch_later, size: 80,),
SizedBox(height: 10,),
Text("Please Wait....")
]),
)
]));
});
}

static Future<void> showFOCDialog(
BuildContext context, GlobalKey key) async {
return showDialog<void>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return new WillPopScope(
onWillPop: () async => false,
child: SimpleDialog(
key: key,
backgroundColor: Colors.black54,
children: <Widget>[
Center(
child: Column(children: [
Icon(Icons.watch_later, size: 80,),
SizedBox(height: 10,),
Text("Please Wait...."),
Text("Be sure the wheels are off the ground!")
]),
)
]));
});
}
}

double calculateGPSDistance(LatLng pointA, LatLng pointB){
var p = 0.017453292519943295;
var c = cos;
Expand Down
Loading

0 comments on commit d501f1a

Please sign in to comment.