PUD: when gateway changed, always update it on the uplink
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 15 Mar 2012 10:10:47 +0000 (11:10 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 15 Mar 2012 10:31:16 +0000 (11:31 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/receiver.c

index 5a579dd..dfd7c61 100644 (file)
@@ -378,7 +378,7 @@ static void pud_gateway_timer_callback(void *context __attribute__ ((unused))) {
         * Update transmitGpsInformation
         */
 
-       if ((externalState == MOVEMENT_STATE_MOVING) || subStateExternalStateChange) {
+       if (movingNow == TRISTATE_BOOLEAN_SET) {
                transmitGpsInformation.txGateway = bestGateway;
        }