updated some comments after migrating stuff from other Project

This commit is contained in:
Marcel Peterkau 2024-05-30 23:48:26 +02:00
parent cf76ea7cc7
commit 5ee0a23a6d
9 changed files with 17 additions and 80 deletions

View File

@ -1,9 +1,9 @@
/**
* @file debugger.h
*
* @brief Header file for debugging functions and status in the ChainLube application.
* @brief Header file for debugging functions and status in the DE-Timer application.
*
* This file declares functions and status definitions for debugging purposes in the ChainLube project.
* This file declares functions and status definitions for debugging purposes in the DE-Timer project.
* It includes functions to print system information, WiFi information, format EEPROM data,
* handle debug messages, and manage the status of different debug ports.
*

View File

@ -1,10 +1,10 @@
/**
* @file dtc.h
*
* @brief Header file for handling Diagnostic Trouble Codes (DTC) in the ChainLube application.
* @brief Header file for handling Diagnostic Trouble Codes (DTC) in the DE-Timer application.
*
* This file provides definitions and functions for handling Diagnostic Trouble Codes (DTC)
* in the ChainLube project. It includes structures for DTC entries, severity levels,
* in the DE-Timer project. It includes structures for DTC entries, severity levels,
* and functions for DTC maintenance and processing. DTCs are used to track system errors and issues.
*
* @author Marcel Peterkau

View File

@ -1,9 +1,9 @@
/**
* @file dtc_defs.h
*
* @brief Header file for Diagnostic Trouble Code (DTC) definitions in the ChainLube application.
* @brief Header file for Diagnostic Trouble Code (DTC) definitions in the DE-Timer application.
*
* This file contains definitions for Diagnostic Trouble Codes (DTC) in the ChainLube project.
* This file contains definitions for Diagnostic Trouble Codes (DTC) in the DE-Timer project.
* It includes enums for DTC active status, severity levels, and specific DTC codes.
* The file also defines an array of DTC definitions and a timestamp indicating the generation time.
*

View File

@ -4,9 +4,8 @@
* @brief Header file for configuration settings and EEPROM operations in the DE-Timer application.
*
* This file defines configuration settings for the DE-Timer project, including default values,
* EEPROM structures, and functions for EEPROM operations. It also defines enums for different sources
* of speed input, GPS baud rates, and CAN bus sources. Additionally, it includes functions for EEPROM handling
* such as storing, retrieving, and formatting configuration data.
* EEPROM structures, and functions for EEPROM operations. It also defines enums for different Battery Types.
* Additionally, it includes functions for EEPROM handling such as storing, retrieving, and formatting configuration data.
*
* @author Marcel Peterkau
* @date 09.01.2024
@ -22,7 +21,7 @@
#include "common.h"
#define I2C_EE_ADDRESS 0x50
#define EEPROM_STRUCTURE_REVISION 3 // Increment this version when changing EEPROM structures
#define EEPROM_STRUCTURE_REVISION 4 // Increment this version when changing EEPROM structures
#define EEPROM_SIZE_BYTES I2C_DEVICESIZE_24LC256
typedef enum Factions_e
@ -97,7 +96,7 @@ const configData_t ConfigData_defaults = {
"FACTION 1", // Faction_1_Name
"FACTION 2", // Faction_2_Name
"FACTION 3", // Faction_3_Name
"ChainLube",
"ArisoftTimer",
QUOTE(WIFI_AP_PASSWORD),
QUOTE(WIFI_SSID_CLIENT),
QUOTE(WIFI_PASSWORD_CLIENT),

View File

@ -31,8 +31,8 @@ typedef struct Constants_s
} Constants_t;
const Constants_t constants PROGMEM = {
1, 4, // Firmware_Version
1, 4, // Required Flash Version
1, 5, // Firmware_Version
1, 5, // Required Flash Version
GIT_REV // Git-Hash-String
};

View File

@ -1,20 +0,0 @@
#ifndef _OLED_DISPLAY_H_
#define _OLED_DISPLAY_H_
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "globals.h"
#include "eeprom.h"
#define OLED_SDA 4
#define OLED_SCL 15
#define OLED_RST 16
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
void OLED_Init();
void OLED_Process();
#endif

View File

@ -1,7 +1,7 @@
/**
* @file webui.h
*
* @brief Header file for the web-based user interface (WebUI) in the ChainLube application.
* @brief Header file for the web-based user interface (WebUI) in the DE-Timer application.
*
* This file contains declarations for functions related to the initialization and processing of the
* web-based user interface (WebUI). It includes the necessary libraries and dependencies for handling

View File

@ -1,42 +0,0 @@
#include "oled_display.h"
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RST);
void OLED_Init()
{
// reset OLED display via software
pinMode(OLED_RST, OUTPUT);
digitalWrite(OLED_RST, LOW);
delay(20);
digitalWrite(OLED_RST, HIGH);
// initialize OLED
Wire.begin(OLED_SDA, OLED_SCL);
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3c, false, false))
{ // Address 0x3C for 128x32
Serial.println(F("SSD1306 allocation failed"));
}
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.print("DISPLAY INIT");
display.display();
}
void OLED_Process()
{
display.clearDisplay();
display.setCursor(0, 0);
display.printf("LiPo: %d%%\n", globals.battery_level);
display.print(PersistenceData.activeFaction == FACTION_1 ? "> " : " ");
display.printf("%-5s: %02d:%02d:%02d\n", PersistenceData.faction_1_timer, PersistenceData.faction_1_timer / 3600, (PersistenceData.faction_1_timer / 60) % 60, PersistenceData.faction_1_timer % 60);
display.print(PersistenceData.activeFaction == FACTION_2 ? "> " : " ");
display.printf("%-5s: %02d:%02d:%02d\n", PersistenceData.faction_2_timer, PersistenceData.faction_2_timer / 3600, (PersistenceData.faction_2_timer / 60) % 60, PersistenceData.faction_2_timer % 60);
display.print(PersistenceData.activeFaction == FACTION_3 ? "> " : " ");
display.printf("%-5s: %02d:%02d:%02d\n", PersistenceData.faction_3_timer, PersistenceData.faction_3_timer / 3600, (PersistenceData.faction_3_timer / 60) % 60, PersistenceData.faction_3_timer % 60);
display.display();
}

View File

@ -1,7 +1,7 @@
/**
* @file webui.cpp
*
* @brief Implementation file for web-based user interface (WebUI) functions in the ChainLube application.
* @brief Implementation file for web-based user interface (WebUI) functions in the DE-Timer application.
*
* This file contains the implementation of functions related to the initialization and processing of the
* web-based user interface (WebUI). It includes the setup of LittleFS, handling of firmware version checks,
@ -37,7 +37,7 @@ void parseWebsocketString(char *data, char *identifierBuffer, size_t identifierB
int findIndexByString(const char *searchString, const char *const *array, int arraySize);
/**
* @brief Initializes the web-based user interface (WebUI) for the ChainLube application.
* @brief Initializes the web-based user interface (WebUI) for the DE-Timer application.
*
* This function sets up the necessary components for the WebUI, including mounting LittleFS,
* performing flash version checks, initializing mDNS, and configuring the web server with
@ -93,7 +93,7 @@ void initWebUI()
}
/**
* @brief Processes the web server functionality for the ChainLube application.
* @brief Processes the web server functionality for the DE-Timer application.
*
* This function performs periodic processing tasks for the web server, including cleaning up
* WebSocket clients and refreshing client data when WebSocket connections are active. It ensures
@ -117,7 +117,7 @@ void Webserver_Process()
}
/**
* @brief Shuts down the web server functionality for the ChainLube application.
* @brief Shuts down the web server functionality for the DE-Timer application.
*
* This function closes all WebSocket connections and terminates the web server. It is intended
* to be called when the application is being shut down or when there is a need to deactivate the