|
|
|
@ -156,12 +156,12 @@ void OpticalFlow::update_state(const OpticalFlow_state &state)
@@ -156,12 +156,12 @@ void OpticalFlow::update_state(const OpticalFlow_state &state)
|
|
|
|
|
|
|
|
|
|
void OpticalFlow::Log_Write_Optflow() |
|
|
|
|
{ |
|
|
|
|
AP_Logger *instance = AP_Logger::get_singleton(); |
|
|
|
|
if (instance == nullptr) { |
|
|
|
|
AP_Logger *logger = AP_Logger::get_singleton(); |
|
|
|
|
if (logger == nullptr) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (_log_bit != (uint32_t)-1 && |
|
|
|
|
!instance->should_log(_log_bit)) { |
|
|
|
|
!logger->should_log(_log_bit)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -174,7 +174,7 @@ void OpticalFlow::Log_Write_Optflow()
@@ -174,7 +174,7 @@ void OpticalFlow::Log_Write_Optflow()
|
|
|
|
|
body_x : _state.bodyRate.x, |
|
|
|
|
body_y : _state.bodyRate.y |
|
|
|
|
}; |
|
|
|
|
instance->WriteBlock(&pkt, sizeof(pkt)); |
|
|
|
|
logger->WriteBlock(&pkt, sizeof(pkt)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|