Commit d106025e authored by lcgamboa's avatar lcgamboa

fix: Fix spare parts window position on start.

parent 6c1b4ecf
......@@ -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));
......
......@@ -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] = ',';
......
......@@ -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
......
......@@ -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) {
......
......@@ -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());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment