mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Scripting: keep enum definitions in flash
Saves ~100B of statically allocated RAM.
This commit is contained in:
parent
fc8147ead0
commit
50eac0ef31
@ -2381,7 +2381,7 @@ void emit_methods(struct userdata *node) {
|
||||
}
|
||||
|
||||
void emit_enum(struct userdata * data) {
|
||||
fprintf(source, "struct userdata_enum %s_enums[] = {\n", data->sanatized_name);
|
||||
fprintf(source, "const struct userdata_enum %s_enums[] = {\n", data->sanatized_name);
|
||||
struct userdata_enum *ud_enum = data->enums;
|
||||
while (ud_enum != NULL) {
|
||||
fprintf(source, " {\"%s\", %s::%s},\n", ud_enum->name, data->name, ud_enum->name);
|
||||
|
Loading…
Reference in New Issue
Block a user