|
|
|
@ -313,10 +313,8 @@ struct PACKED log_WheelEncoder {
@@ -313,10 +313,8 @@ 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
|
|
|
|
@ -331,10 +329,8 @@ void Rover::Log_Write_WheelEncoder()
@@ -331,10 +329,8 @@ 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), |
|
|
|
|
rpm_1 : wheel_encoder_rpm[1] |
|
|
|
|
quality_1 : (uint8_t)constrain_float(g2.wheel_encoder.get_signal_quality(1), 0.0f, 100.0f) |
|
|
|
|
}; |
|
|
|
|
logger.WriteBlock(&pkt, sizeof(pkt)); |
|
|
|
|
} |
|
|
|
@ -370,7 +366,7 @@ const LogStructure Rover::log_structure[] = {
@@ -370,7 +366,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", "Qfbffbf", "TimeUS,Dist0,Qual0,RPM0,Dist1,Qual1,RPM1", "sm-qm-q", "F0--0--" }, |
|
|
|
|
"WENC", "Qfbfb", "TimeUS,Dist0,Qual0,Dist1,Qual1", "sm-m-", "F0-0-" }, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
void Rover::log_init(void) |
|
|
|
|