Finish documention until someone change something

This commit is contained in:
2022-02-15 20:12:50 +01:00
parent 3a2e51713b
commit c8e3344b27
50 changed files with 991 additions and 223 deletions
+16 -1
View File
@@ -1,2 +1,17 @@
// PS3 Controller
/**
* @file config.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Some defines to configere the project.
* @version 0.1
* @date 2022-02-15
*
* @copyright Copyright (c) 2022
*
*/
/**
* @brief The MAC-Address saved in PS3-Controller
*
* The PS3-Controller only connects to the address which is saved in it.
*/
#define CONTROLLER_MAC "24:62:AB:F2:4B:3A"
+6 -8
View File
@@ -1,7 +1,7 @@
/**
* @file moveControl.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contrains the MoveControl class
* @brief Contains the MoveControl class
* @version 0.1
* @date 2021-12-14
*
@@ -32,7 +32,7 @@ enum DrivingStatus {stop,
/**
* @brief This class manages the motors and the encoders
*
* The controler uses two PIDs to control the motors. The PIDs
* The class uses two PIDs to control the motors. The PIDs
* use the Speedometer class to get the current speed and the
* given target speed to calculate a new duty cycle for the motors.
*
@@ -42,7 +42,7 @@ class MoveControl {
/**
* @brief Construct a new Move Control object
*
* Initalize the motors, encoders and PIDs with given
* Initialize the motors, encoders and PIDs with given
* values in moveControlConfig.h
*/
MoveControl();
@@ -66,14 +66,14 @@ class MoveControl {
void loop();
/**
* @brief Noramly called repeatedly by loop() to calcluate new values.
* @brief Normally called repeatedly by loop() to calculate new values.
*/
void runMoveControl();
/**
* @brief Set the DrivingStatus
*
* @see DrDrivingStatus
* @see DrivingStatus
* @param status
*/
void setDrivingStatus(DrivingStatus status);
@@ -99,8 +99,6 @@ class MoveControl {
/**
* @brief Set the pid tunings
*
* TODO: check if the function is working or indicates seg fault
*
* @param side 0 -> left, 1 -> right
* @param p
* @param i
@@ -119,7 +117,7 @@ class MoveControl {
/**
* @brief Set the min delay between each loop
*
* @param delay time in Milliseconds
* @param delay_ time in Milliseconds
*/
void setDelay(uint8_t delay_) { delay = delay_; }
+2 -2
View File
@@ -1,7 +1,7 @@
/**
* @file moveControlConfig.h
* @author Alexander Klein (alex@kleiax.de)
* @brief This file inherits some configuartion for moveControl.h
* @brief This file inherits some configurations for moveControl.h
* @version 0.1
* @date 2021-12-14
*
@@ -41,4 +41,4 @@
// SPEEDOMETER
#define WHEEL_DIAMETER 0.1263
#define ENC_STEPS 1024
#define ENC_STEPS 1024
+40 -4
View File
@@ -1,7 +1,7 @@
/**
* @file network.h
* @author Alexander Klein (alex@kleiax.de)
* @brief TODO: write some stuff here too
* @brief Contains the Network class.
* @version 0.1
* @date 2021-12-14
*
@@ -18,17 +18,53 @@
#include "networkConfig.h"
#define MQTT_TIME_RECONNECT 2500
/**
* @brief This class handles all network stuff
*
* This class only inherits static functions and members and use
* only the configuration data is given by networkConfig.h
*
*/
class Network {
public:
/**
* @brief Set the all IPs needed by this class
*/
static void setIps();
/**
* @brief Establish a connection to the WiFi.
*/
static void connectWifi();
/**
* @brief Set all general settings to connect to a broker.
*/
static void setupMQTT();
/**
* @brief Checks if mqtt is still connected
*
* If mqtt is not connect, this function try a reconnect
* with the function connectMQTT. This function should be
* called every mainloop.
*/
static void checkMQTT();
static PubSubClient* getMqtttClient();
/**
* @brief Get the Mqtt Client object
*
* @return PubSubClient*
*/
static PubSubClient* getMqttClient();
private:
/**
* @brief Tries a connect to the broker
*
* @return true if the connect attemp was successful
* @return false if the connect attemp was unsuccessful
*/
static bool connectMQTT();
static IPAddress local_IP;
+17
View File
@@ -1,5 +1,22 @@
/**
* @file networkConfig.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains the settings for the Network class
*
* With different defines the location can be choosen.
*
* @version 0.1
* @date 2022-02-15
*
* @copyright Copyright (c) 2022
*
*/
// General config
#define MQTT_TIME_RECONNECT 2500
#define HW1
//Network config RHEDE
#ifdef RHEDE
#define WLAN_SSID "LebennigHuus"