Skip to content

Commit f2238a4

Browse files
author
Patrick Bechon
committed
Fix mask handling for rotationMessage
1 parent 58b424b commit f2238a4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/PayloadStructs.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,17 @@ rotationMessage::rotationMessage(){
133133

134134
void rotationMessage::setPitch(int16_t pitch){
135135
this->pitch = pitch;
136-
mask += PITCH_ROT;
136+
mask |= PITCH_ROT;
137137
}
138138

139139
void rotationMessage::setRoll(int16_t roll){
140140
this->roll = roll;
141-
mask += ROLL_ROT;
141+
mask |= ROLL_ROT;
142142
}
143143

144144
void rotationMessage::setYaw(int16_t yaw){
145145
this->yaw = yaw;
146-
mask += YAW_ROT;
146+
mask |= YAW_ROT;
147147
}
148148

149149
void rotationMessage::setPitchRollYaw(int16_t pitch, int16_t roll, int16_t yaw){

0 commit comments

Comments
 (0)