@robotical/webapp-types 3.7.9 → 3.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -114,18 +114,23 @@ var MartyWifiManager = /** @class */ (function () {
114
114
  return __generator(this, function (_a) {
115
115
  switch (_a.label) {
116
116
  case 0:
117
- _a.trys.push([0, 2, , 3]);
117
+ _a.trys.push([0, 4, , 5]);
118
118
  Logger.info(SHOW_LOGS, TAG, "RaftSystemUtils wifiDisconnect clearing wifi info");
119
119
  return [4 /*yield*/, this.marty.sendRestMessage("wc")];
120
120
  case 1:
121
121
  _a.sent();
122
- this.getWiFiConnStatus();
123
- return [2 /*return*/, true];
122
+ return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 2000); })];
124
123
  case 2:
124
+ _a.sent();
125
+ return [4 /*yield*/, this.getWiFiConnStatus()];
126
+ case 3:
127
+ _a.sent();
128
+ return [2 /*return*/, true];
129
+ case 4:
125
130
  error_2 = _a.sent();
126
131
  Logger.info(SHOW_LOGS, TAG, "RaftSystemUtils wifiDisconnect clearing unsuccessful ".concat(error_2));
127
- return [3 /*break*/, 3];
128
- case 3: return [2 /*return*/, false];
132
+ return [3 /*break*/, 5];
133
+ case 5: return [2 /*return*/, false];
129
134
  }
130
135
  });
131
136
  });
@@ -8,21 +8,20 @@ export default function wifiConfigSub(raft, cachedStatus) {
8
8
  if (!isVersionGreater(raft.getRaftVersion(), FW_VERSION_RSSI_WIFI)) {
9
9
  return "Currently, wifi configuration only works in the phone application.";
10
10
  }
11
- var isPaused = !!!(cachedStatus === null || cachedStatus === void 0 ? void 0 : cachedStatus.ssid);
11
+ var isPaused = cachedStatus === null || cachedStatus === void 0 ? void 0 : cachedStatus.isPaused;
12
12
  var conInfo = (cachedStatus === null || cachedStatus === void 0 ? void 0 : cachedStatus.connState) === RaftWifiConnState.WIFI_CONN_CONNECTED ||
13
13
  (cachedStatus === null || cachedStatus === void 0 ? void 0 : cachedStatus.ssid)
14
14
  ? cachedStatus.ipAddress + (isPaused ? "" : " on " + cachedStatus.ssid)
15
15
  : null;
16
- var isConnected = (cachedStatus === null || cachedStatus === void 0 ? void 0 : cachedStatus.connState) ===
17
- RaftWifiConnState.WIFI_CONN_CONNECTED;
16
+ var isConnected = (cachedStatus === null || cachedStatus === void 0 ? void 0 : cachedStatus.connState) === RaftWifiConnState.WIFI_CONN_CONNECTED && (cachedStatus === null || cachedStatus === void 0 ? void 0 : cachedStatus.ipAddress);
18
17
  var subtitle;
19
18
  if (isConnected) {
20
19
  subtitle = "Connected";
21
20
  }
22
- if (isPaused) {
21
+ if (isConnected && isPaused) {
23
22
  subtitle = "Connected (Paused for BLE)";
24
23
  }
25
- if (!isConnected && !isPaused) {
24
+ if (!isConnected) {
26
25
  subtitle = "Not Connected";
27
26
  }
28
27
  if (conInfo) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robotical/webapp-types",
3
- "version": "3.7.9",
3
+ "version": "3.7.10",
4
4
  "description": "Type definitions for the Application Manager",
5
5
  "main": "dist/application-manager.d.ts",
6
6
  "types": "dist/application-manager.d.ts",