My recent PR exceeded the 50 char limit (apparently the last character must be null?).
This new attempt changes: "Preflight Fail: Horizontal position estimate Error" to: "Preflight Fail: Position estimate Error"
In fact, this newest wording is more easily understood by the average user and is actually more consistent with the other COM_ARM_EKF_xxx related errors:
COM_ARM_EKF_HGT --> "Preflight Fail: Height estimate Error"
COM_ARM_EKF_VEL --> "Preflight Fail: Velocity estimate Error"
COM_ARM_EKF_POS --> "Preflight Fail: Position estimate Error"
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
(Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
- previously it was possible to get a Position Control rejected message
without further advice what was actually wrong. So now we report warnings
even if gps is not required for arming (which could be annoying too...).
- the GPS failure message was very generic, making it hard to debug the
cause. Now we check every bit and send an appropriate warning
All strings were checked not to exceed the maximum length of 50 characters.
To my knowledge this hil transition function is not used anymore,
however, it makes sending the DO_SET_MODE command unnecessarily complex.
In my opinion the DO_SET_MODE command should only change the mode but
not other things like arming (already removed) and HITL state (this
commit).
Often times, I was seeing the error message "Set SYS_HITL to 1 and
reboot to enable HITL." when using QGC with a vehicle in HITL.
HITL is set via parameter which then has an impact in the startup script
where the CLI argument `-hil` is added to some of the commands that
require it (like commander as well).