diff --git a/src/boards/board_Blue_Pill.cc b/src/boards/board_Blue_Pill.cc index 2f388916..97b7352e 100644 --- a/src/boards/board_Blue_Pill.cc +++ b/src/boards/board_Blue_Pill.cc @@ -260,6 +260,7 @@ cboard_Blue_Pill::cboard_Blue_Pill(void) { master_uart[2].rx_pin = 0; bitbang_pwm_init(&pwm_out, this, 20); + bitbang_out_init(&rmt_out, this, 0); PICSimLab.UpdateGUI(MIPS, GT_COMBO, GA_ADD, (void*)"Qemu CPU MIPS"); buffer[0] = ','; @@ -278,6 +279,10 @@ cboard_Blue_Pill::~cboard_Blue_Pill(void) { // Reset board status void cboard_Blue_Pill::Reset(void) { + if (qemu_started != 1) { + return; + } + MReset(1); PICSimLab.UpdateStatus(PS_SERIAL, "Serial: " + std::string(SERIALDEVICE)); diff --git a/src/boards/board_STM32_H103.cc b/src/boards/board_STM32_H103.cc index 262c835c..f3a958d2 100644 --- a/src/boards/board_STM32_H103.cc +++ b/src/boards/board_STM32_H103.cc @@ -283,6 +283,7 @@ cboard_STM32_H103::cboard_STM32_H103(void) { master_uart[2].rx_pin = 0; bitbang_pwm_init(&pwm_out, this, 20); + bitbang_out_init(&rmt_out, this, 0); PICSimLab.UpdateGUI(MIPS, GT_COMBO, GA_ADD, (void*)"Qemu CPU MIPS"); buffer[0] = ','; diff --git a/src/picsimlab1.cc b/src/picsimlab1.cc index 2af44e01..fc599ca9 100644 --- a/src/picsimlab1.cc +++ b/src/picsimlab1.cc @@ -694,6 +694,11 @@ void CPWindow1::_EvOnCreate(CControl* control) { PICSimLab.OnWindowCmd = &CPWindow1::OnWindowCmd; PICSimLab.OnSystemCmd = &CPWindow1::OnSystemCmd; + SpareParts.OnCanvasCmd = &CPWindow5::OnCanvasCmd; + SpareParts.OnWindowCmd = &CPWindow5::OnWindowCmd; + + Oscilloscope.OnWindowCmd = &CPWindow4::OnWindowCmd; + PICSimLab.Init(); // board menu diff --git a/src/picsimlab4.cc b/src/picsimlab4.cc index 7adfdf89..21b721eb 100644 --- a/src/picsimlab4.cc +++ b/src/picsimlab4.cc @@ -360,7 +360,6 @@ void CPWindow4::_EvOnCreate(CControl* control) { ? ("PICSimLab[" + std::to_string(PICSimLab.GetInstanceNumber()) + "] - ") : ("PICSimLab - ")) + "Oscilloscope"); - Oscilloscope.OnWindowCmd = &CPWindow4::OnWindowCmd; } void CPWindow4::_EvOnShow(CControl* control) { diff --git a/src/picsimlab5.cc b/src/picsimlab5.cc index cf27edd8..90eabbf5 100644 --- a/src/picsimlab5.cc +++ b/src/picsimlab5.cc @@ -73,9 +73,6 @@ void CPWindow5::menu1_EvMenuActive(CControl* control) { } void CPWindow5::_EvOnCreate(CControl* control) { - SpareParts.OnCanvasCmd = &CPWindow5::OnCanvasCmd; - SpareParts.OnWindowCmd = &CPWindow5::OnWindowCmd; - if (SpareParts.GetLoadConfigFile().length() > 0) SpareParts.LoadConfig(SpareParts.GetLoadConfigFile());