Hi droners. I've been playing with the latest 2.40 firmware on my older APM1 board. I was disappointed to see logging and CLI are not available for the 1280 hardware with 2.40. On my test flights, I noticed some strange flight behaviour: RTL was not always coming home, among other things. I've got a video record of the flight but without a flight log, have no idea what was going on within the firmware. I'm not using a ground station or OSD at the moment. I'll add the MinimOSD when I'm happy with the stability of the firmware.
Digging into the code, I made a few new preprocessor definitions in APM_Config.h to turn off a few features I'm not using, and was able to get the firmware compiled and loaded, with CLI and logging enabled. Here's what I had to change:
#define CLI_ENABLED ENABLED - note that the disabling of this has to be disabled in config.h
#define LOGGING_ENABLED ENABLED - note that the disabling of this has to be disabled in config.h
# define GEOFENCE_ENABLED DISABLED - not using this feature at the moment
# define MOUNT DISABLED - a stabilized camera mount would be neat...
#define EXTRATESTS_ENABLED DISABLED - disables the majority of the test menu in the CLI. Essentials kept.
#define RELAY_ENABLED DISABLED - not using this so I disabled it. Didn't save much room...
#define COMPASS_ENABLED DISABLED - Not using the compass in this drone. Disabling this took some doing and saved lots of room (about 18k!). I hope there are no bugs introduced as a result.
The last one (COMPASS_ENABLED) is the big ticket item and the one that has the potential to cause the most side-effects. I can post my code changes, but first, can anyone think of any obvious errors disabling the compass would do? Note that in most of the code, the compass logic is wrapped anyhow:
I merely wrapped that like this:
#if COMPASS_ENABLED == ENABLED
if (g.compass_enabled && compass.read())
#endif //COMPASS_ENABLED == ENABLED