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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
4c11a38f
Commit
4c11a38f
authored
Nov 23, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_drone_simulator: jslint
parent
81707283
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
23 deletions
+34
-23
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
+32
-21
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/ojs_drone_simulator_script_page_js.js
View file @
4c11a38f
(
function
(
window
,
RSVP
,
rJS
,
domsugar
,
document
,
Blob
)
{
/*jslint indent: 2, maxlen: 100*/
/*global window, rJS, domsugar, document, Blob*/
(
function
(
window
,
rJS
,
domsugar
,
document
,
Blob
)
{
"
use strict
"
;
//Default values
...
...
@@ -143,7 +145,7 @@
})
.
declareMethod
(
'
render
'
,
function
render
()
{
var
gadget
=
this
,
query
;
var
gadget
=
this
;
//
, query;
return
gadget
.
getDeclaredGadget
(
'
form_view
'
)
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
render
({
...
...
@@ -326,13 +328,13 @@
group_list
:
[[
"
left
"
,
[[
"
my_simulation_speed
"
],
[
"
my_simulation_time
"
],
[
"
my_drone_speed
"
],
[
"
my_drone_acceleration
"
],
[
"
my_number_of_drones
"
],
[
"
my_map_height
"
],
[
"
my_start_AMSL
"
]]
],[
[
"
my_drone_speed
"
],
[
"
my_drone_acceleration
"
],
[
"
my_number_of_drones
"
],
[
"
my_map_height
"
],
[
"
my_start_AMSL
"
]]
],
[
"
right
"
,
[[
"
my_minimum_latitud
"
],
[
"
my_maximum_latitud
"
],
[
"
my_minimum_longitud
"
],
[
"
my_maximum_longitud
"
],
[
"
my_init_pos_lat
"
],
[
"
my_init_pos_lon
"
],
[
"
my_init_pos_z
"
]]
[
"
my_minimum_longitud
"
],
[
"
my_maximum_longitud
"
],
[
"
my_init_pos_lat
"
],
[
"
my_init_pos_lon
"
],
[
"
my_init_pos_z
"
]]
],
[
"
bottom
"
,
[[
"
my_script
"
]]
...
...
@@ -361,10 +363,13 @@
return
simulator
.
render
();
})
.
push
(
function
()
{
for
(
var
i
=
0
;
i
<
options
.
number_of_drones
;
i
+=
1
)
{
DRONE_LIST
[
i
]
=
{
"
id
"
:
i
,
"
type
"
:
"
DroneAaileFixeAPI
"
,
"
script_content
"
:
options
.
script
};
var
i
,
game_parameters_json
;
for
(
i
=
0
;
i
<
options
.
number_of_drones
;
i
+=
1
)
{
DRONE_LIST
[
i
]
=
{
"
id
"
:
i
,
"
type
"
:
"
DroneAaileFixeAPI
"
,
"
script_content
"
:
options
.
script
};
}
var
game_parameters_json
=
{
game_parameters_json
=
{
"
drone
"
:
{
"
maxAcceleration
"
:
parseFloat
(
options
.
drone_acceleration
),
"
maxSpeed
"
:
parseFloat
(
options
.
drone_speed
)
...
...
@@ -399,16 +404,22 @@
});
})
.
push
(
function
(
result_list
)
{
for
(
var
i
=
0
;
i
<
result_list
.
length
;
i
+=
1
)
{
var
log_content
=
result_list
[
i
].
join
(
'
\n
'
).
replaceAll
(
"
,
"
,
"
;
"
),
blob
=
new
Blob
([
log_content
],
{
type
:
'
text/plain
'
}),
a
=
domsugar
(
'
a
'
,
{
text
:
'
Download Simulation LOG
'
+
i
,
download
:
'
simulation_log.txt
'
,
href
:
window
.
URL
.
createObjectURL
(
blob
)
}),
log
=
domsugar
(
'
textarea
'
,
{
value
:
log_content
}),
div
=
domsugar
(
'
div
'
,
[
a
]);
var
i
,
log_content
,
blob
,
a
,
log
,
div
;
for
(
i
=
0
;
i
<
result_list
.
length
;
i
+=
1
)
{
log_content
=
result_list
[
i
].
join
(
'
\n
'
).
replaceAll
(
"
,
"
,
"
;
"
);
blob
=
new
Blob
([
log_content
],
{
type
:
'
text/plain
'
});
a
=
domsugar
(
'
a
'
,
{
text
:
'
Download Simulation LOG
'
+
i
,
download
:
'
simulation_log.txt
'
,
href
:
window
.
URL
.
createObjectURL
(
blob
)
});
log
=
domsugar
(
'
textarea
'
,
{
value
:
log_content
});
div
=
domsugar
(
'
div
'
,
[
a
]);
a
.
dataset
.
downloadurl
=
[
'
text/plain
'
,
a
.
download
,
a
.
href
].
join
(
'
:
'
);
document
.
querySelector
(
'
.container
'
).
appendChild
(
div
);
...
...
@@ -417,4 +428,4 @@
});
});
}(
window
,
RSVP
,
rJS
,
domsugar
,
document
,
Blob
));
\ No newline at end of file
}(
window
,
rJS
,
domsugar
,
document
,
Blob
));
\ No newline at end of file
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.xml
View file @
4c11a38f
...
...
@@ -244,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1004.
26821.17898.13209
</string>
</value>
<value>
<string>
1004.
32372.28972.29115
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
166
8799702.
5
</float>
<float>
166
9130240.0
5
</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