Fix M17 callsign setting

Fix M17 callsign disappearing in M17 settings.

The generic callsign (currently not used) was being shown instead of M17 callsign.
This commit is contained in:
Niccolò Izzo 2021-07-27 08:39:21 +02:00 committed by Silvano Seva
parent dc28f90a1d
commit f43f54117c
3 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ typedef struct
int8_t utc_timezone; int8_t utc_timezone;
bool gps_enabled; bool gps_enabled;
bool gps_set_time; bool gps_set_time;
char callsign[10]; // Plaintext callsign, used for M17 char callsign[10]; // Plaintext callsign, for future use
} }
__attribute__((packed)) settings_t; __attribute__((packed)) settings_t;

View File

@ -1321,7 +1321,7 @@ void ui_updateFSM(event_t event, bool *sync_rtx)
{ {
_ui_textInputConfirm(ui_state.new_callsign); _ui_textInputConfirm(ui_state.new_callsign);
// Save selected callsign and disable input mode // Save selected callsign and disable input mode
strcpy(state.settings.callsign, ui_state.new_callsign); strcpy(state.m17_data.callsign, ui_state.new_callsign);
ui_state.edit_mode = false; ui_state.edit_mode = false;
} }
else if(msg.keys & KEY_ESC) else if(msg.keys & KEY_ESC)

View File

@ -539,7 +539,7 @@ void _ui_drawSettingsM17(ui_state_t* ui_state)
// Print M17 current callsign // Print M17 current callsign
gfx_printLine(1, 1, layout.top_h, SCREEN_HEIGHT - layout.bottom_h, gfx_printLine(1, 1, layout.top_h, SCREEN_HEIGHT - layout.bottom_h,
layout.horizontal_pad, layout.input_font, layout.horizontal_pad, layout.input_font,
TEXT_ALIGN_CENTER, color_white, last_state.settings.callsign); TEXT_ALIGN_CENTER, color_white, last_state.m17_data.callsign);
} }
} }