Try building against ruffy stable, 8dae0c0fedd5e371e85da3433a07aaab27b05db0

This commit is contained in:
Johannes Mockenhaupt 2017-08-27 14:49:09 +02:00
parent 7bd7c7d035
commit f70cbbc6c0
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 6 additions and 4 deletions

View file

@ -6,7 +6,8 @@ import org.monkey.d.ruffy.ruffy.driver.IRTHandler;
interface IRuffyService { interface IRuffyService {
void setHandler(IRTHandler handler); void addHandler(IRTHandler handler);
void removeHandler(IRTHandler handler);
/** Connect to the pump /** Connect to the pump
* *
@ -17,7 +18,10 @@ 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();
} }

View file

@ -48,7 +48,6 @@ 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);
@ -56,7 +55,6 @@ 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
@ -64,7 +62,7 @@ public class RuffyScripter {
idleDisconnectMonitorThread.start(); idleDisconnectMonitorThread.start();
} }
started = true; started = true;
newService.setHandler(mHandler); newService.addHandler(mHandler);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("Unhandled exception starting RuffyScripter", e); log.error("Unhandled exception starting RuffyScripter", e);