Fix more warnings
This commit is contained in:
parent
2dbf4b2a23
commit
44e2d8b34a
|
@ -5,9 +5,9 @@ import android.content.Context;
|
||||||
import android.hardware.ConsumerIrManager;
|
import android.hardware.ConsumerIrManager;
|
||||||
|
|
||||||
public class AndroidIRBeamer implements IRBeamer {
|
public class AndroidIRBeamer implements IRBeamer {
|
||||||
private ConsumerIrManager cim;
|
private final ConsumerIrManager cim;
|
||||||
|
|
||||||
public AndroidIRBeamer(Activity act) {
|
AndroidIRBeamer(Activity act) {
|
||||||
Context ctx = act.getApplicationContext();
|
Context ctx = act.getApplicationContext();
|
||||||
cim = (ConsumerIrManager) ctx.getSystemService(Context.CONSUMER_IR_SERVICE);
|
cim = (ConsumerIrManager) ctx.getSystemService(Context.CONSUMER_IR_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@ import android.app.Activity;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class DebugIRBeamer implements IRBeamer {
|
public class DebugIRBeamer implements IRBeamer {
|
||||||
private Activity act;
|
private final Activity act;
|
||||||
|
|
||||||
public DebugIRBeamer(Activity act) {
|
DebugIRBeamer(Activity act) {
|
||||||
this.act = act;
|
this.act = act;
|
||||||
}
|
}
|
||||||
public boolean isAvailable() { return true; }
|
public boolean isAvailable() { return true; }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package eu.worn.apps.androvac;
|
package eu.worn.apps.androvac;
|
||||||
|
|
||||||
public interface IRBeamer {
|
interface IRBeamer {
|
||||||
boolean isAvailable();
|
boolean isAvailable();
|
||||||
void transmit(int carrier, int[] pulses);
|
void transmit(int carrier, int[] pulses);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package eu.worn.apps.androvac;
|
package eu.worn.apps.androvac;
|
||||||
|
|
||||||
public interface IRModulation {
|
interface IRModulation {
|
||||||
int getCarrierFrequency();
|
int getCarrierFrequency();
|
||||||
int[] modulate(byte[] frame);
|
int[] modulate(byte[] frame);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@ package eu.worn.apps.androvac;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
public class RoboVac11sRemote {
|
class RoboVac11sRemote {
|
||||||
public IRModulation modulation = new EufyIRModulation();
|
final IRModulation modulation = new EufyIRModulation();
|
||||||
|
|
||||||
private Calendar schedule;
|
private Calendar schedule;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class RoboVac11sRemote {
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RoboVac11sRemote() {
|
RoboVac11sRemote() {
|
||||||
schedule = null;
|
schedule = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,21 +37,21 @@ public class RoboVac11sRemote {
|
||||||
return schedule;
|
return schedule;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] cleanAuto() { return buildMessage((byte) 0x5d); }
|
byte[] cleanAuto() { return buildMessage((byte) 0x5d); }
|
||||||
public byte[] cleanSpot() { return buildMessage((byte) 0x8c); }
|
byte[] cleanSpot() { return buildMessage((byte) 0x8c); }
|
||||||
public byte[] cleanEdge() { return buildMessage((byte) 0x9c); }
|
byte[] cleanEdge() { return buildMessage((byte) 0x9c); }
|
||||||
public byte[] cleanRoom() { return buildMessage((byte) 0xad); }
|
byte[] cleanRoom() { return buildMessage((byte) 0xad); }
|
||||||
|
|
||||||
public byte[] powerStandard() { return buildMessage((byte) 0x1e); }
|
byte[] powerStandard() { return buildMessage((byte) 0x1e); }
|
||||||
public byte[] powerMax() { return buildMessage((byte) 0x1c); }
|
byte[] powerMax() { return buildMessage((byte) 0x1c); }
|
||||||
public byte[] powerBoostIQ() { return buildMessage((byte) 0x1d); }
|
byte[] powerBoostIQ() { return buildMessage((byte) 0x1d); }
|
||||||
|
|
||||||
public byte[] moveForward() { return buildMessage((byte) 0x2f); }
|
byte[] moveForward() { return buildMessage((byte) 0x2f); }
|
||||||
public byte[] moveBackward() { return buildMessage((byte) 0x7f); }
|
byte[] moveBackward() { return buildMessage((byte) 0x7f); }
|
||||||
public byte[] moveCCW() { return buildMessage((byte) 0x3f); }
|
byte[] moveCCW() { return buildMessage((byte) 0x3f); }
|
||||||
public byte[] moveCW() { return buildMessage((byte) 0x6f); }
|
byte[] moveCW() { return buildMessage((byte) 0x6f); }
|
||||||
public byte[] returnBase() { return buildMessage((byte) 0xef); }
|
byte[] returnBase() { return buildMessage((byte) 0xef); }
|
||||||
|
|
||||||
public byte[] stop() { return buildMessage((byte) 0x4f); }
|
byte[] stop() { return buildMessage((byte) 0x4f); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue