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 {
|
||||
|
||||
void addHandler(IRTHandler handler);
|
||||
void removeHandler(IRTHandler handler);
|
||||
void setHandler(IRTHandler handler);
|
||||
|
||||
/** Connect to the pump
|
||||
*
|
||||
|
@ -18,10 +17,7 @@ interface IRuffyService {
|
|||
/** Disconnect from the pump */
|
||||
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 resetPairing();
|
||||
boolean isConnected();
|
||||
boolean isBoundToPump();
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ public class RuffyScripter {
|
|||
|
||||
public void start(IRuffyService newService) {
|
||||
try {
|
||||
/*
|
||||
if (ruffyService != null) {
|
||||
try {
|
||||
ruffyService.removeHandler(mHandler);
|
||||
|
@ -55,6 +56,7 @@ public class RuffyScripter {
|
|||
// ignore
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (newService != null) {
|
||||
this.ruffyService = newService;
|
||||
// TODO this'll be done better in v2 via ConnectionManager
|
||||
|
@ -62,7 +64,7 @@ public class RuffyScripter {
|
|||
idleDisconnectMonitorThread.start();
|
||||
}
|
||||
started = true;
|
||||
newService.addHandler(mHandler);
|
||||
newService.setHandler(mHandler);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("Unhandled exception starting RuffyScripter", e);
|
||||
|
|
Loading…
Reference in a new issue