In the listener & aggregator, the signal strength is stored as an
unsigned byte. To display the actual (negative) value, one must
substract 256 (0x100) to the unsigned value.
This commit changes several things:
- Use the decimal (256) instead of the hexadecimal value (0x100).
- Don't substract 256 when copying the value to another unsigned byte
(aggregator).
- Be careful with the type length. In the positioning server, a SS
could be copied to a signed byte, while (theoretically) the negative
value can exceed the capacity of the signed byte. measurement.hh now
defines a type ss_t to store a signal strength value with the good
size (it is currently an int_fast16_t).
"start_time" was meaningless in the global data structures of owlps.h,
and could lead to errors in the aggregator, since it defines a field
start_time in one of its internal structures.
Fix some typos and reorganise the command-line options' descriptions.
Rename positioning.radar-* --> positioning.radar.*
Same in the sample configuration file.
Add the compile-time option ENABLE_KEEP_MONITOR to enable/disable the
option -K. That allows to make optional the dependency on iwlib.
This option is disabled by default in the Makefiles.
If an algorithm name is specified more than once (e.g. once in the
configuration file and once on the command line), the algorithm is
now executed only once.
Use functions from libowlps-resultreader in receive_position(). By the
way, this function is still not really useful, as we do not verify that
the received result correspond to the set request.
On *BSD, usleep() does not accept an argument greater than 1'000'000 (1
second). owl_msleep() decomposes its arguments to use sleep() and
usleep() calls.
Do not use exit() from
UserInterface::print_information_and_exit_if_requested(), set owl_run to
false instead. This function is renamed print_information().
The configuration parsing function could call exit() (e.g. with -h, -V,
or in case of error), implying a memory leak. This is fixed.
Additionally, minor cleaning in the configuration functions.
This commit fixes a segfault that occurred in certain circumstances with
the option positioning.radar-ignore-ap-reference-points activated. The
bug was introduced with this option in 0da98cdb.