AP_Param: fix wrong printf format for printf

"%S" is used for wide string, but we are passing a char*. Use lowercase
in this case to remove warnings like this:

libraries/AP_InertialSensor/AP_InertialSensor.cpp: In member function
'bool AP_InertialSensor::calibrate_accel(AP_InertialSensor_UserInteract*, float&, float&)':
libraries/AP_InertialSensor/AP_InertialSensor.cpp:620:61: warning:
format '%S' expects argument of type 'wchar_t*', but argument 3 has type 'const char*' [-Wformat=]
                 "Place vehicle %S and press any key.\n", msg);
                                                             ^
This commit is contained in:
Lucas De Marchi 2015-10-29 14:07:08 -02:00 committed by Randy Mackay
parent c3fe71a0d5
commit 68bef1ec64
1 changed files with 5 additions and 5 deletions

View File

@ -134,7 +134,7 @@ bool AP_Param::check_group_info(const struct AP_Param::GroupInfo * group_info,
// a nested group
const struct GroupInfo *ginfo = (const struct GroupInfo *)PGM_POINTER(&group_info[i].group_info);
if (group_shift + _group_level_shift >= _group_bits) {
Debug("double group nesting in %S", group_info[i].name);
Debug("double group nesting in %s", group_info[i].name);
return false;
}
if (ginfo == NULL ||
@ -146,21 +146,21 @@ bool AP_Param::check_group_info(const struct AP_Param::GroupInfo * group_info,
#endif // AP_NESTED_GROUPS_ENABLED
uint8_t idx = PGM_UINT8(&group_info[i].idx);
if (idx >= (1<<_group_level_shift)) {
Debug("idx too large (%u) in %S", idx, group_info[i].name);
Debug("idx too large (%u) in %s", idx, group_info[i].name);
return false;
}
if ((int8_t)idx <= max_idx) {
Debug("indexes must be in increasing order in %S", group_info[i].name);
Debug("indexes must be in increasing order in %s", group_info[i].name);
return false;
}
max_idx = (int8_t)idx;
uint8_t size = type_size((enum ap_var_type)type);
if (size == 0) {
Debug("invalid type in %S", group_info[i].name);
Debug("invalid type in %s", group_info[i].name);
return false;
}
if (prefix_length + strlen(group_info[i].name) > 16) {
Debug("suffix is too long in %S", group_info[i].name);
Debug("suffix is too long in %s", group_info[i].name);
return false;
}
(*total_size) += size + sizeof(struct Param_header);