Plane: fixed bit combination

bitwise, not arithmetic
This commit is contained in:
Andrew Tridgell 2013-02-05 10:33:10 +11:00
parent c5f19f5df8
commit 3913c42183

View File

@ -107,7 +107,7 @@ static void set_cmd_with_index(struct Location temp, int16_t i)
temp.options &= ~(MASK_OPTIONS_RELATIVE_ALT);
}
// zero unused bits
temp.options &= (MASK_OPTIONS_RELATIVE_ALT + MASK_OPTIONS_LOITER_DIRECTION);
temp.options &= (MASK_OPTIONS_RELATIVE_ALT | MASK_OPTIONS_LOITER_DIRECTION);
hal.storage->write_byte(mem, temp.id);