more fixes for trunk

This commit is contained in:
Jm Casler 2023-07-26 17:08:04 -07:00 committed by Thomas Göttgens
parent 794948d7e4
commit 26264fd908
5 changed files with 43 additions and 39 deletions

View File

@ -1,10 +1,12 @@
/** /**
* @file FSCommon.cpp * @file FSCommon.cpp
* @brief This file contains functions for common filesystem operations such as copying, renaming, listing and deleting files and directories. * @brief This file contains functions for common filesystem operations such as copying, renaming, listing and deleting files and
* * directories.
* The functions in this file are used to perform common filesystem operations such as copying, renaming, listing and deleting files and directories. *
* These functions are used in the Meshtastic-device project to manage files and directories on the device's filesystem. * The functions in this file are used to perform common filesystem operations such as copying, renaming, listing and deleting
* * files and directories. These functions are used in the Meshtastic-device project to manage files and directories on the
* device's filesystem.
*
*/ */
#include "FSCommon.h" #include "FSCommon.h"
#include "configuration.h" #include "configuration.h"
@ -24,7 +26,7 @@ SPIClass SPI1(HSPI);
/** /**
* @brief Copies a file from one location to another. * @brief Copies a file from one location to another.
* *
* @param from The path of the source file. * @param from The path of the source file.
* @param to The path of the destination file. * @param to The path of the destination file.
* @return true if the file was successfully copied, false otherwise. * @return true if the file was successfully copied, false otherwise.
@ -60,10 +62,10 @@ bool copyFile(const char *from, const char *to)
/** /**
* Renames a file from pathFrom to pathTo. * Renames a file from pathFrom to pathTo.
* *
* @param pathFrom The original path of the file. * @param pathFrom The original path of the file.
* @param pathTo The new path of the file. * @param pathTo The new path of the file.
* *
* @return True if the file was successfully renamed, false otherwise. * @return True if the file was successfully renamed, false otherwise.
*/ */
bool renameFile(const char *pathFrom, const char *pathTo) bool renameFile(const char *pathFrom, const char *pathTo)
@ -186,9 +188,9 @@ void listDir(const char *dirname, uint8_t levels, bool del = false)
/** /**
* @brief Removes a directory and all its contents. * @brief Removes a directory and all its contents.
* *
* This function recursively removes a directory and all its contents, including subdirectories and files. * This function recursively removes a directory and all its contents, including subdirectories and files.
* *
* @param dirname The name of the directory to remove. * @param dirname The name of the directory to remove.
*/ */
void rmDir(const char *dirname) void rmDir(const char *dirname)
@ -252,4 +254,4 @@ void setupSDCard()
LOG_DEBUG("Total space: %llu MB\n", SD.totalBytes() / (1024 * 1024)); LOG_DEBUG("Total space: %llu MB\n", SD.totalBytes() / (1024 * 1024));
LOG_DEBUG("Used space: %llu MB\n", SD.usedBytes() / (1024 * 1024)); LOG_DEBUG("Used space: %llu MB\n", SD.usedBytes() / (1024 * 1024));
#endif #endif
} }

View File

@ -1,14 +1,15 @@
/** /**
* @file ExternalNotificationModule.cpp * @file ExternalNotificationModule.cpp
* @brief Implementation of the ExternalNotificationModule class. * @brief Implementation of the ExternalNotificationModule class.
* *
* This file contains the implementation of the ExternalNotificationModule class, which is responsible for handling external notifications such as vibration, buzzer, and LED lights. * This file contains the implementation of the ExternalNotificationModule class, which is responsible for handling external
* The class provides methods to turn on and off the external notification outputs and to play ringtones using PWM buzzer. * notifications such as vibration, buzzer, and LED lights. The class provides methods to turn on and off the external
* It also includes default configurations and a runOnce() method to handle the module's behavior. * notification outputs and to play ringtones using PWM buzzer. It also includes default configurations and a runOnce() method to
* * handle the module's behavior.
*
* Documentation: * Documentation:
* https://meshtastic.org/docs/settings/moduleconfig/external-notification * https://meshtastic.org/docs/settings/moduleconfig/external-notification
* *
* @author Jm Casler & Meshtastic Team * @author Jm Casler & Meshtastic Team
* @date [Insert Date] * @date [Insert Date]
*/ */

View File

@ -1,10 +1,10 @@
/** /**
* @file RangeTestModule.cpp * @file RangeTestModule.cpp
* @brief Implementation of the RangeTestModule class and RangeTestModuleRadio class. * @brief Implementation of the RangeTestModule class and RangeTestModuleRadio class.
* *
* As a sender, this module sends packets every n seconds with an incremented PacketID. * As a sender, this module sends packets every n seconds with an incremented PacketID.
* As a receiver, this module receives packets from multiple senders and saves them to the Filesystem. * As a receiver, this module receives packets from multiple senders and saves them to the Filesystem.
* *
* The RangeTestModule class is an OSThread that runs the module. * The RangeTestModule class is an OSThread that runs the module.
* The RangeTestModuleRadio class handles sending and receiving packets. * The RangeTestModuleRadio class handles sending and receiving packets.
*/ */
@ -104,7 +104,7 @@ int32_t RangeTestModule::runOnce()
/** /**
* Sends a payload to a specified destination node. * Sends a payload to a specified destination node.
* *
* @param dest The destination node number. * @param dest The destination node number.
* @param wantReplies Whether or not to request replies from the destination node. * @param wantReplies Whether or not to request replies from the destination node.
*/ */

View File

@ -88,9 +88,9 @@ SerialModuleRadio::SerialModuleRadio() : MeshModule("SerialModuleRadio")
/** /**
* @brief Checks if the serial connection is established. * @brief Checks if the serial connection is established.
* *
* @return true if the serial connection is established, false otherwise. * @return true if the serial connection is established, false otherwise.
* *
* For the serial2 port we can't really detect if any client is on the other side, so instead just look for recent messages * For the serial2 port we can't really detect if any client is on the other side, so instead just look for recent messages
*/ */
bool SerialModule::checkIsConnected() bool SerialModule::checkIsConnected()
@ -199,7 +199,7 @@ int32_t SerialModule::runOnce()
/** /**
* Allocates a new mesh packet for use as a reply to a received packet. * Allocates a new mesh packet for use as a reply to a received packet.
* *
* @return A pointer to the newly allocated mesh packet. * @return A pointer to the newly allocated mesh packet.
*/ */
meshtastic_MeshPacket *SerialModuleRadio::allocReply() meshtastic_MeshPacket *SerialModuleRadio::allocReply()
@ -211,7 +211,7 @@ meshtastic_MeshPacket *SerialModuleRadio::allocReply()
/** /**
* Sends a payload to a specified destination node. * Sends a payload to a specified destination node.
* *
* @param dest The destination node number. * @param dest The destination node number.
* @param wantReplies Whether or not to request replies from the destination node. * @param wantReplies Whether or not to request replies from the destination node.
*/ */
@ -302,7 +302,7 @@ ProcessMessage SerialModuleRadio::handleReceived(const meshtastic_MeshPacket &mp
/** /**
* @brief Returns the baud rate of the serial module from the module configuration. * @brief Returns the baud rate of the serial module from the module configuration.
* *
* @return uint32_t The baud rate of the serial module. * @return uint32_t The baud rate of the serial module.
*/ */
uint32_t SerialModule::getBaudRate() uint32_t SerialModule::getBaudRate()

View File

@ -1,13 +1,14 @@
/** /**
* @file StoreForwardModule.cpp * @file StoreForwardModule.cpp
* @brief Implementation of the StoreForwardModule class. * @brief Implementation of the StoreForwardModule class.
* *
* This file contains the implementation of the StoreForwardModule class, which is responsible for managing the store and forward functionality of the Meshtastic device. * This file contains the implementation of the StoreForwardModule class, which is responsible for managing the store and forward
* The class provides methods for sending and receiving messages, as well as managing the message history queue. * functionality of the Meshtastic device. The class provides methods for sending and receiving messages, as well as managing the
* It also initializes and manages the data structures used for storing the message history. * message history queue. It also initializes and manages the data structures used for storing the message history.
* *
* The StoreForwardModule class is used by the MeshService class to provide store and forward functionality to the Meshtastic device. * The StoreForwardModule class is used by the MeshService class to provide store and forward functionality to the Meshtastic
* * device.
*
* @author Jm Casler * @author Jm Casler
* @date [Insert Date] * @date [Insert Date]
*/ */
@ -97,7 +98,7 @@ void StoreForwardModule::populatePSRAM()
/** /**
* Sends messages from the message history to the specified recipient. * Sends messages from the message history to the specified recipient.
* *
* @param msAgo The number of milliseconds ago from which to start sending messages. * @param msAgo The number of milliseconds ago from which to start sending messages.
* @param to The recipient ID to send the messages to. * @param to The recipient ID to send the messages to.
*/ */
@ -122,7 +123,7 @@ void StoreForwardModule::historySend(uint32_t msAgo, uint32_t to)
/** /**
* Creates a new history queue with messages that were received within the specified time frame. * Creates a new history queue with messages that were received within the specified time frame.
* *
* @param msAgo The number of milliseconds ago to start the history queue. * @param msAgo The number of milliseconds ago to start the history queue.
* @param to The maximum number of messages to include in the history queue. * @param to The maximum number of messages to include in the history queue.
* @return The ID of the newly created history queue. * @return The ID of the newly created history queue.
@ -195,7 +196,7 @@ meshtastic_MeshPacket *StoreForwardModule::allocReply()
/** /**
* Sends a payload to a specified destination node using the store and forward mechanism. * Sends a payload to a specified destination node using the store and forward mechanism.
* *
* @param dest The destination node number. * @param dest The destination node number.
* @param packetHistory_index The index of the packet in the packet history buffer. * @param packetHistory_index The index of the packet in the packet history buffer.
*/ */
@ -222,7 +223,7 @@ void StoreForwardModule::sendPayload(NodeNum dest, uint32_t packetHistory_index)
/** /**
* Sends a message to a specified destination node using the store and forward protocol. * Sends a message to a specified destination node using the store and forward protocol.
* *
* @param dest The destination node number. * @param dest The destination node number.
* @param payload The message payload to be sent. * @param payload The message payload to be sent.
*/ */
@ -248,7 +249,7 @@ void StoreForwardModule::sendMessage(NodeNum dest, meshtastic_StoreAndForward &p
/** /**
* Sends a store-and-forward message to the specified destination node. * Sends a store-and-forward message to the specified destination node.
* *
* @param dest The destination node number. * @param dest The destination node number.
* @param rr The store-and-forward request/response message to send. * @param rr The store-and-forward request/response message to send.
*/ */
@ -349,7 +350,7 @@ ProcessMessage StoreForwardModule::handleReceived(const meshtastic_MeshPacket &m
/** /**
* Handles a received protobuf message for the Store and Forward module. * Handles a received protobuf message for the Store and Forward module.
* *
* @param mp The received MeshPacket to handle. * @param mp The received MeshPacket to handle.
* @param p A pointer to the StoreAndForward object. * @param p A pointer to the StoreAndForward object.
* @return True if the message was successfully handled, false otherwise. * @return True if the message was successfully handled, false otherwise.
@ -555,4 +556,4 @@ StoreForwardModule::StoreForwardModule()
disable(); disable();
} }
#endif #endif
} }