Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# WheelLogAndroid

One more try to make it working with Inmotion V8
Updated Gradle configuration to compile with Gradle 4.4, still a few deprecated statements in there

Added support for Samsung Gear Tizen based watches
Fixed the Gotway 84V indication issue, the preference change was not processed

Moved the MCM ratio fix for newer MCMs from MainActivity to preference-change processing

Inmotion V8 comms might still be broken, I have no wheel to try it


Pebble app code
Expand Down
10 changes: 6 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
//buildToolsVersion "25.0.0"

lintOptions {
abortOnError false
}

defaultConfig {
applicationId "com.cooper.wheellog"
vectorDrawables.useSupportLibrary = true
minSdkVersion 18
targetSdkVersion 25
versionCode 34
versionName "2.0.5"
versionName "2.0.6"
}
buildTypes {
release {
Expand All @@ -23,7 +24,7 @@ android {
}
}

apply plugin: 'android-apt'
//apply plugin: 'android-apt'

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
Expand All @@ -36,5 +37,6 @@ dependencies {
compile 'com.pavelsikun:material-seekbar-preference:2.3.0+'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.0'
compile "com.github.hotchemi:permissionsdispatcher:2.2.0"
apt "com.github.hotchemi:permissionsdispatcher-processor:2.2.0"
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.2.0'
//apt "com.github.hotchemi:permissionsdispatcher-processor:2.2.0"
}
2 changes: 0 additions & 2 deletions app/src/main/java/com/cooper/wheellog/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,6 @@ private void loadPreferences() {
wheelView.invalidate();

boolean alarms_enabled = sharedPreferences.getBoolean(getString(R.string.alarms_enabled), false);
boolean use_ratio = sharedPreferences.getBoolean(getString(R.string.use_ratio), false);
WheelData.getInstance().setUseRatio(use_ratio);
WheelData.getInstance().setAlarmsEnabled(alarms_enabled);

if (alarms_enabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ public void onClick(DialogInterface dialog, int which) {
int led_mode = Integer.parseInt(sharedPreferences.getString(getString(R.string.led_mode), "0"));
WheelData.getInstance().updateLedMode(led_mode);
break;
case "use_ratio":
boolean use_ratio = sharedPreferences.getBoolean(getString(R.string.use_ratio), false);
WheelData.getInstance().setUseRatio(use_ratio);
break;
case "gotway_84v":
boolean g84v_enabled = sharedPreferences.getBoolean(getString(R.string.gotway_84v), false);
WheelData.getInstance().setGotway84V(g84v_enabled);
break;
// case "reset_user_trip":
// WheelData.getInstance().resetUserDistance();
// break;
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/xml/preferences_gotway.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@

<CheckBoxPreference
android:key="@string/use_ratio"
android:title="My Wheel is Gotway MCM "
android:summary="If you wheel is Gotway MCM, and it shows wrong speed, distance and others parameters, it should make them normal" />
android:title="My Wheel is a Gotway MCM "
android:summary="If your wheel is a Gotway MCM, and it shows wrong speed, distance and others parameters, it should make them normal" />

<CheckBoxPreference
android:key="@string/gotway_84v"
android:title="My Wheel is Gotway with 84V battery"
android:summary="If you wheel is Gotway with 20S (84V) battery" />
android:title="My Wheel is a Gotway with 84V battery"
android:summary="If your wheel is a Gotway with 20S (84V) battery" />

</PreferenceScreen>
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
72 changes: 42 additions & 30 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.