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
141
Merge Requests
141
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
81cb4c40
Commit
81cb4c40
authored
Feb 13, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'nexedi/master' into zope4py2
parents
81b1ff45
d8b91190
Pipeline
#26564
passed with stage
in 0 seconds
Changes
14
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
982 additions
and
752 deletions
+982
-752
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_droneaaailefixe_js.js
...tem/web_page_module/drone_simulator_droneaaailefixe_js.js
+0
-338
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_dronelogfollower_js.js
...em/web_page_module/drone_simulator_dronelogfollower_js.js
+46
-33
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_dronelogfollower_js.xml
...m/web_page_module/drone_simulator_dronelogfollower_js.xml
+2
-2
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.js
...Item/web_page_module/drone_simulator_fixedwingdrone_js.js
+513
-0
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.xml
...tem/web_page_module/drone_simulator_fixedwingdrone_js.xml
+6
-77
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.js
...hTemplateItem/web_page_module/drone_simulator_logic_js.js
+220
-156
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
...TemplateItem/web_page_module/drone_simulator_logic_js.xml
+3
-74
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_log_page_js.js
...teItem/web_page_module/ojs_drone_simulator_log_page_js.js
+1
-1
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_log_page_js.xml
...eItem/web_page_module/ojs_drone_simulator_log_page_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
+176
-62
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
bt5/erp5_officejs_drone_simulator/SkinTemplateItem/portal_skins/erp5_officejs_drone_simulator/WebSection_getDroneSimulatorPrecacheManifestList.py
...lator/WebSection_getDroneSimulatorPrecacheManifestList.py
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_babylonjs_web_worker_js.js
...mplateItem/web_page_module/rjs_babylonjs_web_worker_js.js
+8
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_babylonjs_web_worker_js.xml
...plateItem/web_page_module/rjs_babylonjs_web_worker_js.xml
+2
-2
No files found.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_droneaaailefixe_js.js
deleted
100644 → 0
View file @
81b1ff45
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_dronelogfollower_js.js
View file @
81cb4c40
/*global console*/
/*global
BABYLON,
console*/
/*jslint nomen: true, indent: 2, maxlen: 80, white: true */
/**************************** DRONE LOG FOLLOWER ******************************/
var
DroneLogAPI
=
/** @class */
(
function
()
{
"
use strict
"
;
var
TOP_SPEED
=
250
;
//so fast that it virtually "teleports" to target
//** CONSTRUCTOR
function
DroneLogAPI
(
gameManager
,
drone_info
,
flight_parameters
,
id
)
{
this
.
_gameManager
=
gameManager
;
...
...
@@ -15,7 +16,13 @@ var DroneLogAPI = /** @class */ (function () {
/*
** Function called at start phase of the drone, just before onStart AI script
*/
DroneLogAPI
.
prototype
.
internal_start
=
function
()
{
DroneLogAPI
.
prototype
.
internal_start
=
function
(
drone
)
{
drone
.
_minAcceleration
=
-
1
;
drone
.
_maxAcceleration
=
1
;
drone
.
_minSpeed
=
TOP_SPEED
;
drone
.
_maxSpeed
=
TOP_SPEED
;
drone
.
_acceleration
=
10
;
drone
.
_speed
=
TOP_SPEED
;
function
getLogEntries
(
log
)
{
var
i
,
line_list
=
log
.
split
(
'
\n
'
),
log_entry_list
=
[],
log_entry
,
log_header_found
;
...
...
@@ -69,22 +76,43 @@ var DroneLogAPI = /** @class */ (function () {
this
.
_flight_parameters
.
converted_log_point_list
=
converted_log_point_list
;
};
/*
** Function called on every drone update, right before onUpdate AI script
*/
DroneLogAPI
.
prototype
.
internal_update
=
function
(
context
,
delta_time
)
{
var
updateSpeed
;
context
.
_speed
+=
context
.
_acceleration
*
delta_time
/
1000
;
if
(
context
.
_speed
>
context
.
_maxSpeed
)
{
context
.
_speed
=
context
.
_maxSpeed
;
}
if
(
context
.
_speed
<
-
context
.
_maxSpeed
)
{
context
.
_speed
=
-
context
.
_maxSpeed
;
}
updateSpeed
=
context
.
_speed
*
delta_time
/
1000
;
if
(
context
.
_direction
.
x
!==
0
||
context
.
_direction
.
y
!==
0
||
context
.
_direction
.
z
!==
0
)
{
context
.
_controlMesh
.
position
.
addInPlace
(
new
BABYLON
.
Vector3
(
context
.
_direction
.
x
*
updateSpeed
,
context
.
_direction
.
y
*
updateSpeed
,
context
.
_direction
.
z
*
updateSpeed
));
}
context
.
_controlMesh
.
computeWorldMatrix
(
true
);
context
.
_mesh
.
computeWorldMatrix
(
true
);
};
/*
** Function called on every drone update, right after onUpdate AI script
*/
DroneLogAPI
.
prototype
.
internal_
update
=
function
(
)
{
DroneLogAPI
.
prototype
.
internal_
post_update
=
function
(
drone
)
{
return
;
};
DroneLogAPI
.
prototype
.
internal_setTargetCoordinates
=
function
(
drone
,
x
,
y
,
z
)
{
var
coordinates
=
this
.
processCoordinates
(
x
,
y
,
z
);
function
(
drone
,
coordinates
)
{
coordinates
.
x
-=
drone
.
_controlMesh
.
position
.
x
;
coordinates
.
y
-=
drone
.
_controlMesh
.
position
.
z
;
coordinates
.
z
-=
drone
.
_controlMesh
.
position
.
y
;
drone
.
setDirection
(
coordinates
.
x
,
coordinates
.
y
,
coordinates
.
z
);
drone
.
setAcceleration
(
drone
.
_maxAcceleration
);
return
;
};
DroneLogAPI
.
prototype
.
sendMsg
=
function
(
msg
,
to
)
{
return
;
};
...
...
@@ -96,6 +124,16 @@ var DroneLogAPI = /** @class */ (function () {
return
this
.
_gameManager
.
gameParameter
[
name
];
}
};
DroneLogAPI
.
prototype
.
setStartingPosition
=
function
(
drone
,
x
,
y
,
z
)
{
if
(
!
drone
.
_canPlay
)
{
if
(
z
<=
0.05
)
{
z
=
0.05
;
}
drone
.
_controlMesh
.
position
=
new
BABYLON
.
Vector3
(
x
,
z
,
y
);
}
drone
.
_controlMesh
.
computeWorldMatrix
(
true
);
drone
.
_mesh
.
computeWorldMatrix
(
true
);
};
DroneLogAPI
.
prototype
.
processCoordinates
=
function
(
x
,
y
,
z
)
{
if
(
isNaN
(
x
)
||
isNaN
(
y
)
||
isNaN
(
z
)){
throw
new
Error
(
'
Target coordinates must be numbers
'
);
...
...
@@ -126,12 +164,11 @@ var DroneLogAPI = /** @class */ (function () {
'
me.setTargetCoordinates(me.checkpoint_list[0][0],
'
+
'
me.checkpoint_list[0][1], me.checkpoint_list[0][2]);
'
+
'
me.last_checkpoint_reached = -1;
'
+
'
me.setAcceleration(10);
'
+
'
};
'
+
'
me.onUpdate = function(timestamp) {
'
+
'
var next_checkpoint = me.checkpoint_list
'
+
'
[me.last_checkpoint_reached+1];
'
+
'
if (distance([me.position.x, me.position.y], next_checkpoint) < 1
2
) {
'
+
'
if (distance([me.position.x, me.position.y], next_checkpoint) < 1
0
) {
'
+
'
me.going = false;
'
+
'
var log_elapsed = next_checkpoint[3] - me.initTimestamp,
'
+
'
time_elapsed = new Date() - me.startTime;
'
+
...
...
@@ -165,30 +202,6 @@ var DroneLogAPI = /** @class */ (function () {
z
:
z
};
};
DroneLogAPI
.
prototype
.
set_loiter_mode
=
function
(
radius
,
drone
)
{
return
;
};
DroneLogAPI
.
prototype
.
setAltitude
=
function
(
altitude
,
drone
)
{
return
;
};
DroneLogAPI
.
prototype
.
getMaxSpeed
=
function
()
{
return
3000
;
};
DroneLogAPI
.
prototype
.
getInitialAltitude
=
function
()
{
return
0
;
};
DroneLogAPI
.
prototype
.
getAltitudeAbs
=
function
()
{
return
0
;
};
DroneLogAPI
.
prototype
.
getMinHeight
=
function
()
{
return
0
;
};
DroneLogAPI
.
prototype
.
getMaxHeight
=
function
()
{
return
220
;
};
DroneLogAPI
.
prototype
.
triggerParachute
=
function
(
drone
)
{
return
;
};
DroneLogAPI
.
prototype
.
getFlightParameters
=
function
()
{
return
this
.
_flight_parameters
;
};
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_dronelogfollower_js.xml
View file @
81cb4c40
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
4.33468.24270.4891
3
</string>
</value>
<value>
<string>
100
6.4961.7659.5304
3
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
16
69196851.1
8
</float>
<float>
16
75263473.0
8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.js
0 → 100644
View file @
81cb4c40
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_
droneaaailefix
e_js.xml
→
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_
fixedwingdron
e_js.xml
View file @
81cb4c40
...
...
@@ -75,7 +75,7 @@
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_drone_simulator_
droneaaailefixe
.js
</string>
</value>
<value>
<string>
gadget_erp5_page_drone_simulator_
logic
.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -85,7 +85,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
drone_simulator_
droneaaailefixe
_js
</string>
</value>
<value>
<string>
drone_simulator_
logic
_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
...
...
@@ -105,7 +105,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Drone
A Aile Fixe (API)
</string>
</value>
<value>
<string>
Drone
Logic
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
...
...
@@ -144,12 +144,6 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -197,7 +191,7 @@
</tuple>
<state>
<tuple>
<float>
16
64807682.76
</float>
<float>
16
74834569.27
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
@@ -246,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
4.62583.63891.22220
</string>
</value>
<value>
<string>
100
6.2016.60568.40294
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,72 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1670856495.99
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
empty
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<tuple>
<float>
1664807031.69
</float>
<float>
1675086932.85
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.js
View file @
81cb4c40
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
View file @
81cb4c40
...
...
@@ -144,12 +144,6 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -197,7 +191,7 @@
</tuple>
<state>
<tuple>
<float>
16
62477480.35
</float>
<float>
16
74834569.27
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
@@ -246,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
4.32349.9544.44100
</string>
</value>
<value>
<string>
100
6.2016.60568.40294
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,72 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1670852474.69
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
empty
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<tuple>
<float>
1662477378.07
</float>
<float>
1675086932.85
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_log_page_js.js
View file @
81cb4c40
...
...
@@ -13,7 +13,7 @@
HEIGHT
=
340
,
LOGIC_FILE_LIST
=
[
'
gadget_erp5_page_drone_simulator_logic.js
'
,
'
gadget_erp5_page_drone_simulator_
droneaaailefix
e.js
'
,
'
gadget_erp5_page_drone_simulator_
fixedwingdron
e.js
'
,
'
gadget_erp5_page_drone_simulator_dronelogfollower.js
'
];
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_log_page_js.xml
View file @
81cb4c40
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1005.
1310.34623.11861
</string>
</value>
<value>
<string>
1005.
28725.31731.34065
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
167
1112620.77
</float>
<float>
167
2757496.65
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.js
View file @
81cb4c40
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.xml
View file @
81cb4c40
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
5.37533.1915.8379
</string>
</value>
<value>
<string>
100
6.17791.59880.25668
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
167
3286304.13
</float>
<float>
167
6033282.59
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/SkinTemplateItem/portal_skins/erp5_officejs_drone_simulator/WebSection_getDroneSimulatorPrecacheManifestList.py
View file @
81cb4c40
...
...
@@ -6,7 +6,7 @@ url_list = [
"gadget_erp5_page_drone_simulator_log_page.js"
,
"gadget_erp5_panel_drone_simulator.html"
,
"gadget_erp5_panel_drone_simulator.js"
,
"gadget_erp5_page_drone_simulator_
droneaaailefix
e.js"
,
"gadget_erp5_page_drone_simulator_
fixedwingdron
e.js"
,
"gadget_erp5_page_drone_simulator_dronelogfollower.js"
,
"drone.png"
,
"gadget_officejs_drone_simulator.json"
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_babylonjs_web_worker_js.js
View file @
81cb4c40
...
...
@@ -52,10 +52,16 @@ function mainToWorker(evt) {
})
.
push
(
function
()
{
return
postMessage
({
'
type
'
:
'
updated
'
});
},
function
(
error
)
{
console
.
log
(
"
ERROR:
"
,
error
);
return
postMessage
({
'
type
'
:
'
error
'
,
'
error
'
:
error
});
});
case
'
event
'
:
handleEvent
(
evt
.
data
);
break
;
return
new
RSVP
.
Queue
(
handleEvent
(
evt
.
data
))
.
push
(
undefined
,
function
(
error
)
{
console
.
log
(
"
ERROR:
"
,
error
);
return
postMessage
({
'
type
'
:
'
error
'
,
'
error
'
:
error
});
});
default
:
throw
new
Error
(
'
Unsupported message
'
+
JSON
.
stringify
(
evt
.
data
));
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_babylonjs_web_worker_js.xml
View file @
81cb4c40
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
4.22590.57904.22954
</string>
</value>
<value>
<string>
100
5.41422.8371.11861
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
167
1113075.12
</float>
<float>
167
4224630.4
</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