@robotical/webapp-types 3.14.1 → 3.14.3
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.
|
@@ -81,69 +81,78 @@ var CalibrationManager = /** @class */ (function () {
|
|
|
81
81
|
switch (_e.label) {
|
|
82
82
|
case 0:
|
|
83
83
|
overallResult = true;
|
|
84
|
-
if (!(cmd === "set")) return [3 /*break*/,
|
|
84
|
+
if (!(cmd === "set")) return [3 /*break*/, 17];
|
|
85
85
|
_i = 0, jointList_1 = jointList;
|
|
86
86
|
_e.label = 1;
|
|
87
87
|
case 1:
|
|
88
|
-
if (!(_i < jointList_1.length)) return [3 /*break*/,
|
|
88
|
+
if (!(_i < jointList_1.length)) return [3 /*break*/, 9];
|
|
89
89
|
jnt = jointList_1[_i];
|
|
90
90
|
_e.label = 2;
|
|
91
91
|
case 2:
|
|
92
|
-
_e.trys.push([2,
|
|
92
|
+
_e.trys.push([2, 7, , 8]);
|
|
93
93
|
cmdUrl = "calibrate/set/" + jnt;
|
|
94
94
|
return [4 /*yield*/, this.marty.sendRestMessage(cmdUrl)];
|
|
95
95
|
case 3:
|
|
96
96
|
rsl = _e.sent();
|
|
97
97
|
saveCalibCmd = "elem/".concat(jnt, "/saveparams");
|
|
98
|
-
return [4 /*yield*/,
|
|
98
|
+
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 100); })];
|
|
99
99
|
case 4:
|
|
100
|
+
_e.sent();
|
|
101
|
+
return [4 /*yield*/, this.marty.sendRestMessage(saveCalibCmd)];
|
|
102
|
+
case 5:
|
|
103
|
+
_e.sent();
|
|
104
|
+
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 200); })];
|
|
105
|
+
case 6:
|
|
100
106
|
_e.sent();
|
|
101
107
|
if (rsl.rslt != "ok")
|
|
102
108
|
overallResult = false;
|
|
103
|
-
return [3 /*break*/,
|
|
104
|
-
case
|
|
109
|
+
return [3 /*break*/, 8];
|
|
110
|
+
case 7:
|
|
105
111
|
error_1 = _e.sent();
|
|
106
112
|
Logger.error(SHOW_LOGS, TAG, "calibrate failed on joint ".concat(jnt, " ").concat(error_1));
|
|
107
|
-
return [3 /*break*/,
|
|
108
|
-
case
|
|
113
|
+
return [3 /*break*/, 8];
|
|
114
|
+
case 8:
|
|
109
115
|
_i++;
|
|
110
116
|
return [3 /*break*/, 1];
|
|
111
|
-
case
|
|
117
|
+
case 9:
|
|
112
118
|
_a = jointNames;
|
|
113
119
|
_b = [];
|
|
114
120
|
for (_c in _a)
|
|
115
121
|
_b.push(_c);
|
|
116
122
|
_d = 0;
|
|
117
|
-
_e.label =
|
|
118
|
-
case
|
|
119
|
-
if (!(_d < _b.length)) return [3 /*break*/,
|
|
123
|
+
_e.label = 10;
|
|
124
|
+
case 10:
|
|
125
|
+
if (!(_d < _b.length)) return [3 /*break*/, 16];
|
|
120
126
|
_c = _b[_d];
|
|
121
|
-
if (!(_c in _a)) return [3 /*break*/,
|
|
127
|
+
if (!(_c in _a)) return [3 /*break*/, 15];
|
|
122
128
|
jnt = _c;
|
|
123
|
-
_e.label =
|
|
124
|
-
case
|
|
125
|
-
_e.trys.push([
|
|
129
|
+
_e.label = 11;
|
|
130
|
+
case 11:
|
|
131
|
+
_e.trys.push([11, 14, , 15]);
|
|
126
132
|
cmdUrl = "servo/" + jnt + "/enable/1";
|
|
127
133
|
return [4 /*yield*/, this.marty.sendRestMessage(cmdUrl)];
|
|
128
|
-
case
|
|
134
|
+
case 12:
|
|
129
135
|
rsl = _e.sent();
|
|
136
|
+
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 100); })];
|
|
137
|
+
case 13:
|
|
138
|
+
_e.sent();
|
|
130
139
|
if (rsl.rslt != "ok")
|
|
131
140
|
overallResult = false;
|
|
132
|
-
return [3 /*break*/,
|
|
133
|
-
case
|
|
141
|
+
return [3 /*break*/, 15];
|
|
142
|
+
case 14:
|
|
134
143
|
error_2 = _e.sent();
|
|
135
144
|
Logger.error(SHOW_LOGS, TAG, "enable failed on joint ".concat(jnt, " ").concat(error_2));
|
|
136
|
-
return [3 /*break*/,
|
|
137
|
-
case
|
|
145
|
+
return [3 /*break*/, 15];
|
|
146
|
+
case 15:
|
|
138
147
|
_d++;
|
|
139
|
-
return [3 /*break*/,
|
|
140
|
-
case
|
|
148
|
+
return [3 /*break*/, 10];
|
|
149
|
+
case 16:
|
|
141
150
|
// Result
|
|
142
151
|
Logger.info(SHOW_LOGS, TAG, "Set calibration flag to true");
|
|
143
152
|
rslt = new RaftOKFail();
|
|
144
153
|
rslt.rslt = overallResult ? "ok" : "fail";
|
|
145
154
|
return [2 /*return*/, rslt];
|
|
146
|
-
case
|
|
155
|
+
case 17: return [2 /*return*/, false];
|
|
147
156
|
}
|
|
148
157
|
});
|
|
149
158
|
});
|
package/dist-types/src/i18n.js
CHANGED
|
@@ -37,8 +37,18 @@ var resources = {
|
|
|
37
37
|
"space_game_subtitle": "We'll make a game where you fly a rocket through space!",
|
|
38
38
|
"space_game_title": "11. Space Game",
|
|
39
39
|
"using_cog_marty_together_heading": "Using Cog & Marty Together",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"blocks_cog_1_title": "1. Intro to Cog Lights and Sounds",
|
|
41
|
+
"blocks_cog_1_subtitle": "Learn how to use the Cog's lights and sounds in Blocks",
|
|
42
|
+
"blocks_cog_2_title": "2. Make a 13-sided Dice",
|
|
43
|
+
"blocks_cog_2_subtitle": "Turning Cog into a 13-sided dice!",
|
|
44
|
+
"blocks_cog_3_title": "3. Reaction Test Game",
|
|
45
|
+
"blocks_cog_3_subtitle": "Let's make a reaction test game with Cog!",
|
|
46
|
+
"blocks_cog_4_title": "4. Reactive Light Show",
|
|
47
|
+
"blocks_cog_4_subtitle": "Let's create a light show that reacts as you interact with Cog!",
|
|
48
|
+
"blocks_cog_5_title": "5. Spirit Level",
|
|
49
|
+
"blocks_cog_5_subtitle": "Let's make a spirit level with Cog!",
|
|
50
|
+
"blocks_cog_6_title": "6. Skiing Game",
|
|
51
|
+
"blocks_cog_6_subtitle": "Let's make a skiing game with Cog!",
|
|
42
52
|
},
|
|
43
53
|
"addon_item": {
|
|
44
54
|
"delete": "Delete",
|
|
@@ -319,8 +329,8 @@ var resources = {
|
|
|
319
329
|
"space_game_subtitle": "Θα φτιάξουμε ένα παιχνίδι όπου θα πετάτε έναν πύραυλο στο διάστημα!",
|
|
320
330
|
"space_game_title": "11. Παιχνίδι στο Διάστημα",
|
|
321
331
|
"using_cog_marty_together_heading": "Χρησιμοποιώντας το Cog & τον Marty μαζί",
|
|
322
|
-
"
|
|
323
|
-
"
|
|
332
|
+
"blocks_cog_1_title": "1. Εισαγωγή στα Φώτα και Ήχους του Cog",
|
|
333
|
+
"blocks_cog_1_subtitle": "Μάθετε πώς να χρησιμοποιείτε τα φώτα και τους ήχους του Cog στο Blocks",
|
|
324
334
|
},
|
|
325
335
|
"addon_item": {
|
|
326
336
|
"delete": "Διαγραφή",
|
|
@@ -601,8 +611,8 @@ var resources = {
|
|
|
601
611
|
"space_game_subtitle": "We maken een spel waarin je met een raket door de ruimte vliegt!",
|
|
602
612
|
"space_game_title": "11. Ruimte spel",
|
|
603
613
|
"using_cog_marty_together_heading": "Cog & Marty samen gebruiken",
|
|
604
|
-
"
|
|
605
|
-
"
|
|
614
|
+
"blocks_cog_1_title": "1. Introductie tot Cog Lichten en Geluiden",
|
|
615
|
+
"blocks_cog_1_subtitle": "Leer hoe je de lichten en geluiden van Cog gebruikt in Blocks"
|
|
606
616
|
},
|
|
607
617
|
"addon_item": {
|
|
608
618
|
"delete": "Verwijderen",
|
|
@@ -883,8 +893,8 @@ var resources = {
|
|
|
883
893
|
"space_game_subtitle": "Creeremo un gioco in cui dovrai pilotare un razzo nello spazio!",
|
|
884
894
|
"space_game_title": "11. Gioco spaziale",
|
|
885
895
|
"using_cog_marty_together_heading": "Usare Cog e Marty insieme",
|
|
886
|
-
"
|
|
887
|
-
"
|
|
896
|
+
"blocks_cog_1_title": "1. Introduzione alle luci e ai suoni di Cog",
|
|
897
|
+
"blocks_cog_1_subtitle": "Impara come usare le luci e i suoni di Cog nei blocchi"
|
|
888
898
|
},
|
|
889
899
|
"addon_item": {
|
|
890
900
|
"delete": "Eliminare",
|