summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub/src/common-cc/path.hh
diff options
context:
space:
mode:
authorOlivier Lanneluc2013-05-03 16:13:51 +0200
committerNicolas Schodet2013-05-03 23:07:15 +0200
commitfd7fc5373ddf2abc42750ac87749f7a374f11fdf (patch)
tree93525b7ac7d1bc482619f0757751ddfb8ec19012 /digital/io-hub/src/common-cc/path.hh
parent93614a3099bda4413d6baf1fc0a4ee3533ca7476 (diff)
digital/io-hub/src/common-cc/path: prevent a possible overflow about navpoints weights
Also increase the weight of navpoints around the first layer to tend to avoid them.
Diffstat (limited to 'digital/io-hub/src/common-cc/path.hh')
-rw-r--r--digital/io-hub/src/common-cc/path.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/digital/io-hub/src/common-cc/path.hh b/digital/io-hub/src/common-cc/path.hh
index b25d4235..beb3a3e5 100644
--- a/digital/io-hub/src/common-cc/path.hh
+++ b/digital/io-hub/src/common-cc/path.hh
@@ -104,10 +104,11 @@ class Path
PATH_CAKE_NAVPOINTS_LAYERS * (PATH_CAKE_NAVPOINTS_NB - PATH_OBSTACLES_NAVPOINTS_NB) +
#endif
PATH_OBSTACLES_NAVPOINTS_LAYERS * (PATH_OBSTACLES_NB * PATH_OBSTACLES_NAVPOINTS_NB));
- /** Navigation points weight precision (2^-n). */
+ /** Navigation points weight precision (2^-n).
+ * Pay attention to overflow on weight_t variables */
static const int PATH_WEIGHT_PRECISION = 4;
- /** Navigation points weight step (2^-n). */
- static const int PATH_WEIGHT_STEP = 6;
+ /** Navigation points weight step * (2^-n). */
+ static const int PATH_WEIGHT_STEP = 8;
/** Extra clearance area added to the radius of the mobile obstacles
* to counter the imprecision of the sonic sensors when the robot brakes */
static const uint16_t PATH_OBSTACLES_CLEARANCE = 60;