Skip to content

Commit

Permalink
attestation: set screen blank when awaiting mandatory attestation data
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieDriver committed Sep 20, 2024
1 parent 270801a commit 37ba786
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
10 changes: 4 additions & 6 deletions main/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -2598,20 +2598,18 @@ gui_activity_t* gui_display_splash(void)
gui_activity_t* const act = gui_make_activity();
gui_view_node_t* splash_node = NULL;

if (awaiting_attestation_data()) {
gui_make_text(&splash_node, "Awaiting Attestation Data", TFT_WHITE);
} else {
// Blank screen while awaiting attestation data upload
if (!awaiting_attestation_data()) {
#if defined(CONFIG_BOARD_TYPE_JADE) || defined(CONFIG_BOARD_TYPE_JADE_V1_1) || defined(CONFIG_BOARD_TYPE_JADE_V2)
Picture* const pic = get_picture(splashstart, splashend);
gui_make_picture(&splash_node, pic);
#else
gui_make_text(&splash_node, "Jade DIY", TFT_WHITE);
#endif
gui_set_align(splash_node, GUI_ALIGN_CENTER, GUI_ALIGN_MIDDLE);
gui_set_parent(splash_node, act->root_node);
}

gui_set_align(splash_node, GUI_ALIGN_CENTER, GUI_ALIGN_MIDDLE);
gui_set_parent(splash_node, act->root_node);

// set the current activity and draw it on screen
gui_set_current_activity(act);
return act;
Expand Down
9 changes: 2 additions & 7 deletions main/process/dashboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -2717,13 +2717,8 @@ void dashboard_process(void* process_ptr)
const keychain_t* initial_keychain = keychain_get();

if (awaiting_attestation_data()) {
// Initial screen while awaiting attestation data upload
gui_activity_t* const act = gui_make_activity();
gui_view_node_t* node;
gui_make_text(&node, "Awaiting Attestation Data", TFT_WHITE);
gui_set_align(node, GUI_ALIGN_CENTER, GUI_ALIGN_MIDDLE);
gui_set_parent(node, act->root_node);
act_dashboard = act;
// Blank screen while awaiting attestation data upload
act_dashboard = gui_make_activity();
} else if (show_connect_screen) {
// Some sort of connection is in progress
if (initialisation_source == SOURCE_INTERNAL) {
Expand Down

0 comments on commit 37ba786

Please sign in to comment.