@@ -40,6 +40,9 @@ static bool _forced_dirty = false;
40
40
static bool _suspended = false;
41
41
42
42
static void title_bar_background (void * data ) {
43
+ #if !CIRCUITPY_STATUS_BAR
44
+ return ;
45
+ #endif
43
46
if (_suspended ) {
44
47
return ;
45
48
}
@@ -53,7 +56,6 @@ static void title_bar_background(void *data) {
53
56
return ;
54
57
}
55
58
_forced_dirty = false;
56
- #if CIRCUITPY_STATUS_BAR
57
59
// Neighboring "" "" are concatenated by the compiler. Without this separation, the hex code
58
60
// doesn't get terminated after two following characters and the value is invalid.
59
61
// This is the OSC command to set the title and the icon text. It can be up to 255 characters
@@ -67,27 +69,38 @@ static void title_bar_background(void *data) {
67
69
serial_write (MICROPY_GIT_TAG );
68
70
// Send string terminator
69
71
serial_write ("\x1b" "\\" );
70
- #endif
71
72
}
72
73
73
74
void supervisor_title_bar_start (void ) {
75
+ #if !CIRCUITPY_STATUS_BAR
76
+ return ;
77
+ #endif
74
78
title_bar_background_cb .fun = title_bar_background ;
75
79
title_bar_background_cb .data = NULL ;
76
80
supervisor_title_bar_request_update (true);
77
81
}
78
82
79
83
void supervisor_title_bar_request_update (bool force_dirty ) {
84
+ #if !CIRCUITPY_STATUS_BAR
85
+ return ;
86
+ #endif
80
87
if (force_dirty ) {
81
88
_forced_dirty = true;
82
89
}
83
90
background_callback_add_core (& title_bar_background_cb );
84
91
}
85
92
86
93
void supervisor_title_bar_suspend (void ) {
94
+ #if !CIRCUITPY_STATUS_BAR
95
+ return ;
96
+ #endif
87
97
_suspended = true;
88
98
}
89
99
90
100
void supervisor_title_bar_resume (void ) {
101
+ #if !CIRCUITPY_STATUS_BAR
102
+ return ;
103
+ #endif
91
104
_suspended = false;
92
105
supervisor_title_bar_request_update (false);
93
106
}
0 commit comments