Skip to content

Conversation

@jcelerier
Copy link
Contributor

No description provided.

@jcelerier jcelerier changed the title docs: add slopped-up documentaation docs: add slopped-up documentation Jan 5, 2026
Copy link
Member

@edumeneses edumeneses left a 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

Comment on lines +13 to +15
"port1": 8000,
"port2": 9000,
"local_port": 10000,
Copy link
Member

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

Comment on lines +22 to +24
* `port1`: The primary port for your application.
* `port2`: The secondary port for your application.
* `local_port`: The local port for your application.
Copy link
Member

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();
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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)

Comment on lines +5 to +12
## 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.
Copy link
Member

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

Comment on lines +28 to +30
```cpp
std::string ip1 = puara.IP1();
std::string ip2 = puara.IP2();
Copy link
Member

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

Copy link
Contributor Author

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 ?

@jcelerier
Copy link
Contributor Author

wops, forgot to push the book.yml :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants