Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
Commits
1b776613
Commit
1b776613
authored
Aug 02, 2023
by
Roque
Browse files
Options
Browse Files
Download
Plain Diff
Improve tests
See merge request
!1808
parents
c09ec2e3
16f88948
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
bt5/erp5_officejs_drone_capture_flag_test/PathTemplateItem/web_page_module/test_capture_drone_flight_js.js
...plateItem/web_page_module/test_capture_drone_flight_js.js
+7
-5
bt5/erp5_officejs_drone_capture_flag_test/PathTemplateItem/web_page_module/test_capture_drone_flight_js.xml
...lateItem/web_page_module/test_capture_drone_flight_js.xml
+2
-2
bt5/erp5_officejs_drone_simulator_test/PathTemplateItem/web_page_module/test_drone_simulator_flight_js.js
...ateItem/web_page_module/test_drone_simulator_flight_js.js
+5
-3
bt5/erp5_officejs_drone_simulator_test/PathTemplateItem/web_page_module/test_drone_simulator_flight_js.xml
...teItem/web_page_module/test_drone_simulator_flight_js.xml
+2
-2
No files found.
bt5/erp5_officejs_drone_capture_flag_test/PathTemplateItem/web_page_module/test_capture_drone_flight_js.js
View file @
1b776613
...
@@ -55,7 +55,8 @@
...
@@ -55,7 +55,8 @@
'
);
\n
'
+
'
);
\n
'
+
'
};
\n
'
+
'
};
\n
'
+
'
me.onUpdate = function (timestamp) {
\n
'
+
'
me.onUpdate = function (timestamp) {
\n
'
+
'
var realDistance = distance(
\n
'
+
'
var current_position = me.getCurrentPosition(),
\n
'
+
'
realDistance = distance(
\n
'
+
'
me.initialPosition.x,
\n
'
+
'
me.initialPosition.x,
\n
'
+
'
me.initialPosition.y,
\n
'
+
'
me.initialPosition.y,
\n
'
+
'
me.getCurrentPosition().x,
\n
'
+
'
me.getCurrentPosition().x,
\n
'
+
...
@@ -64,8 +65,9 @@
...
@@ -64,8 +65,9 @@
'
expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);
\n
'
+
'
expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);
\n
'
+
'
assert(timestamp, 1000 / 60, "Timestamp");
\n
'
+
'
assert(timestamp, 1000 / 60, "Timestamp");
\n
'
+
'
assert(realDistance, expectedDistance, "Distance");
\n
'
+
'
assert(realDistance, expectedDistance, "Distance");
\n
'
+
'
compare(me.getCurrentPosition(), {
\n
'
+
'
current_position.x = current_position.x.toFixed(7);
\n
'
+
'
x: me.initialPosition.x + 2.3992831666911723e-06,
\n
'
+
'
compare(current_position, {
\n
'
+
'
x: (me.initialPosition.x + 2.3992831666911723e-06).toFixed(7),
\n
'
+
'
y: me.initialPosition.y,
\n
'
+
'
y: me.initialPosition.y,
\n
'
+
'
z: me.initialPosition.z
\n
'
+
'
z: me.initialPosition.z
\n
'
+
'
});
\n
'
+
'
});
\n
'
+
...
...
bt5/erp5_officejs_drone_capture_flag_test/PathTemplateItem/web_page_module/test_capture_drone_flight_js.xml
View file @
1b776613
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
10
09.56051.15404.48947
</string>
</value>
<value>
<string>
10
10.10600.362.51182
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -266,7 +266,7 @@
...
@@ -266,7 +266,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1690
898400.2
6
</float>
<float>
1690
983490.5
6
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs_drone_simulator_test/PathTemplateItem/web_page_module/test_drone_simulator_flight_js.js
View file @
1b776613
...
@@ -68,7 +68,8 @@
...
@@ -68,7 +68,8 @@
'
};
\n
'
+
'
};
\n
'
+
'
\n
'
+
'
\n
'
+
'
me.onUpdate = function (timestamp) {
\n
'
+
'
me.onUpdate = function (timestamp) {
\n
'
+
'
var realDistance = distance(
\n
'
+
'
var current_position = me.getCurrentPosition(),
\n
'
+
'
realDistance = distance(
\n
'
+
'
me.initialPosition.x,
\n
'
+
'
me.initialPosition.x,
\n
'
+
'
me.initialPosition.y,
\n
'
+
'
me.initialPosition.y,
\n
'
+
'
me.getCurrentPosition().x,
\n
'
+
'
me.getCurrentPosition().x,
\n
'
+
...
@@ -77,8 +78,9 @@
...
@@ -77,8 +78,9 @@
'
expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);
\n
'
+
'
expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);
\n
'
+
'
assert(timestamp, 1000 / 60, "Timestamp");
\n
'
+
'
assert(timestamp, 1000 / 60, "Timestamp");
\n
'
+
'
assert(realDistance, expectedDistance, "Distance");
\n
'
+
'
assert(realDistance, expectedDistance, "Distance");
\n
'
+
'
compare(me.getCurrentPosition(), {
\n
'
+
'
current_position.x = current_position.x.toFixed(7);
\n
'
+
'
x: me.initialPosition.x + 2.3992831666911723e-06,
\n
'
+
'
compare(current_position, {
\n
'
+
'
x: (me.initialPosition.x + 2.3992831666911723e-06).toFixed(7),
\n
'
+
'
y: me.initialPosition.y,
\n
'
+
'
y: me.initialPosition.y,
\n
'
+
'
z: me.initialPosition.z
\n
'
+
'
z: me.initialPosition.z
\n
'
+
'
});
\n
'
+
'
});
\n
'
+
...
...
bt5/erp5_officejs_drone_simulator_test/PathTemplateItem/web_page_module/test_drone_simulator_flight_js.xml
View file @
1b776613
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1010.
3741.38295.37973
</string>
</value>
<value>
<string>
1010.
10621.5765.11161
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -266,7 +266,7 @@
...
@@ -266,7 +266,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1690
898327.04
</float>
<float>
1690
900659.22
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment