File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 android : text =" @string/hello" />
1111
1212 <Button
13- android : id =" @+id/startServicebutton "
13+ android : id =" @+id/startCANbutton "
1414 android : layout_width =" wrap_content"
1515 android : layout_height =" wrap_content"
16- android : text =" @string/startService "
17- android : onClick =" startService " />
16+ android : text =" @string/startCAN "
17+ android : onClick =" startCAN " />
1818
1919 <TextView
2020 android : id =" @+id/canInfoTextView"
Original file line number Diff line number Diff line change 33
44 <string name =" hello" >Hello World, CanTestAndroidActivity!</string >
55 <string name =" app_name" >CanTestAndroid</string >
6- <string name =" canInfo" >Receiving CAN Info ... </string >
7- <string name =" startService " >Start Service </string >
6+ <string name =" canInfo" >Receiving CAN Info</string >
7+ <string name =" startCAN " >Start CAN Communication </string >
88
99</resources >
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ public void startService(View view){
1919 TextView tv = (TextView ) findViewById (R .id .canInfoTextView );
2020 tv .append ("\n " );
2121
22- //DataClient dcl = new DataClient(tv);
23- //dcl.startConnection();
2422 new DataClientAsyncTask (tv ).execute ((Void )null );
2523 }
2624
Original file line number Diff line number Diff line change 88import android .os .AsyncTask ;
99import android .util .Log ;
1010import android .widget .TextView ;
11+ import at .fhv .uc .android .CanTestAndroidActivity ;
12+ import at .fhv .uc .android .R ;
1113import at .fhv .uc .can .customconnection .CustomInputStream ;
1214import at .fhv .uc .can .customconnection .CustomOutputStream ;
1315import at .fhv .uc .can .standardframe .CANFrameSimulator ;
@@ -35,7 +37,9 @@ public DataClientAsyncTask(TextView tv){
3537 m_tabletID = 6492 ;
3638 m_sessionSensors = new HashMap <Integer , Integer >();
3739 m_output = new StringBuffer ();
40+ //m_tv = new TextView(CanTestAndroidActivity.this);
3841 m_tv = tv ;
42+ //canInfoTextView;
3943 }
4044
4145 /**
@@ -166,6 +170,7 @@ protected Void doInBackground(Void... params) {
166170 protected void onProgressUpdate (Void ... values ) {
167171
168172 super .onProgressUpdate (values );
173+
169174 m_tv .append (m_output );
170175 }
171176
You can’t perform that action at this time.
0 commit comments