Skip to content

Commit

Permalink
2.1 Repair non-english language crush problem
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayXboxtion963 committed Dec 1, 2024
1 parent b5ef72a commit 217bc03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
minSdk 22
targetSdk 33
versionCode 1
versionName "2.0"
versionName "2.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
10 changes: 3 additions & 7 deletions app/src/main/java/com/plawyue/AndroidDSU/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,9 @@ public void onSensorChanged(SensorEvent event) {
float accX = -Accsensitvity*event.values[2] * METER_PER_SECOND_SQUARED_TO_G / 100;
float accY = -Accsensitvity*event.values[0] * METER_PER_SECOND_SQUARED_TO_G / 100;
float accZ =Accsensitvity*event.values[1] * METER_PER_SECOND_SQUARED_TO_G / 100;
DecimalFormat df = new DecimalFormat("#.00");
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
symbols.setDecimalSeparator('.');
df.setDecimalFormatSymbols(symbols);
gs_DsuCtrlUIData.accelX= Float.parseFloat(df.format(accY));
gs_DsuCtrlUIData.accelY=Float.parseFloat(df.format(accX));
gs_DsuCtrlUIData.accelZ=Float.parseFloat(df.format(accZ));
gs_DsuCtrlUIData.accelX= accY;
gs_DsuCtrlUIData.accelY=accX;
gs_DsuCtrlUIData.accelZ=accZ;


}
Expand Down

0 comments on commit 217bc03

Please sign in to comment.