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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
715a2c20
Commit
715a2c20
authored
Jul 27, 2023
by
Roque
Browse files
Options
Browse Files
Download
Plain Diff
erp5_officejs_drone_simulator: changes to make "test drone flight" work
See merge request
!1804
parents
4174385c
93ddab76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
8 deletions
+23
-8
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.js
...hTemplateItem/web_page_module/drone_simulator_logic_js.js
+16
-1
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
...TemplateItem/web_page_module/drone_simulator_logic_js.xml
+2
-2
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.js
...tem/web_page_module/ojs_drone_simulator_script_page_js.js
+3
-3
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.xml
...em/web_page_module/ojs_drone_simulator_script_page_js.xml
+2
-2
No files found.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.js
View file @
715a2c20
...
...
@@ -3,6 +3,8 @@
unparam: true */
var
GAMEPARAMETERS
=
{};
//for DEBUG/TEST mode
var
baseLogFunction
=
console
.
log
,
console_log
=
""
;
/******************************* DRONE MANAGER ********************************/
var
DroneManager
=
/** @class */
(
function
()
{
...
...
@@ -549,6 +551,15 @@ var GameManager = /** @class */ (function () {
FixedWingDroneAPI
:
FixedWingDroneAPI
,
DroneLogAPI
:
DroneLogAPI
};
if
(
this
.
_game_parameters_json
.
debug_test_mode
)
{
console
.
log
=
function
()
{
baseLogFunction
.
apply
(
console
,
arguments
);
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
);
for
(
var
i
=
0
;
i
<
args
.
length
;
i
++
)
{
console_log
+=
args
[
i
]
+
"
\n
"
;
}
};
}
}
Object
.
defineProperty
(
GameManager
.
prototype
,
"
gameParameter
"
,
{
...
...
@@ -563,7 +574,11 @@ var GameManager = /** @class */ (function () {
var
gadget
=
this
;
return
gadget
.
_init
()
.
push
(
function
()
{
return
gadget
.
_flight_log
;
return
{
'
message
'
:
gadget
.
_result_message
,
'
content
'
:
gadget
.
_flight_log
,
'
console_log
'
:
console_log
};
});
};
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
View file @
715a2c20
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
10
09.36979.45339.6075
</string>
</value>
<value>
<string>
10
10.3592.54606.53538
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
16
88635184.98
</float>
<float>
16
90478004.4
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.js
View file @
715a2c20
...
...
@@ -555,9 +555,9 @@
.
push
(
function
(
result
)
{
var
a
,
blob
,
div
,
key
,
log
,
log_content
;
i
=
0
;
for
(
key
in
result
)
{
if
(
result
.
hasOwnProperty
(
key
))
{
log_content
=
result
[
key
].
join
(
'
\n
'
).
replaceAll
(
"
,
"
,
"
;
"
);
for
(
key
in
result
.
content
)
{
if
(
result
.
content
.
hasOwnProperty
(
key
))
{
log_content
=
result
.
content
[
key
].
join
(
'
\n
'
).
replaceAll
(
"
,
"
,
"
;
"
);
blob
=
new
Blob
([
log_content
],
{
type
:
'
text/plain
'
});
a
=
domsugar
(
'
a
'
,
{
text
:
'
Download Simulation LOG
'
+
i
,
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.xml
View file @
715a2c20
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1009.
22574.47206.13909
</string>
</value>
<value>
<string>
1009.
59163.16294.47701
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
16
87785962.67
</float>
<float>
16
90477710.21
</float>
<string>
UTC
</string>
</tuple>
</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