Skip to content

Commit

Permalink
chg: Change sdcard and VCD Play parts to use new temporary dir for ex…
Browse files Browse the repository at this point in the history
…amples !minor
  • Loading branch information
lcgamboa committed Sep 10, 2023
1 parent c3bf56d commit 3d43532
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 18 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG_auto.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
14 changes: 7 additions & 7 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ PACKAGE=picsimlab
MAINVER=0
MINORVER=9
VERSION=0.9.0
DATE=230907
DATE=230910
VERSION_STABLE=0.9.0
10 changes: 5 additions & 5 deletions src/parts/other_sdcard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 3 additions & 5 deletions src/parts/virtual_VCD_Play.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3d43532

Please sign in to comment.