From 26264fd9085f75219d899c5779c2a3ddcf95e6b3 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Wed, 26 Jul 2023 17:08:04 -0700 Subject: [PATCH] more fixes for trunk --- src/FSCommon.cpp | 24 ++++++++++-------- src/modules/ExternalNotificationModule.cpp | 13 +++++----- src/modules/RangeTestModule.cpp | 6 ++--- src/modules/SerialModule.cpp | 10 ++++---- src/modules/esp32/StoreForwardModule.cpp | 29 +++++++++++----------- 5 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/FSCommon.cpp b/src/FSCommon.cpp index 9b59bdadf..e7760c575 100644 --- a/src/FSCommon.cpp +++ b/src/FSCommon.cpp @@ -1,10 +1,12 @@ /** * @file FSCommon.cpp - * @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. - * + * @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. + * */ #include "FSCommon.h" #include "configuration.h" @@ -24,7 +26,7 @@ SPIClass SPI1(HSPI); /** * @brief Copies a file from one location to another. - * + * * @param from The path of the source file. * @param to The path of the destination file. * @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. - * + * * @param pathFrom The original path of the file. * @param pathTo The new path of the file. - * + * * @return True if the file was successfully renamed, false otherwise. */ 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. - * + * * This function recursively removes a directory and all its contents, including subdirectories and files. - * + * * @param dirname The name of the directory to remove. */ void rmDir(const char *dirname) @@ -252,4 +254,4 @@ void setupSDCard() LOG_DEBUG("Total space: %llu MB\n", SD.totalBytes() / (1024 * 1024)); LOG_DEBUG("Used space: %llu MB\n", SD.usedBytes() / (1024 * 1024)); #endif -} +} \ No newline at end of file diff --git a/src/modules/ExternalNotificationModule.cpp b/src/modules/ExternalNotificationModule.cpp index a939ee3f1..cbcf4e452 100644 --- a/src/modules/ExternalNotificationModule.cpp +++ b/src/modules/ExternalNotificationModule.cpp @@ -1,14 +1,15 @@ /** * @file ExternalNotificationModule.cpp * @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. - * The class provides methods to turn on and off the external notification outputs and to play ringtones using PWM buzzer. - * It also includes default configurations and a runOnce() method to handle the module's behavior. - * + * + * This file contains the implementation of the ExternalNotificationModule class, which is responsible for handling external + * notifications such as vibration, buzzer, and LED lights. The class provides methods to turn on and off the external + * 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: * https://meshtastic.org/docs/settings/moduleconfig/external-notification - * + * * @author Jm Casler & Meshtastic Team * @date [Insert Date] */ diff --git a/src/modules/RangeTestModule.cpp b/src/modules/RangeTestModule.cpp index 705c72c68..ecf4b70c7 100644 --- a/src/modules/RangeTestModule.cpp +++ b/src/modules/RangeTestModule.cpp @@ -1,10 +1,10 @@ /** * @file RangeTestModule.cpp * @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 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 RangeTestModuleRadio class handles sending and receiving packets. */ @@ -104,7 +104,7 @@ int32_t RangeTestModule::runOnce() /** * Sends a payload to a specified destination node. - * + * * @param dest The destination node number. * @param wantReplies Whether or not to request replies from the destination node. */ diff --git a/src/modules/SerialModule.cpp b/src/modules/SerialModule.cpp index 47ca1eef6..4482aae90 100644 --- a/src/modules/SerialModule.cpp +++ b/src/modules/SerialModule.cpp @@ -88,9 +88,9 @@ SerialModuleRadio::SerialModuleRadio() : MeshModule("SerialModuleRadio") /** * @brief Checks if the serial connection is established. - * + * * @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 */ 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. - * + * * @return A pointer to the newly allocated mesh packet. */ meshtastic_MeshPacket *SerialModuleRadio::allocReply() @@ -211,7 +211,7 @@ meshtastic_MeshPacket *SerialModuleRadio::allocReply() /** * Sends a payload to a specified destination node. - * + * * @param dest The destination node number. * @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. - * + * * @return uint32_t The baud rate of the serial module. */ uint32_t SerialModule::getBaudRate() diff --git a/src/modules/esp32/StoreForwardModule.cpp b/src/modules/esp32/StoreForwardModule.cpp index bce228224..de4d4da3b 100644 --- a/src/modules/esp32/StoreForwardModule.cpp +++ b/src/modules/esp32/StoreForwardModule.cpp @@ -1,13 +1,14 @@ /** * @file StoreForwardModule.cpp * @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. - * The class provides methods for sending and receiving messages, as well as managing the 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. - * + * + * This file contains the implementation of the StoreForwardModule class, which is responsible for managing the store and forward + * functionality of the Meshtastic device. The class provides methods for sending and receiving messages, as well as managing the + * 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. + * * @author Jm Casler * @date [Insert Date] */ @@ -97,7 +98,7 @@ void StoreForwardModule::populatePSRAM() /** * Sends messages from the message history to the specified recipient. - * + * * @param msAgo The number of milliseconds ago from which to start sending messages. * @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. - * + * * @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. * @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. - * + * * @param dest The destination node number. * @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. - * + * * @param dest The destination node number. * @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. - * + * * @param dest The destination node number. * @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. - * + * * @param mp The received MeshPacket to handle. * @param p A pointer to the StoreAndForward object. * @return True if the message was successfully handled, false otherwise. @@ -555,4 +556,4 @@ StoreForwardModule::StoreForwardModule() disable(); } #endif -} +} \ No newline at end of file