djiuser_ws4-25 16:57
private RemoteController remoteController;
@Override
public void onUpdate(@NonNull HardwareState hardwareState) {
Toast.makeText(getApplication(), "onUpdate", Toast.LENGTH_SHORT).show();
remoteController.setHardwareStateCallback(hardwareState1 -> {
if (hardwareState.getC1Button().isClicked()){
Toast.makeText(getApplication(), "getC1Button", Toast.LENGTH_SHORT).show();
}else if (hardwareState.getC2Button().isClicked()){
Toast.makeText(getApplication(), "getC2Button", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplication(), "Button", Toast.LENGTH_SHORT).show();
}
});
}
@Over
欢迎光临 大疆社区 (https://bbs.dji.com/) | Powered by Discuz! X3.2 |