Skip to content

Commit

Permalink
* Renaming project
Browse files Browse the repository at this point in the history
  • Loading branch information
kconger committed Jan 13, 2015
1 parent 69586e5 commit fff8f5b
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .idea/.name

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

102 changes: 100 additions & 2 deletions .idea/misc.xml

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

2 changes: 1 addition & 1 deletion .idea/modules.xml

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

6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
iTPMS
Motorcycle TPMS
Author: Keith Conger <[email protected]>
http://itpms.thecongers.org
http://development.thecongers.org/home/mtpms
License: GPLv2

Motorcycle iTPMS Client Software
Motorcycle iTPMSystem Client Software

Requires:
* An iTPMSystem (http://www.atbs.com.tw/product_TPMS_Module_E.htm)
Expand Down
1 change: 0 additions & 1 deletion app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "org.thecongers.itpms"
applicationId "org.thecongers.mtpms"
minSdkVersion 16
targetSdkVersion 21
}
Expand Down
9 changes: 4 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.thecongers.itpms"
package="org.thecongers.mtpms"
android:versionCode="1"
android:versionName="1.0" >

Expand All @@ -11,12 +11,11 @@
<application
android:allowBackup="true"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:label="@string/app_shortName"
android:theme="@style/AppTheme" >
<activity
android:name="org.thecongers.itpms.MainActivity"
android:configChanges="screenSize|orientation"
android:label="@string/app_name" >
android:name="org.thecongers.mtpms.MainActivity"
android:configChanges="screenSize|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ of the License, or (at your option) any later version.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package org.thecongers.itpms;
package org.thecongers.mtpms;

import android.os.Environment;
import android.util.Log;
Expand All @@ -33,12 +33,12 @@ of the License, or (at your option) any later version.

class LogData {
private static PrintWriter outFile = null;
private static final String TAG = "iTPMS_Log";
private static final String TAG = "mTPMS_Log";

private static void initialize()
{
try {
File root = new File(Environment.getExternalStorageDirectory() + "/itpms/");
File root = new File(Environment.getExternalStorageDirectory() + "/mTPMS/");
if(!root.exists()) {
if(!root.mkdirs()){
Log.d(TAG,"Unable to create directory: " + root);
Expand All @@ -54,7 +54,7 @@ private static void initialize()
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
String curdatetime = formatter.format(date);

File logFile = new File( root, "iTPMS-" + curdatetime + ".csv" );
File logFile = new File( root, "mTPMS-" + curdatetime + ".csv" );
FileWriter logWriter = new FileWriter( logFile );
outFile = new PrintWriter( logWriter );
outFile.write( "Date(UTC),Wheel,Pressure(psi),Temperature(Celsius),Voltage\n" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ of the License, or (at your option) any later version.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package org.thecongers.itpms;
package org.thecongers.mtpms;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
Expand Down Expand Up @@ -83,7 +83,7 @@ public class MainActivity extends ActionBarActivity {
private BluetoothAdapter btAdapter = null;
// SPP UUID service
private static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
private static final String TAG = "iTPMS";
private static final String TAG = "mTPMS";
private final int RECEIVE_MESSAGE = 1; // Status for Handler
private static final int SETTINGS_RESULT = 1;
private String address;
Expand All @@ -104,6 +104,8 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);
setTitle(R.string.app_name);

txtFrontPressure = (TextView) findViewById(R.id.txtFrontPressure);
txtFrontTemperature = (TextView) findViewById(R.id.txtFrontTemperature);
txtFrontVoltage = (TextView) findViewById(R.id.txtFrontVoltage);
Expand Down Expand Up @@ -406,6 +408,7 @@ public void handleMessage(android.os.Message msg) {
}
// Try to connect to iTPMSystem
btConnect();

}

// Called when screen rotates or size changes
Expand Down Expand Up @@ -724,7 +727,7 @@ public void run() {
try {
// Read from the InputStream
bytes = btInStream.read(buffer); // Get number of bytes and message in "buffer"
sensorMessages.obtainMessage(RECEIVE_MESSAGE, bytes, -1, buffer).sendToTarget(); // Send to message queue Handler
sensorMessages.obtainMessage(RECEIVE_MESSAGE, bytes, -1, buffer).sendToTarget(); // Send to message queue Handler
} catch (IOException e) {
Log.d(TAG, "IO Exception while reading stream");
btConnectThread.cancel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ of the License, or (at your option) any later version.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package org.thecongers.itpms;
package org.thecongers.mtpms;

import android.content.ContentValues;
import android.content.Context;
Expand All @@ -28,7 +28,7 @@ of the License, or (at your option) any later version.


class SensorIdDatabase extends SQLiteAssetHelper {
private static final String TAG = "iTPMS_DB";
private static final String TAG = "mTPMS_DB";
private static final String DATABASE_NAME = "discoveredSensorID.db";
private static final int DATABASE_VERSION = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ of the License, or (at your option) any later version.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package org.thecongers.itpms;
package org.thecongers.mtpms;

import android.database.Cursor;
import android.os.Bundle;
Expand Down
15 changes: 8 additions & 7 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">iTPMS</string>

<string name="app_name">Motorcycle TPMS</string>
<string name="app_shortName">mTPMS</string>
<!-- Menu items -->
<string name="action_settings">Settings</string>
<string name="action_sensorReset">Reset Sensor IDs</string>
<string name="action_exit">Exit</string>

<!-- Preference strings -->
<string name="ui_title">User Interface</string>
<string name="pref_tempf_name">Temperature Unit</string>
<string-array name="tempf_array">
Expand Down Expand Up @@ -52,16 +53,16 @@
<string name="pref_high_pressure_summary">High Pressure Alert Threshold</string>
<string name="advanced_settings_title">Advanced Settings</string>
<string name="pref_dataLogging_name">Data Logging</string>
<string name="pref_dataLogging_summary">Enable Data Logging To /sdcard/itpms/</string>

<string name="pref_dataLogging_summary">Enable Data Logging To /sdcard/mTPMS/</string>
<!-- Setup message alert dialog -->
<string name="alert_setup_title">Setup Instructions</string>
<string name="alert_setup_message">You will need to first pair your device to the iTPMSystem.\n\nOnce connected the sensors should be discovered in about a minute.\n\nAfter which you will need to map the sensors to wheel locations.</string>
<string name="alert_setup_button">OK</string>

<!-- Toast messages -->
<string name="toast_newSensor">New sensor discovered:</string>
<string name="toast_noPaired">No previously paired iTPMSystem found</string>
<string name="toast_connectedTo">Connected to:</string>

<!-- Pressure alert messages -->
<string name="alert_lowFrontPressure">Low front tire pressure!</string>
<string name="alert_highFrontPressure">High front tire pressure!</string>
<string name="alert_lowRearPressure">Low rear tire pressure!</string>
Expand Down
File renamed without changes.

0 comments on commit fff8f5b

Please sign in to comment.