optimized examples
This commit is contained in:
@@ -190,12 +190,14 @@ public class ControlFragment extends Fragment implements View.OnClickListener {
|
||||
|
||||
private void onEmitterConnected() {
|
||||
mParent.runOnUiThread(() -> {
|
||||
Log.d(TAG, "onEmitterConnected, set the status and button color in UI");
|
||||
mBtnConnect.setImageDrawable(AppCompatResources.getDrawable(mParent, R.mipmap.button_unlink));
|
||||
mVWConnectStatus.setBackgroundColor(Color.parseColor("#3FAFFF"));
|
||||
});
|
||||
}
|
||||
private void onEmitterDisconnected() {
|
||||
mParent.runOnUiThread(() -> {
|
||||
Log.d(TAG, "onEmitterConnected, set the status and button color in UI");
|
||||
ToastUtils.showToast(mParent, mParent.getString(R.string.connect_disconnected), Toast.LENGTH_SHORT);
|
||||
mBtnConnect.setImageDrawable(AppCompatResources.getDrawable(mParent, R.mipmap.button_link));
|
||||
mVWConnectStatus.setBackgroundColor(Color.parseColor("#FF7F7F"));
|
||||
|
||||
@@ -77,7 +77,6 @@ void printWiFiStatus() {
|
||||
if (currentMillis - lastStatusCheck >= ALIVE_DEBUG_INTERVAL) {
|
||||
const IPAddress ip = WiFi.localIP();
|
||||
if (0 == strcmp(ip.toString().c_str(), "0.0.0.0")) {
|
||||
lastStatusCheck = currentMillis;
|
||||
return;
|
||||
}
|
||||
serialPrint(LOG_INFO, "Wi-Fi SSID: %s", WiFi.SSID());
|
||||
|
||||
Reference in New Issue
Block a user