-
Notifications
You must be signed in to change notification settings - Fork 6
docs: add slopped-up documentation #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f2a197d to
d3d663a
Compare
edumeneses
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. We need to check and fix minor things, but it is a great head start
| "port1": 8000, | ||
| "port2": 9000, | ||
| "local_port": 10000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hallucinated from older versions
| * `port1`: The primary port for your application. | ||
| * `port2`: The secondary port for your application. | ||
| * `local_port`: The local port for your application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have those in settings now...
|
|
||
| ```cpp | ||
| puara.mount(); | ||
| puara.unmount(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think aha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what the mount/unmount functions ?
it generally is called with a filesystem and not directly on puara
void PuaraFileSystem::mount()
{
if(!esp_spiffs_mounted(spiffs_config.partition_label))
{
LOG("spiffs: Initializing SPIFFS");
spiffs_config.base_path = this->spiffs_base_path.c_str();
spiffs_config.max_files = PuaraAPI::spiffs_max_files;
spiffs_config.partition_label = NULL;
spiffs_config.format_if_mount_failed = PuaraAPI::spiffs_format_if_mount_failed;
....
void PuaraFileSystem::unmount()
{
// All done, unmount partition and disable SPIFFS
if(esp_spiffs_mounted(spiffs_config.partition_label))
{
esp_vfs_spiffs_unregister(spiffs_config.partition_label);
LOG("spiffs: SPIFFS unmounted");
}
else
{
LOG("spiffs: SPIFFS not found");
}
}
std::string PuaraFileSystem::read_file(std::string_view path)
{
mount();
std::string full_path = spiffs_base_path;
full_path.append(path);
std::ifstream in(full_path);
if(!in)
| ## AP and STA modes | ||
|
|
||
| The `puara-module` can work in two modes: | ||
|
|
||
| * **Access Point (AP) mode**: The device creates its own WiFi network. This is useful for initial configuration. | ||
| * **Station (STA) mode**: The device connects to an existing WiFi network. | ||
|
|
||
| By default, the `puara-module` will start in AP mode if it cannot connect to a known WiFi network. You can force the device to always start in AP mode by setting the `persistent_AP` option to `true` in the `config.json` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work in theory, but we haven't been using STA mode, and we need to check the flag on the UI
| ```cpp | ||
| std::string ip1 = puara.IP1(); | ||
| std::string ip2 = puara.IP2(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we removed those
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was discussing this with Charles - shouldn't we keep them if these are "expected" default settings? or will every puara firmware have different settings ?
|
wops, forgot to push the book.yml :D |
No description provided.