You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
567 B
19 lines
567 B
#include "MsgHandler_MAG_Base.h" |
|
|
|
void MsgHandler_MAG_Base::update_from_msg_compass(uint8_t compass_offset, uint8_t *msg) |
|
{ |
|
wait_timestamp_from_msg(msg); |
|
|
|
Vector3f mag; |
|
require_field(msg, "Mag", mag); |
|
Vector3f mag_offset; |
|
require_field(msg, "Ofs", mag_offset); |
|
|
|
compass.setHIL(compass_offset, mag - mag_offset); |
|
// compass_offset is which compass we are setting info for; |
|
// mag_offset is a vector indicating the compass' calibration... |
|
compass.set_offsets(compass_offset, mag_offset); |
|
|
|
dataflash.WriteBlock(msg, f.length); |
|
} |
|
|
|
|