Skip to content

Commit

Permalink
Handle CW0_DEG_FLIP
Browse files Browse the repository at this point in the history
(better newline handling in perl script)

BEGIN {undef $/;}

s/(^\#define\s+GYRO_([12])_ALIGN\s+CW(90|180|270)_DEG\n)
\#define\s+GYRO_\g2_ALIGN_YAW\s+\g3[0]\n
/$1/mxg;

s/(^\#define\s+GYRO_([12])_ALIGN\s+CW(90|180|270)_DEG_FLIP\n)
\#define\s+GYRO_\g2_ALIGN_PITCH\s+1800\n
\#define\s+GYRO_\g2_ALIGN_YAW\s+\g3[0]\n
/$1/mxg;

s/(^\#define\s+GYRO_([12])_ALIGN\s+CW0_DEG_FLIP\n)
\#define\s+GYRO_\g2_ALIGN_PITCH\s+1800\n
(?!\#define\s+GYRO_\g2_ALIGN_)
/$1/mxg;
  • Loading branch information
ledvinap committed Dec 19, 2024
1 parent 7fa73e1 commit cb0a651
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion configs/AG3XF4/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,3 @@
#define GYRO_1_ALIGN CW270_DEG_FLIP
#define GYRO_2_SPI_INSTANCE SPI1
#define GYRO_2_ALIGN CW0_DEG_FLIP
#define GYRO_2_ALIGN_PITCH 1800
1 change: 0 additions & 1 deletion configs/AG3XF7/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,3 @@
#define GYRO_1_ALIGN CW270_DEG_FLIP
#define GYRO_2_SPI_INSTANCE SPI1
#define GYRO_2_ALIGN CW0_DEG_FLIP
#define GYRO_2_ALIGN_PITCH 1800
1 change: 0 additions & 1 deletion configs/AOCODAF405/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@
#define FLASH_SPI_INSTANCE SPI3
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW0_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
2 changes: 0 additions & 2 deletions configs/CHONKERH735/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ Details: https://github.com/crteensy/yolo-chonker/tree/as-built-20230303

#define DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_1
#define GYRO_1_ALIGN CW0_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
#define GYRO_2_ALIGN CW0_DEG_FLIP
#define GYRO_2_ALIGN_PITCH 1800

#define ENSURE_MPU_DATA_READY_IS_LOW
1 change: 0 additions & 1 deletion configs/DRONIUSF7/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,5 @@
#define FLASH_SPI_INSTANCE SPI3
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW0_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
#define PINIO1_BOX 40
//TODO set box_user_1_name = VTX POWER
1 change: 0 additions & 1 deletion configs/FENIX_F405/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@
#define FLASH_SPI_INSTANCE SPI2
#define GYRO_1_SPI_INSTANCE SPI3
#define GYRO_1_ALIGN CW0_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
1 change: 0 additions & 1 deletion configs/GRAVITYF7/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,5 @@
#define FLASH_SPI_INSTANCE SPI3
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW0_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
#define PINIO1_CONFIG 129
#define PINIO1_BOX 40
2 changes: 0 additions & 2 deletions configs/MATEKH743/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@
#define PINIO2_BOX 41
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW0_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
#define GYRO_2_SPI_INSTANCE SPI4
#define GYRO_2_ALIGN CW0_DEG_FLIP
#define GYRO_2_ALIGN_PITCH 1800
#define DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_1

#define ENSURE_MPU_DATA_READY_IS_LOW
1 change: 0 additions & 1 deletion configs/MINI_H743_HD/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,3 @@
#define GYRO_1_ALIGN CW180_DEG
#define GYRO_2_SPI_INSTANCE SPI4
#define GYRO_2_ALIGN CW0_DEG_FLIP
#define GYRO_2_ALIGN_PITCH 1800
1 change: 0 additions & 1 deletion configs/SPEEDYBEEF7V3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,3 @@
#define GYRO_1_ALIGN CW270_DEG_FLIP
#define GYRO_2_SPI_INSTANCE SPI1
#define GYRO_2_ALIGN CW0_DEG_FLIP
#define GYRO_2_ALIGN_PITCH 1800
1 change: 0 additions & 1 deletion configs/ZEEZF7/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,4 @@
#define FLASH_SPI_INSTANCE SPI1
#define GYRO_1_SPI_INSTANCE SPI2
#define GYRO_1_ALIGN CW0_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
//TODO #define OSD_CORE_TEMP_ALARM 85

0 comments on commit cb0a651

Please sign in to comment.