I have an Eachine Blade 185 and after upgrading to Cleanflight 2.2.0 and having to upgrade to NAZE 2.3.2 I found out that magnetometer and GPS support were gone. Understandable as the Blade does not have a lot of memory and since Cleanflight and NAZE have been adding lots of features, something has to go.
I spend some time trying to play with the settings. Unfortunately there is a lot of bad info on many websites including YouTube and there are not settings that will fix this. You have to rebuild Cleanflight with the correct flags. However, is not that straightforward. The tutorial from Cleanflight here is not accurate. The GPS will not come back to life with these settings.
If you are still reading and wonder how to get this going, here are the steps:
- Build Cleanflight according to the instructions here
- I built on Mac OS so I followed the instructions here
- Navigate to your Cleanflight installation /cleanflight/src/main/target/NAZE
- Edit target.h
- Add the following lines:
#define MAG_HMC5883_ALIGN CW180_DEG
- You will need to use the NMEA protocol for these settings. If you want to use UBLOX then change:
- Now, because this issue is related to the amount of memory available, to do this you need to disable some functionality or the build will fail. Comment out the following lines and change as need:
/* only 2 uarts available on the NAZE, add ifdef here if present on other boards */
#define SERIAL_PORT_COUNT 2
//#define SOFTSERIAL1_RX_PIN PA6 // PWM 5
//#define SOFTSERIAL1_TX_PIN PA7 // PWM 6
//#define SOFTSERIAL2_RX_PIN PB0 // PWM 7
//#define SOFTSERIAL2_TX_PIN PB1 /
- You might need to comment out all these if they are enabled:
//#define RANGEFINDER_HCSR04_TRIGGER_PIN PB0
//#define RANGEFINDER_HCSR04_ECHO_PIN PB1
//#define RANGEFINDER_HCSR04_TRIGGER_PIN_PWM PB8
//#define RANGEFINDER_HCSR04_ECHO_PIN_PWM PB9
- Rebuild, run Cleanflight and flash the new firmware which is the hex file located in in the obj directory.
- Connect Cleanflight normally and go to Ports and activate GPS on UART2
- Go to Configuration and enable magnetometer and GPS, making sure that you select NMEA or UBLOX according to which flag you turned on on the build.
- You should be up and running with mag and GPS.