Commit Graph

216 Commits

Author SHA1 Message Date
Randy Mackay f7ec08ff18 AP_Logger: add Write_Winch 2020-08-07 21:55:07 +09:00
Randy Mackay 5d99ce9a84 AP_Logger: remove winch events 2020-08-07 21:55:07 +09:00
Rishabh 251ebf9286 AP_Logger: Log Simple Avoidance 2020-08-05 15:37:04 +09:00
Peter Barker c539698528 AP_Logger: add documentation for GRAW, GRXH and GRXS messages 2020-07-22 12:29:19 +10:00
Mark Whitehorn 2b96b7915b AP_Logger: align PID(RPYAS) description to message names 2020-07-22 09:19:43 +09:00
Peter Barker 721d94a23b AP_Logger: log accumulated power status flags; all flags ever set 2020-07-21 09:12:14 +10:00
Paul Riseborough 0cf70fe961 AP_Logger: Log D gain limit cycle gain scaler
Used by Plane roll and pitch loops in APM_Control
2020-07-13 13:47:50 +10:00
Andrew Tridgell f80ca85428 AP_Logger: use strncpy_noterm 2020-07-10 13:32:24 +10:00
Randy Mackay 30bcf4d13b AP_Logger: VISP and VISV reset counter becomes uint8 2020-06-25 15:31:43 +10:00
Rishabh 4fa2c3f5ba AP_Logger: Log if BendyRuler has avoided changing directions 2020-06-24 11:42:20 +09:00
Randy Mackay 912e089c18 AP_Logger: fix BCL voltage scaling
voltages are in millivolts
2020-06-24 10:19:15 +09:00
Randy Mackay 82423384bf AP_Logger: BCL msg logs up to 12 battery cell voltages 2020-06-24 10:19:15 +09:00
Peter Barker 0c5d31f40f AP_Logger: ensure log directory exists before opening log
This will help with starting logs when inserting a fresh SD card which
doesn't have the ardupilot log directory on it
2020-06-16 12:03:21 +10:00
Peter Barker 66f8359c6b AP_Logger: factor out an ensure_log_directory_exists method 2020-06-16 12:03:21 +10:00
Peter Barker 0e964a4654 AP_Logger: use config error loop rather than abort
Also add a specific check for the length of the labels field
2020-06-10 09:02:35 +10:00
chobitsfan 255c685a8a AP_Logger: fix missing unit description in VISP 2020-06-09 13:31:21 +09:00
Randy Mackay 6714aa4e83 AP_Logger: shorten VISP and VISV log field names 2020-06-09 13:31:21 +09:00
chobits 5e5a0d2111 AP_Logger: log ext nav pos err and ang err 2020-06-09 13:31:21 +09:00
Iampete1 fee5b998bf AP_Logger: add min MB free param 2020-06-09 09:23:25 +10:00
Randy Mackay 08f6b2128e AP_Logger: add VISV field descriptions 2020-06-02 08:33:42 +09:00
Randy Mackay 714975662d AP_Logger: VISP message gets velocity error field 2020-06-02 08:33:42 +09:00
chobits 9b480ca755 AP_Logger: support VISION_SPEED_ESTIMATE 2020-06-01 17:51:24 +09:00
MisterMower 41245acf14 AP_Logger: Added units to CurrTot message
Units are not associated with the CurrTot message. AP_BattMonitor.h indicates the total current consumed is reported in mAh. This change sets the units for CurrTot to Ampere seconds and applies a multiplier of 3.6 to convert the reported mAh value to Ampere seconds.
2020-05-26 16:19:14 +10:00
Peter Barker 1d9c2b1726 AP_Logger: add documentation for SBPH and SBRH 2020-05-26 14:13:06 +10:00
Peter Barker 49918d070e AP_Logger: add documentation for ESC LoggerMessage 2020-05-24 13:07:35 +10:00
Peter Barker cc60faa58e AP_Logger: use single message number for all ESCs by using instance # 2020-05-24 13:07:35 +10:00
Andrew Tridgell 97f335396b AP_Scripting: fixed memory leak 2020-05-19 09:09:48 +10:00
Peter Hall 19ba9abc89 AP_Logger: add function and make public for scripting use 2020-05-19 09:09:48 +10:00
Peter Barker 115751833b AP_Logger: process pending rotate on arming
If the user arms the vehicle during the logging-persist-timeout we
should rotate the log immediately.
2020-05-15 16:02:09 +10:00
Peter Barker ca4af94833 AP_Logger: prevent potential infinite recursion in log-open codepath
If anything in start_new_log did logging (for example, by sending a
statustext), we end up infinitely recursing.

With the patch:

diff --git a/libraries/AP_Logger/AP_Logger_File.cpp b/libraries/AP_Logger/AP_Logger_File.cpp
index 69b8ef0431..eb422d10f8 100644
--- a/libraries/AP_Logger/AP_Logger_File.cpp
+++ b/libraries/AP_Logger/AP_Logger_File.cpp
@@ -778,6 +778,7 @@ void AP_Logger_File::PrepForArming()
  */
 void AP_Logger_File::start_new_log(void)
 {
+    gcs().send_text(MAV_SEVERITY_WARNING, "Starting new log");
     stop_logging();

     start_new_log_reset_variables();
pbarker@bluebottle:~/rc/ardupilot(master)$

We see:

    at ../../libraries/AP_Logger/AP_Logger_File.cpp:781
    this=0x555555ad9d30, pBuffer=0x7fffff8209d0, size=75, is_critical=true)
    at ../../libraries/AP_Logger/AP_Logger_Backend.cpp:372
    this=0x555555ad9d30, pBuffer=0x7fffff8209d0, size=75)
    at ../../libraries/AP_Logger/AP_Logger_Backend.h:32
    this=0x555555ad9d30, message=0x7fffff820b10 "Starting new log")
    at ../../libraries/AP_Logger/LogFile.cpp:466
    this=0x555555a6d758 <copter+11384>,
    message=0x7fffff820b10 "Starting new log")
    at ../../libraries/AP_Logger/AP_Logger.cpp:752
    this=0x555555a6e708 <copter+15400>, severity=MAV_SEVERITY_WARNING,
    fmt=0x5555557d64d0 "Starting new log", arg_list=0x7fffff820be0,
    dest_bitmask=1 '\001') at ../../libraries/GCS_MAVLink/GCS_Common.cpp:1847
    this=0x555555a6e708 <copter+15400>, severity=MAV_SEVERITY_WARNING,
    fmt=0x5555557d64d0 "Starting new log", arg_list=0x7fffff820be0)
    at ../../libraries/GCS_MAVLink/GCS.cpp:53
    this=0x555555a6e708 <copter+15400>, severity=MAV_SEVERITY_WARNING,
    fmt=0x5555557d64d0 "Starting new log")
    at ../../libraries/GCS_MAVLink/GCS.cpp:60
    at ../../libraries/AP_Logger/AP_Logger_File.cpp:781
    this=0x555555ad9d30, pBuffer=0x7fffff820dc0, size=75, is_critical=true)
    at ../../libraries/AP_Logger/AP_Logger_Backend.cpp:372

I'm not aware of any instances in the code where this will actually
happen - but it could easily sneak in.
2020-05-11 15:12:36 +10:00
Peter Barker 7befe84f0c AP_Logger: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker ad9493caca AP_Logger: use logger Write method for logging Solo gimbal
Also document the messages
2020-04-28 09:56:09 +10:00
Peter Barker 830176f2f4 AP_Logger: remove unused SBFE 2020-04-27 16:16:50 +10:00
Peter Barker f882bd0c3e AP_Logger: remove unused UBY1/UBY2 messages
These appear to have been replaced with instance fields on the UBX1 and
UBX2 messages.

Also mark the Instance field on UBX1, UBX2 as an instance field.
2020-04-26 11:35:04 +10:00
Peter Barker 7e3c9c209e AP_Logger: document GPSB and GPAB 2020-04-26 09:02:39 +10:00
Peter Barker eee0f028ba AP_Logger: fix examples
Having a valid AP_Scheduler is now a requirement
2020-04-23 11:33:41 +09:00
Peter Barker a83c25cfa7 AP_Logger: add documentation for EKF messages
NKF0, NKF1, NKF2, NKF3, NKF4, NKF5, NKQ

XKF0, XKF1, XKF2, XKF3, XKF4, XKF5, XKFD, XKQ, XKV1, XKV2
2020-04-21 09:48:43 +10:00
Mark Whitehorn 874c293911 AP_Logger: expand description of GPS.spd 2020-04-18 15:33:43 +10:00
Peter Barker 870159c14f AP_Logger: add times-full to MAV log structure 2020-04-17 22:21:14 +10:00
Peter Barker 908dfa58f3 AP_Logger: remove unused FORMATS stage in DFLogStart messagewriter 2020-04-17 21:42:15 +10:00
Peter Barker 678d6f43c5 AP_Logger: use existing LoggerMessageWriter to log uploaded missions
Instead of creating a MessageWriter explicitly to log uploaded missions
we fiddle the state of the one stored in the startup message writer.

This has the advantage of being much more likely to log the entire
mission (as the buffer constraint is removed), and with the addition of
a time-remaining check much less likely to cause a timing glitch.
2020-04-15 16:24:40 +10:00
Peter Barker d8582d864a AP_Logger: convert Solo gimbal messages to TimeUS from TimeMS
Also remove unused gimbal3 message entirely
2020-04-15 16:11:04 +10:00
Peter Barker acba2a78f6 AP_Logger: add message validation check against duplicate labels 2020-04-14 12:30:58 +10:00
Randy Mackay 4f639481c1 AP_Logger: VISP msg adds reset_counter 2020-04-14 10:28:03 +10:00
Peter Barker 767c010332 AP_Logger: add documentation for WENC, CESC, PRX, ADSB, BCN, BCL, OABR, OADF 2020-04-14 07:34:59 +10:00
Peter Barker c3b8db95b8 AP_Logger: add DSTL log message documentation 2020-04-12 08:36:48 +10:00
Randy Mackay c0187fe05f AP_Logger: add log message description for VISO 2020-04-09 19:41:08 +09:00
Randy Mackay f18be824ea AP_Logger: add VISP message 2020-04-09 19:41:08 +09:00
chobits 63320f140a AP_Logger: constraints time spend in header writing, more complete 2020-04-09 19:17:17 +10:00
chobits b829384fdf AP_Logger: constraints time spended in header writing 2020-04-09 19:17:17 +10:00