uorb: fix constness for _uorb_topics_list

_uorb_topics_list was marked as 'const char *' array, which means the data
of the array was not actually const and thus landed in the data section
(so in RAM instead of FLASH).
The size of the array is 436 bytes.
This commit is contained in:
Beat Küng
2018-03-29 10:06:21 -04:00
committed by Daniel Agar
parent 576f4e02da
commit 0038a5e755
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -56,7 +56,7 @@ msgs_count_all = len(msg_names_all)
@[end for]
const size_t _uorb_topics_count = @(msgs_count_all);
const struct orb_metadata* _uorb_topics_list[_uorb_topics_count] = {
const constexpr struct orb_metadata* const _uorb_topics_list[_uorb_topics_count] = {
@[for idx, msg_name in enumerate(msg_names_all, 1)]@
ORB_ID(@(msg_name))@[if idx != msgs_count_all],@[end if]
@[end for]
@@ -67,7 +67,7 @@ size_t orb_topics_count()
return _uorb_topics_count;
}
const struct orb_metadata **orb_get_topics()
const struct orb_metadata *const*orb_get_topics()
{
return _uorb_topics_list;
}