updated tabs etc

This commit is contained in:
TeunBugwood
2023-12-11 14:03:42 +01:00
parent 5b0666920c
commit d1991d9abc
2 changed files with 171 additions and 194 deletions

View File

@@ -27,8 +27,6 @@
#include "llfs.h"
#include "lcd_api.h"
/**
* @fn void wbe_init(void)
* @brief Initialise the http server. It also sets the beginning screen
@@ -36,7 +34,6 @@
*/
void wbe_init(void);
/**
* @fn int fs_open_custom(struct fs_file*, const char*)
* @brief Function is called when the frontend wants to reach/open a file
@@ -48,7 +45,6 @@ void wbe_init(void);
*/
int fs_open_custom(struct fs_file* file, const char* name);
/**
* @fn void fs_close_custom(struct fs_file*)
* @brief Called when closing files and endpoints
@@ -57,7 +53,6 @@ int fs_open_custom(struct fs_file* file, const char* name);
*/
void fs_close_custom(struct fs_file* file);
/**
* @fn void httpd_cgi_handler(struct fs_file*, const char*, int, char**, char**)
* @brief When data is send from the frontend to the backend with the CGI
@@ -72,7 +67,6 @@ void fs_close_custom(struct fs_file* file);
*/
void httpd_cgi_handler(struct fs_file* file, const char* uri, int num_parm, char** pc_param, char** pc_value);
/**
* @fn void wbe_display(const char*, const uint32_t, const uint32_t, const char*)
* @brief Function displays the sentence, its color, the background and the given
@@ -85,5 +79,4 @@ void httpd_cgi_handler(struct fs_file* file, const char* uri, int num_parm, char
*/
void wbe_display(const char* txt, const uint32_t txt_color, const uint32_t background_color, const char* image);
#endif /* INC_WEBSITE_BACKEND_ */

View File

@@ -13,7 +13,6 @@ static inline void wbe_build_infostring(const llfs_file_t* file_list, char* info
static void wbe_decoding_url(const char* encoded, char* decoded);
static uint32_t wbe_color_value(const char* rgb);
void wbe_init(void) {
httpd_init();
@@ -25,16 +24,13 @@ void wbe_init(void) {
return;
}
int fs_open_custom(struct fs_file* file, const char* name) {
// Variables
llfs_file_t *wanted_file = llfs_file_open(name + 1);
size_t buffer_len = 0;
static char image_stringbuffer[STR_MAX] = "";
// The wanted file was found in the filesystem
if (wanted_file != NULL) {
@@ -52,7 +48,6 @@ int fs_open_custom(struct fs_file* file, const char* name) {
return 1;
}
/*
* The endpoint '/images.info' is called when the client wants to call for the
* information string that contains the names of the available images.
@@ -73,7 +68,6 @@ int fs_open_custom(struct fs_file* file, const char* name) {
return 1;
}
// Endpoint when client wants to send information to the backend
if (strncmp(name, "/cgi", 3) == 0) {
@@ -133,7 +127,6 @@ static size_t wbe_get_images(char* images_string, size_t file_count_fs) {
return strlen(images_string);
}
/**
* @fn void wbe_build_infostring(const llfs_file_t*, char*, const size_t)
* @brief Function adds the names of the files in "file_list" and adds them in "infoStr".
@@ -157,8 +150,6 @@ static inline void wbe_build_infostring(const llfs_file_t* file_list, char* info
}
void httpd_cgi_handler(struct fs_file* file, const char* uri, int num_parm, char** pc_param, char** pc_value) {
// Variables
@@ -171,7 +162,6 @@ void httpd_cgi_handler(struct fs_file* file, const char* uri, int num_parm, char
char s_vktxt[CLR_MAX]; // The color of the sentence. (in #RGB)
char s_vka[CLR_MAX]; // Color of the background. (also in #RGB)
if (strcmp("/cgi", uri) == 0) {
for (size_t i = 0; i < num_parm; ++i) {
@@ -218,7 +208,6 @@ void httpd_cgi_handler(struct fs_file* file, const char* uri, int num_parm, char
}
/**
* @fn void wbe_decoding_url(const char*, char*)
* @brief The given information from the CGI parameters are URL encoded.
@@ -272,8 +261,6 @@ static void wbe_decoding_url(const char* encoded, char* decoded) {
}
static uint32_t wbe_color_value(const char* rgb) {
// Variables
@@ -296,11 +283,8 @@ static uint32_t wbe_color_value(const char* rgb) {
return color;
}
void wbe_display(const char* txt, const uint32_t txt_color, const uint32_t bg_color, const char* image) {
// Variables
lcd_gif_t *gif;
char *extension;