Commit 2d570379 authored by Jérome Perrin's avatar Jérome Perrin

Merge remote-tracking branch 'upstream/master' into zope4py3

parents 37c1af0a 1832ca00
...@@ -198,6 +198,7 @@ var FixedWingDroneAPI = /** @class */ (function () { ...@@ -198,6 +198,7 @@ var FixedWingDroneAPI = /** @class */ (function () {
distance, distance,
distanceCos, distanceCos,
distanceSin, distanceSin,
distanceToTarget,
currentSinLat, currentSinLat,
currentLonRad, currentLonRad,
groundSpeed, groundSpeed,
...@@ -209,12 +210,19 @@ var FixedWingDroneAPI = /** @class */ (function () { ...@@ -209,12 +210,19 @@ var FixedWingDroneAPI = /** @class */ (function () {
verticalSpeed, verticalSpeed,
yawToDirection; yawToDirection;
if (this._loiter_mode if (this._loiter_mode) {
&& Math.sqrt( distanceToTarget = Math.sqrt(
Math.pow(drone._targetCoordinates.x - drone.position.x, 2) Math.pow(drone._targetCoordinates.x - drone.position.x, 2)
+ Math.pow(drone._targetCoordinates.y - drone.position.y, 2) + Math.pow(drone._targetCoordinates.y - drone.position.y, 2)
) <= this._loiter_radius) { );
if (Math.abs(distanceToTarget - this._loiter_radius) <= 1) {
newYaw = bearing - 90; newYaw = bearing - 90;
} else if (distanceToTarget < this._loiter_radius) {
newYaw = bearing - 135;
} else {
newYaw = this._getNewYaw(drone, bearing, delta_time);
}
} else { } else {
newYaw = this._getNewYaw(drone, bearing, delta_time); newYaw = this._getNewYaw(drone, bearing, delta_time);
} }
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1010.22099.47894.60006</string> </value> <value> <string>1010.43751.23980.5597</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1691588633.42</float> <float>1692888030.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -142,6 +142,7 @@ class PasswordTool(BaseTool): ...@@ -142,6 +142,7 @@ class PasswordTool(BaseTool):
# check user exists, and have an email # check user exists, and have an email
user_path_set = {x['path'] for x in self.getPortalObject().acl_users.searchUsers( user_path_set = {x['path'] for x in self.getPortalObject().acl_users.searchUsers(
login=user_login, login=user_login,
login_portal_type='ERP5 Login',
exact_match=True, exact_match=True,
) if 'path' in x} ) if 'path' in x}
if len(user_path_set) == 0: if len(user_path_set) == 0:
...@@ -253,6 +254,7 @@ class PasswordTool(BaseTool): ...@@ -253,6 +254,7 @@ class PasswordTool(BaseTool):
return [] return []
user_dict_list = portal.acl_users.searchUsers( user_dict_list = portal.acl_users.searchUsers(
login=register_user_login, login=register_user_login,
login_portal_type='ERP5 Login',
exact_match=True, exact_match=True,
) )
if user_dict_list: if user_dict_list:
...@@ -300,6 +302,7 @@ class PasswordTool(BaseTool): ...@@ -300,6 +302,7 @@ class PasswordTool(BaseTool):
portal = self.getPortalObject() portal = self.getPortalObject()
user_dict, = portal.acl_users.searchUsers( user_dict, = portal.acl_users.searchUsers(
login=register_user_login, login=register_user_login,
login_portal_type='ERP5 Login',
exact_match=True, exact_match=True,
) )
login_dict, = user_dict['login_list'] login_dict, = user_dict['login_list']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment