Most condition bools in the commander are not used anywhere but in the
commander. It therefore makes sense to move them to a different internal
struct and remove them from the vehicle_status message.
Also, the land_detected should be used by all the modules instead of
getting it through the commander and system_status.
The commander used to consume the battery_status topic and write the
contents after some calculations into the system state. Instead, the
calculations now happen in library calls in systemlib/battery.
This moves the battery fields out of the vehicle_status message into the
battery_status topic.
This brought quite some changes in all modules that need battery
information. The current state is compiling but untested.
The MAV_TYPE enum was not in sync with the mavlink specs anymore. It
makes therefore sense to remove the duplication and include the correct
mavlink header file where it is needed.
Also, error counts which are not populated, can be scrapped.
Since the circuit breaker bools are not actually used anywhere else than
in the commander, it is safe to remove them and replace them with local
bools.
this causes only problems and is not supported by ANSI C. error caused:
fatal error: field '_buf' with variable sized type 'ubx_buf_t' not at the end of a struct or class is a GNU extension
the warning is:
error: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result]
- Note that the simulator still uses gpssim by default
- now the gps module can be used in the SITL. this makes it possible to test
the real gps HW under POSIX
additional steps needed to use it:
- in the rcS_jmavsim_iris, make sure to start the gps instead of gpssim:
gps start -d /dev/ttyACM0 -s
- disable the mavlink serial connection in simulator_mavlink.cpp,
openUart(PIXHAWK_DEVICE, 115200);
- this also fixes a memory leak in the gps module