Skip to content

Commit

Permalink
compile fix
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Jun 25, 2024
1 parent 32f93b4 commit d7bd8d1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ESP32/console_esp32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void console_esp32::panel_update_thread()
if (panel_mode == PM_BITS) {
memory_addresses_t rc = b->getMMU()->calculate_physical_address(run_mode, current_PC);

uint16_t current_instr = b->peek_word(run_mode, current_PC);
auto current_instr = b->peek_word(run_mode, current_PC);

int pixel_offset = 0;

Expand All @@ -140,8 +140,14 @@ void console_esp32::panel_update_thread()
for(uint8_t b=0; b<16; b++)
pixels.setPixelColor(pixel_offset++, current_PSW & (1l << b) ? magenta : 0);

for(uint8_t b=0; b<16; b++)
pixels.setPixelColor(pixel_offset++, current_instr & (1l << b) ? red : 0);
if (current_instr.has_value()) {
for(uint8_t b=0; b<16; b++)
pixels.setPixelColor(pixel_offset++, current_instr.value() & (1l << b) ? red : 0);
}
else {
for(uint8_t b=0; b<16; b++)
pixels.setPixelColor(pixel_offset++, 0);
}

pixels.setPixelColor(pixel_offset++, running_flag ? white : 0);

Expand Down

0 comments on commit d7bd8d1

Please sign in to comment.