Write to start of sd card file
-
- Matrix Staff
- Posts: 1760
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 447 times
- Been thanked: 607 times
Re: Write to start of sd card file
Please can you post your latest version of the project and I'll investigate for you.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Write to start of sd card file
Ben I've just PM'd you the full file with most of it toggled off. Hopefully you can figure this out
I should add the file needs created first. The default few bytes at the start of the file are 100601111
I should add the file needs created first. The default few bytes at the start of the file are 100601111
Re: Write to start of sd card file
Just noticed that the message i last posted hasnt appeared. Ben I pm'd my flowcode file.
The file already exists and has data, but as stated above it won't simulate above 5hz
The file already exists and has data, but as stated above it won't simulate above 5hz
-
- Matrix Staff
- Posts: 1760
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 447 times
- Been thanked: 607 times
Re: Write to start of sd card file
Hello,
As a quick test I wrote this and it seems to be working fine at full sim speed.
I wonder if the problem your seeing is that you are opening and closing the file several times during the program.
I've just made a change to the FAT component to try and push any pending changes when closing the file, the sim relies on Windows to do file read/writes in the background and so when closing and reopening at fast speed there could have been a problem. Hopefully this will make a difference.
As a quick test I wrote this and it seems to be working fine at full sim speed.
I wonder if the problem your seeing is that you are opening and closing the file several times during the program.
I've just made a change to the FAT component to try and push any pending changes when closing the file, the sim relies on Windows to do file read/writes in the background and so when closing and reopening at fast speed there could have been a problem. Hopefully this will make a difference.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Write to start of sd card file
Thanks Ben. I gave it a try after updating the component. If anything its worse as I can get it to save to file at 5hz any more
Im using windows 11 if that makes any difference. The open and closing of the file only occurs if the rest of the program is toggled on
Im using windows 11 if that makes any difference. The open and closing of the file only occurs if the rest of the program is toggled on
-
- Matrix Staff
- Posts: 1760
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 447 times
- Been thanked: 607 times
Re: Write to start of sd card file
Hello,
Are you using a local drive? I've got the file and Flowcode project on a SSD so I'll try on a HDD too and check that is ok.
I don't currently have Windows 11 available to test but I wouldn't have thought that would cause issues.
Are you using a local drive? I've got the file and Flowcode project on a SSD so I'll try on a HDD too and check that is ok.
I don't currently have Windows 11 available to test but I wouldn't have thought that would cause issues.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Matrix Staff
- Posts: 1760
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 447 times
- Been thanked: 607 times
Re: Write to start of sd card file
This is interesting.
https://www.theregister.com/2021/12/08/ ... slow_nvme/
Do you have another local drive you could try?
https://www.theregister.com/2021/12/08/ ... slow_nvme/
Do you have another local drive you could try?
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Write to start of sd card file
Not on that machine Ben. After some mucking around i think I've found another related issue. Martin fisher uploaded a file to test which finishes up in the download folder. When double clicking to open the file it seems to have changed the root directory to the download directory. The program therefore couldn't find the txt file to write to. Moving the test.txt file into the download folder and filetest now works yet the root directory : $(srcdir) says the same so somehow some environment variable has changed inadvertently