mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 15:40:34 +08:00
major simulator rework:
- wait for first message from jMAVSim before sending data - publish raw rc data coming from PIXHAWK (temporary) - send some interesting messages to jMAVSim - prepare sensor data for sim drivers to read
This commit is contained in:
@@ -71,11 +71,32 @@ bool Simulator::getRawAccelReport(uint8_t *buf, int len)
|
||||
return _accel.copyData(buf, len);
|
||||
}
|
||||
|
||||
bool Simulator::getMagReport(uint8_t *buf, int len)
|
||||
{
|
||||
return _mag.copyData(buf, len);
|
||||
}
|
||||
|
||||
bool Simulator::getBaroSample(uint8_t *buf, int len)
|
||||
{
|
||||
return _baro.copyData(buf, len);
|
||||
}
|
||||
|
||||
void Simulator::write_MPU_data(void *buf) {
|
||||
_mpu.writeData(buf);
|
||||
}
|
||||
|
||||
void Simulator::write_accel_data(void *buf) {
|
||||
_accel.writeData(buf);
|
||||
}
|
||||
|
||||
void Simulator::write_mag_data(void *buf) {
|
||||
_mag.writeData(buf);
|
||||
}
|
||||
|
||||
void Simulator::write_baro_data(void *buf) {
|
||||
_baro.writeData(buf);
|
||||
}
|
||||
|
||||
int Simulator::start(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
Reference in New Issue
Block a user