- This BASH script is a Work-In-Progress. It downloads and processes target definitions from Betaflight/config and Betaflight/unified-targets in attempt to convert to EmuFlight targets. Although functional, it does not account for every combination and still requires human modification to resultant files.
sudo apt install grep gawk sed coreutils findutils wget git
git clone https://github.com/nerdCopter/target-convert.git
cd target-convertchmod +x ./convert.sh
- This BASH script expect two parameters:
- [unified-target-name] in the format
VEND-TARGETNAME. (Note the hyphen! Underscore will not work.) - [destination-folder] in POSIX path format.
- [unified-target-name] in the format
./convert.sh DIAT-MAMBAF405_2022B ././convert.sh TURC-TUNERCF405 ./temp./convert.sh SPBE-SPEEDYBEE_F745_AIO ../EmuFlight/src/main/target/
- Creates a target-folder in the format
TARGETNAMEcontainingtarget.mk,target.c,target.h. - This folder also contains a sub-folder named
resourceswhich containing downloads and other output.
- Copy or move the new target folder to your EmuFlight's
./src/main/target/folder. - Review and modify the
target.*files as needed in a text-editor. - Compile and test the new target:
make TARGETNAME, where TARGETNAME is the new target name (folder name) that was created.- examples:
make TUNERCF405,make SPEEDYBEE_F745_AIO.
- examples:
- When making Pull-Requests to EmuFlight, do not include the
resourcessub-folder folder nor its contents. PR's should only includeTARGETNAME/target.*. - Remove all unnecessary comments from the target files.
- Be sure to keep your clone updated:
git checkout master ; git pull