Commit d19fa907 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

erp5_officejs_drone_simulator: allow zero for minimum speed

Even if null speed only makes sense for VTOL vehicules, it is a required testing feature as long as there is no dedicated API.
parent 25dbbe77
...@@ -49,7 +49,7 @@ var FixedWingDroneAPI = /** @class */ (function () { ...@@ -49,7 +49,7 @@ var FixedWingDroneAPI = /** @class */ (function () {
throw new Error('max acceleration must be superior to 0'); throw new Error('max acceleration must be superior to 0');
} }
drone._minSpeed = this.getMinSpeed(); drone._minSpeed = this.getMinSpeed();
if (drone._minSpeed <= 0) { if (drone._minSpeed < 0) {
throw new Error('min speed must be superior to 0'); throw new Error('min speed must be superior to 0');
} }
drone._maxSpeed = this.getMaxSpeed(); drone._maxSpeed = this.getMaxSpeed();
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1015.63135.31786.47957</string> </value> <value> <string>1015.64140.4755.42274</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>1713426004.3</float> <float>1713430403.75</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -53,7 +53,7 @@ var FixedWingDroneAPI = /** @class */ (function () { ...@@ -53,7 +53,7 @@ var FixedWingDroneAPI = /** @class */ (function () {
throw new Error('max acceleration must be superior to 0'); throw new Error('max acceleration must be superior to 0');
} }
drone._minSpeed = this.getMinSpeed(); drone._minSpeed = this.getMinSpeed();
if (drone._minSpeed <= 0) { if (drone._minSpeed < 0) {
throw new Error('min speed must be superior to 0'); throw new Error('min speed must be superior to 0');
} }
drone._maxSpeed = this.getMaxSpeed(); drone._maxSpeed = this.getMaxSpeed();
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1015.64135.23574.22357</string> </value> <value> <string>1015.64203.48820.61559</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>1713425740.22</float> <float>1713429850.09</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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