Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
25e12974
Commit
25e12974
authored
Jun 28, 2022
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
まだ2回目が計測できない
parent
932da70f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
163 deletions
+85
-163
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/AlcoholCheckerTimerTask.java
+0
-84
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/AlcoholCheckerUtil.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/BleManagerUtil.java
+14
-9
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+71
-70
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/AlcoholCheckerTimerTask.java
deleted
100644 → 0
View file @
932da70f
package
jp
.
agentec
.
abook
.
abv
.
cl
.
util
;
import
java.util.TimerTask
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
AlcoholCheckerUtil
.
F_BLE_COM_INIT
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
AlcoholCheckerUtil
.
F_BLE_COM_RD_COMMAND
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
AlcoholCheckerUtil
.
F_BLE_COM_RECONNECT1
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
AlcoholCheckerUtil
.
F_BLE_COM_RECONNECT2
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
AlcoholCheckerUtil
.
F_BLE_COM_RECONNECT3
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
AlcoholCheckerUtil
.
F_BLE_COM_RP_COMMAND
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
AlcoholCheckerUtil
.
F_BLE_COM_RP_START
;
public
class
AlcoholCheckerTimerTask
extends
TimerTask
{
public
static
final
String
TAG
=
"AlcoholCheckerTimerTask"
;
private
AlcoholCheckerUtil
alcoholCheckerUtil
;
private
AlcoholCheckerUtilListener
listener
;
public
AlcoholCheckerTimerTask
(
AlcoholCheckerUtil
alcoholCheckerUtil
,
AlcoholCheckerUtilListener
listener
)
{
this
.
alcoholCheckerUtil
=
alcoholCheckerUtil
;
this
.
listener
=
listener
;
}
@Override
public
void
run
()
{
//alcoholCheckerUtil.gi_rxlength = 0;
switch
(
alcoholCheckerUtil
.
gi_status
)
{
case
F_BLE_COM_INIT:
// BLE Init
break
;
case
F_BLE_COM_RP_START:
// RP Command Send
//Logger.d(TAG,"F_BLE_COM_RP_START");
//alcoholCheckerUtil.sendMessage(F_BLE_COM_RP_COMMAND);
break
;
case
AlcoholCheckerUtil
.
F_BLE_COM_RD_START
:
// RD Command Send
//Logger.d(TAG,"F_BLE_COM_RD_START");
//alcoholCheckerUtil.sendMessage(F_BLE_COM_RD_COMMAND);
break
;
case
AlcoholCheckerUtil
.
F_BLE_COM_FC_START
:
// Fc Command Send
//Logger.d(TAG,"F_BLE_COM_FC_START");
//alcoholCheckerUtil.sendMessage(AlcoholCheckerUtil.F_BLE_COM_FC_COMMAND_F11);
break
;
case
AlcoholCheckerUtil
.
F_BLE_COM_FC_START22
:
// Fc Command Send
//Logger.d(TAG,"F_BLE_COM_FC_START22");
//alcoholCheckerUtil.sendMessage(AlcoholCheckerUtil.F_BLE_COM_FC_COMMAND_F22);
break
;
// case F_BLE_COM_RECONNECT1:
// // ReConecting(NOTIFICATION Disable) // @@@
// alcoholCheckerUtil.NotificationDisable(AlcoholCheckerUtil.RxChar, AlcoholCheckerUtil.CCCD);
// alcoholCheckerUtil.gi_status = F_BLE_COM_RECONNECT2;
// listener.onUpdateStatus("TIMER F_BLE_COM_RECONNECT2");
// break;
// case F_BLE_COM_RECONNECT2:
// // ReConecting(Wait) // @@@
// alcoholCheckerUtil.gi_status = F_BLE_COM_RECONNECT3;
// listener.onUpdateStatus("TIMER F_BLE_COM_RECONNECT3");
// break;
// case F_BLE_COM_RECONNECT3:
// // ReConecting(NOTIFICATION Enable) // @@@
// alcoholCheckerUtil.DescriptorDevice(AlcoholCheckerUtil.RxChar, AlcoholCheckerUtil.CCCD);
// alcoholCheckerUtil.gi_status = F_BLE_COM_RP_START;
// listener.onUpdateStatus("TIMER F_BLE_COM_RP_START");
// break;
default
:
// Logger.i(TAG,"AlcohlCheckerTimerTask Timeout");
//
// if (alcoholCheckerUtil.gi_rxretry_cnt < 100) {
// alcoholCheckerUtil.gi_rxretry_cnt++;
// } else {
// alcoholCheckerUtil.gi_status = F_BLE_COM_RECONNECT1;
// //listener.onUpdateStatus("TIMER F_BLE_COM_RECONNECT1");
// }
break
;
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/AlcoholCheckerUtil.java
View file @
25e12974
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/BleManagerUtil.java
View file @
25e12974
...
...
@@ -161,16 +161,21 @@ public class BleManagerUtil {
// キャラクタリスティック変更が通知されたときの処理
@Override
public
void
onCharacteristicChanged
(
BluetoothGatt
gatt
,
BluetoothGattCharacteristic
characteristic
)
{
public
void
onCharacteristicChanged
(
final
BluetoothGatt
gatt
,
final
BluetoothGattCharacteristic
characteristic
)
{
Logger
.
d
(
TAG
,
"onCharacteristicChanged"
);
try
{
//if (mListener != null)
{
mListener
.
onCharacteristicChanged
(
gatt
,
characteristic
);
}
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
e
);
}
mListener
.
onCharacteristicChanged
(
gatt
,
characteristic
);
// runOnUiThread(new Runnable() {
// @Override
// public void run() {
// try {
// if (mListener != null) {
// mListener.onCharacteristicChanged(gatt, characteristic);
// }
// } catch (Exception e) {
// Logger.e(TAG,e);
// }
// }
// });
}
@Override
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
25e12974
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment