This allows a ICM20xxxx with an unkown product ID to be used
with the mpu6000 driver.
This change will issues a warning for any part with an unknown product ID.
For mpu6000 parts (-T 6000 or not specified) it will then exit.
For any ICM20xxxx part with an unknown product ID it will accept the ID
and run with it.
N.B. This fix expecte the value in the product ID register to be
a per chip constant. (Not changing during operations)
Necessary so that build_git_version.h is generated before version.c is
compiled.
Error before:
../src/lib/version/version.c:152:31: error: 'PX4_GIT_TAG_STR' undeclared (first use in this function)
return version_tag_to_number(PX4_GIT_TAG_STR);
Since the git hashes were being generate by cmake it would only be
generated if the header file was not present. Simple test:
$ make aerofc-v1_default
$ touch a
$ git add a
$ git commit -m tmp
$ make aerofc-v1_default
The file build_aerofc-v1_default/build_git_version.h should have the new
hashes and the correspondent .c/c.pp files should be rebuilt, but they
aren't. The end result is that checking the version with "ver git" in
the nsh console will point to the wrong commit.
This moves the generation of the header to a separate tool and enforces
the command to be executed every time.
in particular:
- SW release version (in addition to the git hash)
- OS version (tag + git hash if exists)
- mcu version & revision & UUID
- toolchain version
The uuid can be disabled via parameter, it's enabled by default.
_global_pos_sub->update(&_global_pos_time, &global_pos); could return
false and in that case global_pos was not set but still accessed.
This is prevented by checking if timestamp == 0.
boards define BOARD_NAME, so board_name() is not necessary. HW_ARCH was
just a wrapper around board_name().
This patch simplifies to having only one common method px4_board_name().