mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
Rover: add rpm to WENC dataflash logging
This commit is contained in:
parent
015d71bacd
commit
865fb91676
@ -303,8 +303,10 @@ struct PACKED log_WheelEncoder {
|
||||
uint64_t time_us;
|
||||
float distance_0;
|
||||
uint8_t quality_0;
|
||||
float rpm_0;
|
||||
float distance_1;
|
||||
uint8_t quality_1;
|
||||
float rpm_1;
|
||||
};
|
||||
|
||||
// log wheel encoder information
|
||||
@ -319,8 +321,10 @@ void Rover::Log_Write_WheelEncoder()
|
||||
time_us : AP_HAL::micros64(),
|
||||
distance_0 : g2.wheel_encoder.get_distance(0),
|
||||
quality_0 : (uint8_t)constrain_float(g2.wheel_encoder.get_signal_quality(0), 0.0f, 100.0f),
|
||||
rpm_0 : wheel_encoder_rpm[0],
|
||||
distance_1 : g2.wheel_encoder.get_distance(1),
|
||||
quality_1 : (uint8_t)constrain_float(g2.wheel_encoder.get_signal_quality(1), 0.0f, 100.0f)
|
||||
quality_1 : (uint8_t)constrain_float(g2.wheel_encoder.get_signal_quality(1), 0.0f, 100.0f),
|
||||
rpm_1 : wheel_encoder_rpm[1]
|
||||
};
|
||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||
}
|
||||
@ -349,7 +353,7 @@ const LogStructure Rover::log_structure[] = {
|
||||
{ LOG_ERROR_MSG, sizeof(log_Error),
|
||||
"ERR", "QBB", "TimeUS,Subsys,ECode", "s--", "F--" },
|
||||
{ LOG_WHEELENCODER_MSG, sizeof(log_WheelEncoder),
|
||||
"WENC", "Qfbfb", "TimeUS,Dist0,Qual0,Dist1,Qual1", "sm-m-", "F0-0-" },
|
||||
"WENC", "Qfbffbf", "TimeUS,Dist0,Qual0,RPM0,Dist1,Qual1,RPM1", "sm-qm-q", "F0--0--" },
|
||||
};
|
||||
|
||||
void Rover::log_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user