gateway: fix serialize_gw_speed
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 19 Jul 2012 07:46:48 +0000 (09:46 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 19 Jul 2012 07:53:56 +0000 (09:53 +0200)
commit7d193ee70f76ef8f6e951124e1f5a531e9532049
treeb0b0c86522ab65b443d68018ca618c090fbe7904
parenteb65c941f1fc52acb142e080d710e77496936727
gateway: fix serialize_gw_speed

Values over 320000000 would serialize to 0, which is not correct,
since they should be clipped to the maximum value of the
serialization range.

v2: unchanged, sent with another patch

v3: values 100000000 and 200000000 would result in an exponent of 8,
    which is out-of-range for the exponent.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c