1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 15:25:36 +03:00

Formatting bitmask creation code for MSP status response.

This commit is contained in:
Dominic Clifton 2014-05-15 02:39:24 +01:00
parent ff05ce29a9
commit d97722be8e

View file

@ -425,20 +425,26 @@ static void evaluateCommand(void)
// the bits in order, instead of setting the enabled bits based on BOXINDEX. WHERE IS THE FUCKING LOGIC IN THIS, FUCKWADS. // the bits in order, instead of setting the enabled bits based on BOXINDEX. WHERE IS THE FUCKING LOGIC IN THIS, FUCKWADS.
// Serialize the boxes in the order we delivered them, until multiwii retards fix their shit // Serialize the boxes in the order we delivered them, until multiwii retards fix their shit
junk = 0; junk = 0;
tmp = f.ANGLE_MODE << BOXANGLE | f.HORIZON_MODE << BOXHORIZON | tmp = f.ANGLE_MODE << BOXANGLE |
f.BARO_MODE << BOXBARO | f.MAG_MODE << BOXMAG | f.HEADFREE_MODE << BOXHEADFREE | rcOptions[BOXHEADADJ] << BOXHEADADJ | f.HORIZON_MODE << BOXHORIZON |
rcOptions[BOXCAMSTAB] << BOXCAMSTAB | rcOptions[BOXCAMTRIG] << BOXCAMTRIG | f.BARO_MODE << BOXBARO |
f.GPS_HOME_MODE << BOXGPSHOME | f.GPS_HOLD_MODE << BOXGPSHOLD | f.MAG_MODE << BOXMAG |
f.PASSTHRU_MODE << BOXPASSTHRU | f.HEADFREE_MODE << BOXHEADFREE |
rcOptions[BOXBEEPERON] << BOXBEEPERON | rcOptions[BOXHEADADJ] << BOXHEADADJ |
rcOptions[BOXLEDMAX] << BOXLEDMAX | rcOptions[BOXCAMSTAB] << BOXCAMSTAB |
rcOptions[BOXLLIGHTS] << BOXLLIGHTS | rcOptions[BOXCAMTRIG] << BOXCAMTRIG |
rcOptions[BOXVARIO] << BOXVARIO | f.GPS_HOME_MODE << BOXGPSHOME |
rcOptions[BOXCALIB] << BOXCALIB | f.GPS_HOLD_MODE << BOXGPSHOLD |
rcOptions[BOXGOV] << BOXGOV | f.PASSTHRU_MODE << BOXPASSTHRU |
rcOptions[BOXOSD] << BOXOSD | rcOptions[BOXBEEPERON] << BOXBEEPERON |
rcOptions[BOXTELEMETRY] << BOXTELEMETRY | rcOptions[BOXLEDMAX] << BOXLEDMAX |
f.ARMED << BOXARM; rcOptions[BOXLLIGHTS] << BOXLLIGHTS |
rcOptions[BOXVARIO] << BOXVARIO |
rcOptions[BOXCALIB] << BOXCALIB |
rcOptions[BOXGOV] << BOXGOV |
rcOptions[BOXOSD] << BOXOSD |
rcOptions[BOXTELEMETRY] << BOXTELEMETRY |
f.ARMED << BOXARM;
for (i = 0; i < numberBoxItems; i++) { for (i = 0; i < numberBoxItems; i++) {
int flag = (tmp & (1 << availableBoxes[i])); int flag = (tmp & (1 << availableBoxes[i]));
if (flag) if (flag)