this fixes two issues:
The first issue that if we are missing a log file in the middle of the
list then it was not possible to download recent logs, as we get the
incorrect value for total number of logs. This happened for me with
107 logs, with log62 missing from the microSD. It would only show 45
available logs, so the most recent logs could not be downloaded.
The second issue is that get_num_logs() was very slow if there were a
lot of log files in a directory. This would cause EKF errors and ESC
resets. Using a opendir/readdir loop is much faster (approx 10x faster
in my testing with 107 logs on a MatekH743).
the key fix is the reset of the fd to -1. Without that fix we only
ever log @SYS/uarts.txt
The timing change is needed to get the files out in a reasonable
time. The function is actually getting called at 100Hz or less, not
1kHz (measured on MatekH743 copter at 400Hz). So we need to run it
faster to get the files logged in a reasonable time
Make AP_Logger_MAVLink use stderr, so it's easier to follow the debug
outputs without mixing with normal output. And this is also what
AP_Logger is using.
We now use jedec dataflash simulator for this purpose. Hence, we should remove these files and all references to HAL_LOGGING_SITL_ENABLED
Co-Authored-By: Divyateja Pasupuleti <divyateja2004@gmail.com>
ArduPlane uses ~18 messages and the list is relatively static, so this
should be a reasonable reallocation.
We're using a lot of Log_Write(...) to create messages dynamically - but
that requires IDs and we only left space for about 18 before this patch
More space is left to ease future use of IDs in some libraries
this fixes a problem with sdcards where file open is very slow. It can
trigger a watchdog if it is slow enough. Peter and I hit this issue on
a pixracer today with a new sd card
AP_Vehicle.cpp: cast parameter bitmask as (unsigned) per Peter B.
rework per Peter B.
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
remove unnecessary send_internal_error_statustext function
remove Write_InternalError function