optimized examples

This commit is contained in:
strawmanbobi
2026-01-28 09:05:24 +08:00
parent 93685d90f0
commit 085e1b0787
2 changed files with 2 additions and 1 deletions

View File

@@ -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"));

View File

@@ -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());