File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,18 @@ void Mixer::init_mixing()
247247 RF_.comm_manager_ .log (CommLinkInterface::LogSeverity::LOG_INFO,
248248 " Inverting selected mixing matrix..." );
249249 primary_mixer_ = invert_mixer (array_of_mixers_[mixer_choice]);
250+
251+ // If using a canned mixer but the USE_MOTOR_PARAM is set to 1 (true), raise a warning.
252+ // Motor parameters (thus motor speed/voltage calculations) should not be used with the canned
253+ // mixers, since the output will be vanishingly small. Check online documentation for more
254+ // information.
255+ if (!(RF_.params_ .get_param_int (PARAM_USE_MOTOR_PARAMETERS) == 0 )) {
256+ RF_.comm_manager_ .log (CommLinkInterface::LogSeverity::LOG_WARNING,
257+ (" USE_MOTOR_PARAM=1, but PRIMARY_MIXER=" + std::to_string (static_cast <unsigned int >(mixer_choice)) + " , which" ).c_str ());
258+ RF_.comm_manager_ .log (CommLinkInterface::LogSeverity::LOG_WARNING,
259+ " may cause issues (check docs). Is this correct?" );
260+ }
261+
250262 } else {
251263 // Don't invert the fixedwing mixers
252264 primary_mixer_ = *array_of_mixers_[mixer_choice];
You can’t perform that action at this time.
0 commit comments