Copter: removed logging of MAVLink parameter changes
not much point to this
This commit is contained in:
parent
36ea705956
commit
3ffeff04a7
@ -1818,31 +1818,16 @@ mission_failed:
|
||||
if (var_type == AP_PARAM_FLOAT) {
|
||||
((AP_Float *)vp)->set_and_save(packet.param_value);
|
||||
} else if (var_type == AP_PARAM_INT32) {
|
||||
#if LOGGING_ENABLED == ENABLED
|
||||
if (g.log_bitmask != 0) {
|
||||
Log_Write_Data(DATA_MAVLINK_FLOAT, ((AP_Int32 *)vp)->get());
|
||||
}
|
||||
#endif
|
||||
if (packet.param_value < 0) rounding_addition = -rounding_addition;
|
||||
float v = packet.param_value+rounding_addition;
|
||||
v = constrain_float(v, -2147483648.0, 2147483647.0);
|
||||
((AP_Int32 *)vp)->set_and_save(v);
|
||||
} else if (var_type == AP_PARAM_INT16) {
|
||||
#if LOGGING_ENABLED == ENABLED
|
||||
if (g.log_bitmask != 0) {
|
||||
Log_Write_Data(DATA_MAVLINK_INT16, (int16_t)((AP_Int16 *)vp)->get());
|
||||
}
|
||||
#endif
|
||||
if (packet.param_value < 0) rounding_addition = -rounding_addition;
|
||||
float v = packet.param_value+rounding_addition;
|
||||
v = constrain_float(v, -32768, 32767);
|
||||
((AP_Int16 *)vp)->set_and_save(v);
|
||||
} else if (var_type == AP_PARAM_INT8) {
|
||||
#if LOGGING_ENABLED == ENABLED
|
||||
if (g.log_bitmask != 0) {
|
||||
Log_Write_Data(DATA_MAVLINK_INT8, (int8_t)((AP_Int8 *)vp)->get());
|
||||
}
|
||||
#endif
|
||||
if (packet.param_value < 0) rounding_addition = -rounding_addition;
|
||||
float v = packet.param_value+rounding_addition;
|
||||
v = constrain_float(v, -128, 127);
|
||||
|
Loading…
Reference in New Issue
Block a user