Rev 857 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 857 | Rev 887 | ||
---|---|---|---|
Line 129... | Line 129... | ||
129 | 129 | ||
130 | while (measurement) |
130 | while (measurement) |
131 | { |
131 | { |
132 | uint8_t tmp_sreg = SREG; |
132 | uint8_t tmp_sreg = SREG; |
133 | cli(); |
133 | cli(); |
134 | x_axis = MM3.x_axis; |
134 | x_axis = MM3.x_axis; |
135 | y_axis = MM3.y_axis; |
135 | y_axis = MM3.y_axis; |
136 | z_axis = MM3.z_axis; |
136 | z_axis = MM3.z_axis; |
Line 137... | Line 137... | ||
137 | SREG = tmp_sreg; |
137 | SREG = tmp_sreg; |
138 | 138 | ||
Line 188... | Line 188... | ||
188 | int8_t tilt; |
188 | int8_t tilt; |
Line 189... | Line 189... | ||
189 | 189 | ||
190 | // 16bit-Werte lesen |
190 | // 16bit-Werte lesen |
191 | uint8_t tmp_sreg = SREG; |
191 | uint8_t tmp_sreg = SREG; |
192 | cli(); |
192 | cli(); |
193 | mm3_x_axis = MM3.x_axis; |
193 | mm3_x_axis = MM3.x_axis; |
194 | mm3_y_axis = MM3.y_axis; |
194 | mm3_y_axis = MM3.y_axis; |
195 | mm3_z_axis = MM3.z_axis; |
195 | mm3_z_axis = MM3.z_axis; |
Line 196... | Line 196... | ||
196 | SREG = tmp_sreg; |
196 | SREG = tmp_sreg; |
197 | 197 | ||
198 | int temp = Aktuell_az-550; |
198 | int temp = Aktuell_az - acc_neutral.compass; |
199 | // Lage-Berechnung mittels Acc-Messwerte |
199 | // Lage-Berechnung mittels Acc-Messwerte |
200 | tilt = atan2_i(temp,AdWertAccNick*64); |
200 | tilt = atan2_i(temp,AdWertAccNick*64); |