Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular periodic GPS Watchdog timeout #41

Closed
dojomouse opened this issue Oct 7, 2012 · 3 comments
Closed

Regular periodic GPS Watchdog timeout #41

dojomouse opened this issue Oct 7, 2012 · 3 comments

Comments

@dojomouse
Copy link
Contributor

Firmware was current on Oct 5th.

GPS is detected on startup, position is accurate.

I get regular mavlink messages (every 28 seconds) saying "UBX Module stopped responding", followed by immediate reconnection "UBX Module found, status ok".

Looking at the related code in ubx_watchdog_loop, I wonder if there's a bug - ubx_fault_count is only reset when ubx_healthy changes from False to True. Once the system is healthy, any errors (instances of !all_ok) are integrated up until eventually they equal the ubx_health_fail_counter_limit, at which point the "stopped responding" error is given. As coded this is inevitable unless all_okay is never false.

If this is the problem, a solution would be to move:

else {
/* gps healthy */
ubx_success_count++;
ubx_fail_count = 0; // TO HERE
if (!ubx_healthy && ubx_success_count == UBX_HEALTH_SUCCESS_COUNTER_LIMIT) {
//printf("[gps] ublox UBX module status ok (baud=%d)\r\n", current_gps_speed);
// global_data_send_subsystem_info(&ubx_present_enabled_healthy);
mavlink_log_info(mavlink_fd, "[gps] UBX module found, status ok\n");
ubx_healthy = true;
ubx_fail_count = 0; // FROM HERE
once_ok = true;
}
}

@LorenzMeier
Copy link
Member

This has been fixed in the current master - please pull and verify. Thanks!

@dojomouse
Copy link
Contributor Author

Finally got around to checking it - this issue is fixed, but a new bug maybe introduced in the process; the last mavlink message I get is the "trying to connect to ubx module" one... never any success notification. GPS works fine with no dropouts, but status is messed up. Should I file a new bug report?

@px4dev
Copy link
Contributor

px4dev commented Nov 12, 2012

The answer to "should I file a bug report" is almost always "yes" - if you file and it's a dupe or we know about it, no big deal. But if you don't, we may never learn of your problem.

Please always file a bug if you've run into something you think is wrong. Bugs are good; lots of bug reports means lots of information we can use to improve the software.

TSC21 pushed a commit to TSC21/Firmware that referenced this issue Feb 15, 2019
EKF2: Prevent declination/heading drift during non-GPS operation
PX4BuildBot added a commit that referenced this issue Jan 5, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master
 - PX4/NuttX@534640e

Changes from PX4/NuttX (PX4/NuttX@9331fda) in current PX4/master (ce1e976)
PX4/NuttX@9331fda...534640e

534640e561 (HEAD, origin/master) Merge branch 'master' of bitbucket.org:nuttx/nuttx
828c650aee Merge branch 'master' of github.com:apache/incubator-nuttx
5d5897c Merge pull request #41 from wingunder/wingunder_fix_compilation_bug_irq_f7_h7
00df2f0 Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
c9893dc989 Merge branch 'master' of github.com:apache/incubator-nuttx
7179f29 Merge pull request #40 from xiaoxiang781216/fix-shell-script-format
3b9efc9 Format all shell scripts in tools folder
519ed4b383 Merge branch 'master' of github.com:apache/incubator-nuttx
390ebd5 arch/arm/src/stm32h7:  Port QSPI driver from STM32F7 to STM32H7
db9b969c50 Merge branch 'master' of bitbucket.org:nuttx/nuttx

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master
 - PX4/NuttX-apps@74ba8ff

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (ce1e976)
PX4/NuttX-apps@91b6ad6...74ba8ff

74ba8ff2 (HEAD -> master, origin/master) Merge pull request #5 from xiaoxiang781216/fix-void-cast
f00b4e6f Merge pull request #4 from xiaoxiang781216/fix-suffix
85715845 Unify the void cast usage
6a65664c Application.mk remove _main suffix from REGLIST
73e1696e Merge pull request #3 from xiaoxiang781216/builtin
7a645baa Add .updated target to handle the no builtin app case correctly
8c8c4813 fix builtin_list.c:58:10: fatal error: builtin_proto.h: No such file or directory (#2)
64bc8f5b Run all .c and .h files modified in last PR through nxstyle.
49c99750 Wapi simplify (#1)
0536c5b5 apps/nshlib/nsh_parse.c:  Correct an error found in build testing.  Commit 2a462c78aa5f4ea6dc374eedd86bc85f9f79a0c4 was insufficient.  It was a mistake to revert Xiang's change of commit 9defae8af641752506d92b72ea68c8f94d24d580.  But we are on a different vector now.
PX4BuildBot added a commit that referenced this issue Jan 6, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master
 - PX4/NuttX@0360bb8

Changes from PX4/NuttX (PX4/NuttX@9331fda) in current PX4/master (1484dfe)
PX4/NuttX@9331fda...0360bb8

0360bb830d (HEAD, origin/master) Merge branch 'master' of bitbucket.org:nuttx/nuttx
9202df8a27 Merge branch 'master' of github.com:apache/incubator-nuttx
981d700 Remove inet_setipid since nobody use it
534640e561 Merge branch 'master' of bitbucket.org:nuttx/nuttx
828c650aee Merge branch 'master' of github.com:apache/incubator-nuttx
5d5897c Merge pull request #41 from wingunder/wingunder_fix_compilation_bug_irq_f7_h7
00df2f0 Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
c9893dc989 Merge branch 'master' of github.com:apache/incubator-nuttx
7179f29 Merge pull request #40 from xiaoxiang781216/fix-shell-script-format
3b9efc9 Format all shell scripts in tools folder

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master
 - PX4/NuttX-apps@74ba8ff

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (1484dfe)
PX4/NuttX-apps@91b6ad6...74ba8ff

74ba8ff2 (HEAD -> master, origin/master) Merge pull request #5 from xiaoxiang781216/fix-void-cast
f00b4e6f Merge pull request #4 from xiaoxiang781216/fix-suffix
85715845 Unify the void cast usage
6a65664c Application.mk remove _main suffix from REGLIST
73e1696e Merge pull request #3 from xiaoxiang781216/builtin
7a645baa Add .updated target to handle the no builtin app case correctly
8c8c4813 fix builtin_list.c:58:10: fatal error: builtin_proto.h: No such file or directory (#2)
64bc8f5b Run all .c and .h files modified in last PR through nxstyle.
49c99750 Wapi simplify (#1)
0536c5b5 apps/nshlib/nsh_parse.c:  Correct an error found in build testing.  Commit 2a462c78aa5f4ea6dc374eedd86bc85f9f79a0c4 was insufficient.  It was a mistake to revert Xiang's change of commit 9defae8af641752506d92b72ea68c8f94d24d580.  But we are on a different vector now.
PX4BuildBot added a commit that referenced this issue Jan 7, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master
 - PX4/NuttX@65f8cab

Changes from PX4/NuttX (PX4/NuttX@9331fda) in current PX4/master (fc9df31)
PX4/NuttX@9331fda...65f8cab

65f8cab623 (HEAD, origin/master) Merge branch 'master' of github.com:apache/incubator-nuttx
0b3dac2 Author: Gregory Nutt <gnutt@nuttx.org>
0360bb830d Merge branch 'master' of bitbucket.org:nuttx/nuttx
9202df8a27 Merge branch 'master' of github.com:apache/incubator-nuttx
981d700 Remove inet_setipid since nobody use it
534640e561 Merge branch 'master' of bitbucket.org:nuttx/nuttx
828c650aee Merge branch 'master' of github.com:apache/incubator-nuttx
5d5897c Merge pull request #41 from wingunder/wingunder_fix_compilation_bug_irq_f7_h7
00df2f0 Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
c9893dc989 Merge branch 'master' of github.com:apache/incubator-nuttx

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master
 - PX4/NuttX-apps@74ba8ff

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (fc9df31)
PX4/NuttX-apps@91b6ad6...74ba8ff

74ba8ff2 (HEAD -> master, origin/master) Merge pull request #5 from xiaoxiang781216/fix-void-cast
f00b4e6f Merge pull request #4 from xiaoxiang781216/fix-suffix
85715845 Unify the void cast usage
6a65664c Application.mk remove _main suffix from REGLIST
73e1696e Merge pull request #3 from xiaoxiang781216/builtin
7a645baa Add .updated target to handle the no builtin app case correctly
8c8c4813 fix builtin_list.c:58:10: fatal error: builtin_proto.h: No such file or directory (#2)
64bc8f5b Run all .c and .h files modified in last PR through nxstyle.
49c99750 Wapi simplify (#1)
0536c5b5 apps/nshlib/nsh_parse.c:  Correct an error found in build testing.  Commit 2a462c78aa5f4ea6dc374eedd86bc85f9f79a0c4 was insufficient.  It was a mistake to revert Xiang's change of commit 9defae8af641752506d92b72ea68c8f94d24d580.  But we are on a different vector now.
PX4BuildBot added a commit that referenced this issue Feb 1, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master
 - PX4/NuttX@4b529f5

Changes from PX4/NuttX (PX4/NuttX@7b36108) in current PX4/master (9d2a37b)
PX4/NuttX@7b36108...4b529f5

4b529f5232 (HEAD, origin/master) Merge branch 'master' of github.com:apache/incubator-nuttx
5c80b94 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
95dc647 mm/umm_heap/: Handle size zero in umm_malloc.c and umm_realloc.c, which causes a system freeze in kernel mode.
67ae5b3 include/nuttx/net/igmp.h: fix build break by previous network changes (#196)
e86b516 include/netinet/arp.h:  Previous network changes broke the build test (#193)
4a238f2 Fix the wrong IPv6 TCP MSS calculation
3ae5f52 Add FAR for pointer type for socket header files
c1b0aa1 Remove psock_send and sockfd_socket from net/socket/socket.h
0fc7668 sendto should always call send if to == NULL || tolen <= 0
7e67add Implment SO_ACCEPTCONN

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master
 - PX4/NuttX-apps@1154735

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (9d2a37b)
PX4/NuttX-apps@91b6ad6...1154735

1154735c (HEAD -> master, origin/master) Refine the preprocess conditional guard style
e0dcfa0c Remove extra whitespace from files (#43)
3dbf8d56 testing/cxxtest/Make.defs: Append cxxtest to CONFIGURED_APPS (#42)
8c9663b6 apps/examples/userfs/userfs_main.c:  Fix warning (#41)
7a8790f1 apps/testing/mm:  Make stacksize configurable (#40)
ba637707 apps/testing/mm:  Move from apps/examples/mm (#39)
4e509c86 Revert "examples: hello: Show CPU index when running in SMP mode"
715517b1 examples: hello: Show CPU index when running in SMP mode
59b763ad netutils/netlib: Fix buffer overflow
b6890df5 Fix a build on macOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants