diff --git a/.github/workflows/carbonix_build.yml b/.github/workflows/carbonix_build.yml index d3ac52fbbb..07ddbcf90c 100644 --- a/.github/workflows/carbonix_build.yml +++ b/.github/workflows/carbonix_build.yml @@ -202,7 +202,7 @@ jobs: - name: Extract firmware version and commit id id: extract_info run: | - FIRMWARE_VERSION=$(grep -oP '#define AP_CUSTOM_FIRMWARE_STRING "\K(.*)(?=")' libraries/AP_Common/AP_FWVersionDefine.h) + FIRMWARE_VERSION=$(grep -oP '#define AP_CUSTOM_FIRMWARE_STRING "\K(.*)(?=")' libraries/AP_Common/CxVersion.h) COMMIT_ID=$(git rev-parse --short HEAD) echo "firmware_version=$FIRMWARE_VERSION" >> $GITHUB_ENV echo "commit_id=$COMMIT_ID" >> $GITHUB_ENV diff --git a/Tools/AP_Periph/AP_Periph.h b/Tools/AP_Periph/AP_Periph.h index c885f26f8e..606a02412b 100644 --- a/Tools/AP_Periph/AP_Periph.h +++ b/Tools/AP_Periph/AP_Periph.h @@ -21,6 +21,7 @@ #include #include #include +#include #if HAL_GCS_ENABLED #include "GCS_MAVLink.h" diff --git a/libraries/AP_Common/AP_FWVersionDefine.h b/libraries/AP_Common/AP_FWVersionDefine.h index 049121b03b..fa8755753a 100644 --- a/libraries/AP_Common/AP_FWVersionDefine.h +++ b/libraries/AP_Common/AP_FWVersionDefine.h @@ -22,10 +22,7 @@ #include #include - -#ifdef CARBOPILOT -#define AP_CUSTOM_FIRMWARE_STRING "CxPilot-5.1.1" -#endif +#include /* allow vendors to set AP_CUSTOM_FIRMWARE_STRING in hwdef.dat diff --git a/libraries/AP_Common/CxVersion.h b/libraries/AP_Common/CxVersion.h new file mode 100644 index 0000000000..2c9c3c899c --- /dev/null +++ b/libraries/AP_Common/CxVersion.h @@ -0,0 +1,5 @@ +#ifdef CARBOPILOT +#ifndef AP_CUSTOM_FIRMWARE_STRING +#define AP_CUSTOM_FIRMWARE_STRING "CxPilot-5.1.1" +#endif +#endif