Search found 49 matches

by prem111
Thu May 28, 2020 2:55 pm
Forum: General Discussion and Questions
Topic: Config file, read or write - safety.
Replies: 0
Views: 693

Config file, read or write - safety.

What is the safest option for reading and writing the configuration file? I am afraid that when saving, for example, if there was no power, the file might not be saved completely ...

The next thing is the format ... Maybe json?
by prem111
Wed May 27, 2020 6:31 am
Forum: Programs, Libraries and Tools
Topic: SD Card, can't write from another module or async tasks.
Replies: 3
Views: 520

Re: SD Card, can't write from another module or async tasks.

Yes, I do it exactly, it works when I start from one class, but when I do mount in main.py, while open and write in async def doesn't work anymore.
by prem111
Tue May 26, 2020 9:37 pm
Forum: Programs, Libraries and Tools
Topic: SD Card, can't write from another module or async tasks.
Replies: 3
Views: 520

SD Card, can't write from another module or async tasks.

Why when I mount the SD in start boot.py or main.py I can't write to a file from another module or from task async? Do I have to grant any permissions?

main.py

Code: Select all

import os
import machine
os.mount(machine.SDCard(slot=3,width=4), "/sd")
by prem111
Tue May 26, 2020 2:41 pm
Forum: General Discussion and Questions
Topic: Double precision and CPU slowdown.
Replies: 10
Views: 593

Re: Double precision and CPU slowdown.

Ok, I went back to the topic of replacing FLOAT_IMPL_DOUBLE

I compiled together with idf4 - and amazingly everything works very quickly.

I just have a question for you, what are the disadvantages of this solution?
by prem111
Tue May 26, 2020 7:39 am
Forum: General Discussion and Questions
Topic: Double precision and CPU slowdown.
Replies: 10
Views: 593

Re: Double precision and CPU slowdown.

I need to read the current point where auto-rc is located. Next, I want to calculate the distance between the car and the previously set waypoint.
by prem111
Mon May 25, 2020 7:45 pm
Forum: General Discussion and Questions
Topic: Double precision and CPU slowdown.
Replies: 10
Views: 593

Re: Double precision and CPU slowdown.

Ok, but will it allow me to do calculations later like in my functions which I gave above?
by prem111
Mon May 25, 2020 12:57 pm
Forum: General Discussion and Questions
Topic: Double precision and CPU slowdown.
Replies: 10
Views: 593

Re: Double precision and CPU slowdown.

pythoncoder wrote:
Mon May 25, 2020 6:20 am
I don't know your application. Is worldwide coverage needed? If not, you could express lat and long relative to a local datum for calculations, converting to absolute values only for final display.
Can I have an example please? because I don't quite understand. Thanks.
by prem111
Mon May 25, 2020 6:44 am
Forum: General Discussion and Questions
Topic: Double precision and CPU slowdown.
Replies: 10
Views: 593

Re: Double precision and CPU slowdown.

Thanks for reply. I am using this module, it needs to get more precision than just 5 decimal digits in dd - decimal degress formatt. https://github.com/inmcm/micropyGPS/blob/master/micropyGPS.py The problem is that after receiving the result I have to calculate it further, e.g. the distance to anoth...
by prem111
Sun May 24, 2020 9:12 pm
Forum: General Discussion and Questions
Topic: Double precision and CPU slowdown.
Replies: 10
Views: 593

Double precision and CPU slowdown.

I needed to get the accuracy to 6 decimal numbers, I replaced: #define MICROPY_FLOAT_IMPL on (MICROPY_FLOAT_IMPL_DOUBLE) and compiled micropython for port esp32. Everything works. >>> 1/3 0.333333333333333 The problem is the load on the processor, the modules load much slower. Is there another way? ...