Revert "Try building against ruffy stable, 8dae0c0fedd5e371e85da3433a07aaab27b05db0"
This reverts commit 8720c08cdd4a7f89b77816d849da9c585fb8f1ef.
This commit is contained in:
parent
f70cbbc6c0
commit
ad44b356c4
2 changed files with 4 additions and 6 deletions
|
@ -6,8 +6,7 @@ import org.monkey.d.ruffy.ruffy.driver.IRTHandler;
|
||||||
|
|
||||||
interface IRuffyService {
|
interface IRuffyService {
|
||||||
|
|
||||||
void addHandler(IRTHandler handler);
|
void setHandler(IRTHandler handler);
|
||||||
void removeHandler(IRTHandler handler);
|
|
||||||
|
|
||||||
/** Connect to the pump
|
/** Connect to the pump
|
||||||
*
|
*
|
||||||
|
@ -18,10 +17,7 @@ interface IRuffyService {
|
||||||
/** Disconnect from the pump */
|
/** Disconnect from the pump */
|
||||||
void doRTDisconnect();
|
void doRTDisconnect();
|
||||||
|
|
||||||
/*What's the meaning of 'changed'?
|
|
||||||
* changed means if a button state has been changed, like btton pressed is a change and button release another*/
|
|
||||||
void rtSendKey(byte keyCode, boolean changed);
|
void rtSendKey(byte keyCode, boolean changed);
|
||||||
void resetPairing();
|
void resetPairing();
|
||||||
boolean isConnected();
|
boolean isConnected();
|
||||||
boolean isBoundToPump();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class RuffyScripter {
|
||||||
|
|
||||||
public void start(IRuffyService newService) {
|
public void start(IRuffyService newService) {
|
||||||
try {
|
try {
|
||||||
|
/*
|
||||||
if (ruffyService != null) {
|
if (ruffyService != null) {
|
||||||
try {
|
try {
|
||||||
ruffyService.removeHandler(mHandler);
|
ruffyService.removeHandler(mHandler);
|
||||||
|
@ -55,6 +56,7 @@ public class RuffyScripter {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (newService != null) {
|
if (newService != null) {
|
||||||
this.ruffyService = newService;
|
this.ruffyService = newService;
|
||||||
// TODO this'll be done better in v2 via ConnectionManager
|
// TODO this'll be done better in v2 via ConnectionManager
|
||||||
|
@ -62,7 +64,7 @@ public class RuffyScripter {
|
||||||
idleDisconnectMonitorThread.start();
|
idleDisconnectMonitorThread.start();
|
||||||
}
|
}
|
||||||
started = true;
|
started = true;
|
||||||
newService.addHandler(mHandler);
|
newService.setHandler(mHandler);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Unhandled exception starting RuffyScripter", e);
|
log.error("Unhandled exception starting RuffyScripter", e);
|
||||||
|
|
Loading…
Reference in a new issue