From 3d43532075d01ec286da9b8a2765912de4190851 Mon Sep 17 00:00:00 2001 From: lcgamboa Date: Sun, 10 Sep 2023 13:10:58 -0300 Subject: [PATCH] chg: Change sdcard and VCD Play parts to use new temporary dir for examples !minor --- CHANGELOG_auto.md | 12 ++++++++++++ TODO.md | 14 +++++++------- VERSION | 2 +- src/parts/other_sdcard.cc | 10 +++++----- src/parts/virtual_VCD_Play.cc | 8 +++----- 5 files changed, 28 insertions(+), 18 deletions(-) diff --git a/CHANGELOG_auto.md b/CHANGELOG_auto.md index 5b7da9c0c..8029e2f3a 100644 --- a/CHANGELOG_auto.md +++ b/CHANGELOG_auto.md @@ -2,10 +2,22 @@ ### Changes +* Draw the spare part before clicking in the window when a new part is added. [lcgamboa] + * Scripts updated and max flash file size fixed for qemu. [lcgamboa] * Add support to change ambient temperature and LM35 voltage offset in TempSys spare part. [lcgamboa] +### Fix + +* Fix SDCard spare parts CIPO signal. [lcgamboa] + +* Fix invalid serial handle in Windows. [lcgamboa] + +* Fixes the issue of opening multiple workspaces in multiple instances simultaneously. [lcgamboa] + +* Fix Arduino Uno board missing spare parts when open workspace files. [lcgamboa] + ### Other * Version 0.9.0. [lcgamboa] diff --git a/TODO.md b/TODO.md index 56ada96f8..6ecbcc5e2 100644 --- a/TODO.md +++ b/TODO.md @@ -6,11 +6,11 @@ | [src/boards/board_Arduino_Nano.cc](src/boards/board_Arduino_Nano.cc#L69) | 69 | cboard_Arduino_Nano: add suport to analog inputs A6 and A7 | | [src/boards/board_McLab2.cc](src/boards/board_McLab2.cc#L98) | 98 | jumper support | | [src/boards/board_PICGenios.cc](src/boards/board_PICGenios.cc#L193) | 193 | TEMP cooler must don't work with AQUE=0 | -| [src/boards/board_RemoteTCP.cc](src/boards/board_RemoteTCP.cc#L177) | 177 | define pins | +| [src/boards/board_RemoteTCP.cc](src/boards/board_RemoteTCP.cc#L176) | 176 | define pins | | [src/boards/bsim_gpsim.cc](src/boards/bsim_gpsim.cc#L153) | 153 | add VCC and GND pins | -| [src/boards/bsim_simavr.cc](src/boards/bsim_simavr.cc#L1209) | 1209 | default output value is not used yet (DOV) | -| [src/boards/bsim_simavr.cc](src/boards/bsim_simavr.cc#L1577) | 1577 | avr ID pointer | -| [src/boards/bsim_simavr.cc](src/boards/bsim_simavr.cc#L1599) | 1599 | avr ID size | +| [src/boards/bsim_simavr.cc](src/boards/bsim_simavr.cc#L1210) | 1210 | default output value is not used yet (DOV) | +| [src/boards/bsim_simavr.cc](src/boards/bsim_simavr.cc#L1578) | 1578 | avr ID pointer | +| [src/boards/bsim_simavr.cc](src/boards/bsim_simavr.cc#L1600) | 1600 | avr ID size | | [src/devices/eth_w5500.cc](src/devices/eth_w5500.cc#L471) | 471 | add support to buffer size different of 2k | | [src/devices/lcd_ssd1306.cc](src/devices/lcd_ssd1306.cc#L123) | 123 | ssd1306 Scrolling Command Table | | [src/devices/lcd_ssd1306.cc](src/devices/lcd_ssd1306.cc#L134) | 134 | ssd1306 Continuous Vertical and Horizontal Scroll Setup | @@ -31,9 +31,9 @@ ### FIXMEs | Filename | line # | FIXME | |:------|:------:|:------| -| [src/boards/board_uCboard.cc](src/boards/board_uCboard.cc#L302) | 302 | NSTEP must be multiplied for 4 | -| [src/boards/bsim_simavr.cc](src/boards/bsim_simavr.cc#L1594) | 1594 | avr CONFIG size | +| [src/boards/board_uCboard.cc](src/boards/board_uCboard.cc#L298) | 298 | NSTEP must be multiplied for 4 | +| [src/boards/bsim_simavr.cc](src/boards/bsim_simavr.cc#L1595) | 1595 | avr CONFIG size | | [src/devices/io_MCP23X17.cc](src/devices/io_MCP23X17.cc#L134) | 134 | only for BANK=0; | -| [src/lib/picsimlab.cc](src/lib/picsimlab.cc#L1151) | 1151 | remote control disabled | +| [src/lib/picsimlab.cc](src/lib/picsimlab.cc#L1171) | 1171 | remote control disabled | | [src/parts/input_encoder.cc](src/parts/input_encoder.cc#L163) | 163 | on slow speed output is not 90 degrees | | [src/parts/output_dcmotor.cc](src/parts/output_dcmotor.cc#L213) | 213 | on slow speed output is not 90 degrees | diff --git a/VERSION b/VERSION index f7ff84419..3927117a4 100644 --- a/VERSION +++ b/VERSION @@ -2,5 +2,5 @@ PACKAGE=picsimlab MAINVER=0 MINORVER=9 VERSION=0.9.0 -DATE=230907 +DATE=230910 VERSION_STABLE=0.9.0 diff --git a/src/parts/other_sdcard.cc b/src/parts/other_sdcard.cc index 5b17dd151..a030dd27d 100644 --- a/src/parts/other_sdcard.cc +++ b/src/parts/other_sdcard.cc @@ -173,15 +173,15 @@ void cpart_SDCard::ReadPreferences(lxString value) { sscanf(value.c_str(), "%hhu,%hhu,%hhu,%hhu,%s", &pins[0], &pins[1], &pins[2], &pins[3], sdcard_fname); Reset(); + if (sdcard_fname[0] != '*') { -#ifdef _WIN_ - if (!strncmp(sdcard_fname, "/tmp/", 5)) { - char buff[200]; - strcpy(buff, (const char*)lxGetTempDir("PICSimLab").c_str()); + if (!strncmp(sdcard_fname, "/tmp/picsimlab_workspace/", 25)) { + char buff[256]; + strcpy(buff, PICSimLab.GetPzwTmpdir()); strcat(buff, sdcard_fname + 4); strcpy(sdcard_fname, buff); } -#endif + sdcard_set_filename(&sd, sdcard_fname); sdcard_set_card_present(&sd, 1); } else { diff --git a/src/parts/virtual_VCD_Play.cc b/src/parts/virtual_VCD_Play.cc index 7b6c36860..31f52651f 100644 --- a/src/parts/virtual_VCD_Play.cc +++ b/src/parts/virtual_VCD_Play.cc @@ -250,14 +250,12 @@ void cpart_VCD_Play::ReadPreferences(lxString value) { f_vcd_name); if (f_vcd_name[0] != '*') { -#ifdef _WIN_ - if (!strncmp(f_vcd_name, "/tmp/", 5)) { - char buff[200]; - strcpy(buff, (const char*)lxGetTempDir("PICSimLab").c_str()); + if (!strncmp(f_vcd_name, "/tmp/picsimlab_workspace/", 25)) { + char buff[256]; + strcpy(buff, PICSimLab.GetPzwTmpdir()); strcat(buff, f_vcd_name + 4); strcpy(f_vcd_name, buff); } -#endif if (lxFileExists(f_vcd_name)) { LoadVCD(f_vcd_name); } else {