Skip to content

Commit aecbe20

Browse files
committed
pbio/platform/ev3: Enable 5x5 grid UI.
This enables the SPIKE Prime UI on EV3 by mimicking a 5x5 grid display. This unblocks the path to implementing USB download and run on EV3 without having to decide or spend time on the UI yet. For now, attempting to run slot 0 will always start the UART REPL so that other developments can still be worked on in the mean time.
1 parent 694f593 commit aecbe20

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

lib/pbio/drv/display/display_ev3.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,12 +492,17 @@ static pbio_error_t pbdrv_display_ev3_process_thread(pbio_os_state_t *state, voi
492492
// Staying in data mode from here.
493493
pbdrv_gpio_out_high(&pin_lcd_a0);
494494

495-
// Initial splash screen.
495+
// Briefly show initial splash screen. REVISIT: Move boot animation to sys/hmi.
496496
pbdrv_display_load_indexed_bitmap(pbdrv_display_pybricks_logo);
497497
pbdrv_display_st7586s_encode_user_frame();
498498
pbdrv_display_st7586s_write_data_begin(st7586s_send_buf, sizeof(st7586s_send_buf));
499499
PBIO_OS_AWAIT_UNTIL(state, spi_status == SPI_STATUS_COMPLETE);
500500
pbdrv_gpio_out_high(&pin_lcd_cs);
501+
PBIO_OS_AWAIT_MS(state, &timer, 500);
502+
503+
// Clear display to start with.
504+
memset(&pbdrv_display_user_frame, 0, sizeof(pbdrv_display_user_frame));
505+
pbdrv_display_user_frame_update_requested = true;
501506

502507
// Done initializing.
503508
pbio_busy_count_down();

lib/pbio/platform/ev3/pbioconfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define PBIO_CONFIG_IMAGE (1)
99
#define PBIO_CONFIG_IMU (0)
1010
#define PBIO_CONFIG_LIGHT (1)
11+
#define PBIO_CONFIG_LIGHT_MATRIX (1)
1112
#define PBIO_CONFIG_LOGGER (1)
1213
#define PBIO_CONFIG_MOTOR_PROCESS (1)
1314
#define PBIO_CONFIG_PORT (1)

lib/pbio/platform/ev3/pbsysconfig.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@
66
#define PBSYS_CONFIG_FEATURE_BUILTIN_USER_PROGRAM_IMU_CALIBRATION (0)
77
#define PBSYS_CONFIG_FEATURE_PROGRAM_FORMAT_MULTI_MPY_V6 (1)
88
#define PBSYS_CONFIG_FEATURE_PROGRAM_FORMAT_MULTI_MPY_V6_3_NATIVE (0)
9+
#define PBSYS_CONFIG_HMI_NUM_SLOTS (5)
10+
#define PBSYS_CONFIG_HMI_SLOT_0_STARTS_REPL (1)
911
#define PBSYS_CONFIG_HOST (1)
1012
#define PBSYS_CONFIG_HOST_STDIN_BUF_SIZE (21)
13+
#define PBSYS_CONFIG_HUB_LIGHT_MATRIX (1)
14+
#define PBSYS_CONFIG_HUB_LIGHT_MATRIX_DISPLAY (1)
1115
#define PBSYS_CONFIG_MAIN (1)
1216
#define PBSYS_CONFIG_STORAGE (1)
13-
#define PBSYS_CONFIG_STORAGE_NUM_SLOTS (1)
17+
#define PBSYS_CONFIG_STORAGE_NUM_SLOTS (5)
1418
#define PBSYS_CONFIG_STORAGE_USER_DATA_SIZE (512)
1519
#define PBSYS_CONFIG_STATUS_LIGHT (1)
1620
#define PBSYS_CONFIG_STATUS_LIGHT_BATTERY (0)
1721
#define PBSYS_CONFIG_STATUS_LIGHT_BLUETOOTH (0)
1822
#define PBSYS_CONFIG_STATUS_LIGHT_STATE_ANIMATIONS (0)
1923
#define PBSYS_CONFIG_USER_PROGRAM (1)
20-
#define PBSYS_CONFIG_USER_PROGRAM_AUTO_START (1)
24+
#define PBSYS_CONFIG_USER_PROGRAM_AUTO_START (0)
2125
#define PBSYS_CONFIG_PROGRAM_STOP (1)

0 commit comments

Comments
 (0)