Skip to content

Commit aa299f7

Browse files
committed
format
1 parent 9eb9d6b commit aa299f7

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ int32_t ghost_esp_app(void* p) {
189189
if(state->gps_menu)
190190
view_dispatcher_add_view(state->view_dispatcher, 3, submenu_get_view(state->gps_menu));
191191
if(state->aerial_menu)
192-
view_dispatcher_add_view(state->view_dispatcher, 15, submenu_get_view(state->aerial_menu));
192+
view_dispatcher_add_view(
193+
state->view_dispatcher, 15, submenu_get_view(state->aerial_menu));
193194
if(state->settings_menu)
194195
view_dispatcher_add_view(
195196
state->view_dispatcher, 4, variable_item_list_get_view(state->settings_menu));

src/menu.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,8 +1605,8 @@ static bool ir_index_buttons_from_file(AppState* state) {
16051605
size_t pos = 0;
16061606
while(pos < read && state->ir_signal_count < COUNT_OF(state->ir_signals)) {
16071607
// Consume whitespace
1608-
while(pos < read &&
1609-
(buf[pos] == '\r' || buf[pos] == '\n' || buf[pos] == ' ' || buf[pos] == '\t')) {
1608+
while(pos < read && (buf[pos] == '\r' || buf[pos] == '\n' || buf[pos] == ' ' ||
1609+
buf[pos] == '\t')) {
16101610
if(buf[pos] == '\n' || buf[pos] == '\r') {
16111611
if(in_block) {
16121612
// Potential end of block handled when we see next header
@@ -1633,18 +1633,21 @@ static bool ir_index_buttons_from_file(AppState* state) {
16331633
// If we were already in a block, close it at current global_offset
16341634
if(in_block && state->ir_signal_count > 0) {
16351635
state->ir_signal_block_lengths[state->ir_signal_count - 1] =
1636-
(global_offset) - state->ir_signal_block_offsets[state->ir_signal_count - 1];
1636+
(global_offset)-state
1637+
->ir_signal_block_offsets[state->ir_signal_count - 1];
16371638
}
16381639

16391640
in_block = true;
16401641
block_start = global_offset;
16411642

16421643
// Parse name on this line to populate label
16431644
size_t line_end = pos;
1644-
while(line_end < read && buf[line_end] != '\n' && buf[line_end] != '\r') line_end++;
1645+
while(line_end < read && buf[line_end] != '\n' && buf[line_end] != '\r')
1646+
line_end++;
16451647

16461648
size_t val_start = pos + (sizeof(name_hdr) - 1);
1647-
while(val_start < line_end && (buf[val_start] == ' ' || buf[val_start] == '\t')) {
1649+
while(val_start < line_end &&
1650+
(buf[val_start] == ' ' || buf[val_start] == '\t')) {
16481651
val_start++;
16491652
}
16501653
size_t val_end = line_end;
@@ -2988,7 +2991,13 @@ void show_wifi_menu(AppState* state) {
29882991
}
29892992

29902993
void show_aerial_menu(AppState* state) {
2991-
show_menu(state, aerial_commands, COUNT_OF(aerial_commands), "Aerial Detector:", state->aerial_menu, 15);
2994+
show_menu(
2995+
state,
2996+
aerial_commands,
2997+
COUNT_OF(aerial_commands),
2998+
"Aerial Detector:",
2999+
state->aerial_menu,
3000+
15);
29923001
}
29933002

29943003
void show_ble_menu(AppState* state) {
@@ -3005,7 +3014,6 @@ void show_ble_menu(AppState* state) {
30053014
state->current_view = 2;
30063015
}
30073016

3008-
30093017
void show_gps_menu(AppState* state) {
30103018
state->came_from_settings = false;
30113019
show_menu(state, gps_commands, COUNT_OF(gps_commands), "GPS Commands:", state->gps_menu, 3);

0 commit comments

Comments
 (0)