From cd41b61197716fc1ad73e44c6c7180c41e47120e Mon Sep 17 00:00:00 2001 From: anschrammh Date: Sun, 20 Oct 2019 18:08:57 +0200 Subject: [PATCH] Added and defined two new config files (one for the screen and one for the servers) --- sdCard_content/CONFIG/AP.CFG | 1 + sdCard_content/CONFIG/SCREEN.CFG | 13 +++++++++++++ sdCard_content/CONFIG/SERVER.CFG | 13 +++++++++++++ sdCard_content/CONFIG/STA.CFG | 1 + src/app/definition.h | 2 ++ 5 files changed, 30 insertions(+) create mode 100644 sdCard_content/CONFIG/SCREEN.CFG create mode 100644 sdCard_content/CONFIG/SERVER.CFG diff --git a/sdCard_content/CONFIG/AP.CFG b/sdCard_content/CONFIG/AP.CFG index 1db7208..2d0e159 100644 --- a/sdCard_content/CONFIG/AP.CFG +++ b/sdCard_content/CONFIG/AP.CFG @@ -3,6 +3,7 @@ #If this file is not present or if there is an error at parsing time #default values will be used instead. #If the password is an empty string aka '', the network will be open +#The blank new line at then end of the file is mendatory. Without it, the last parameter won't be read. ENABLED : 'true' SSID : 'The AP ssid you want to put here' diff --git a/sdCard_content/CONFIG/SCREEN.CFG b/sdCard_content/CONFIG/SCREEN.CFG new file mode 100644 index 0000000..e7d7863 --- /dev/null +++ b/sdCard_content/CONFIG/SCREEN.CFG @@ -0,0 +1,13 @@ +#This config file stores the configuration relative to the oled display +#This file allows you to set the screen's orientation, brightness level, among other +#AUTO_OFF defines the ammount of time before the display go into sleep : duration in ms +#0 is never. +#ORIENTATION can be one of the following values : 0, 90, 180 and 270 +#things. The blank new line at then end of the is mendatory. Without it, the last parameter won't be read. +#The blank new line at then end of the file is mendatory. Without it, the last parameter won't be read. + +ENABLED : 'true' +DIMMED : 'false' +INVERTED : 'false' +ORIENTATION : 0 +AUTO_OFF : 3000 diff --git a/sdCard_content/CONFIG/SERVER.CFG b/sdCard_content/CONFIG/SERVER.CFG new file mode 100644 index 0000000..b760228 --- /dev/null +++ b/sdCard_content/CONFIG/SERVER.CFG @@ -0,0 +1,13 @@ +#This config file stores the configuration relative to all the servers running on the board. +#For the moment, there is a web and ftp server. Maybe more to come. +#Ports are between 1 and 65535. +#0 means unlimitted. +#The blank new line at then end of the file is mendatory. Without it, the last parameter won't be read. + +WEB_ENABLED : 'true' +WEB_PORT : 80 +WEB_MAX_CLIENT : 0 +FTP_ENABLED : 'true' +FTP_PORT : 21 +FTP_DATA_PORT : 1024 +FTP_MAX_CLIENT : 0 diff --git a/sdCard_content/CONFIG/STA.CFG b/sdCard_content/CONFIG/STA.CFG index 9319e70..7c3df7b 100644 --- a/sdCard_content/CONFIG/STA.CFG +++ b/sdCard_content/CONFIG/STA.CFG @@ -2,6 +2,7 @@ #to a wifi hotspot #If this file is not present or if there is an error at parsing time #only the AP functionality will be enabled +#The blank new line at then end of the file is mendatory. Without it, the last parameter won't be read. ENABLED : 'true' SSID : 'Your Wifi Router SSID' diff --git a/src/app/definition.h b/src/app/definition.h index f1eac7c..c56d4cc 100644 --- a/src/app/definition.h +++ b/src/app/definition.h @@ -37,6 +37,8 @@ typedef enum { GPIO_0 = 0, //SD card file structure : #define AP_CFG_FILE "/CONFIG/AP.CFG" #define STA_CFG_FILE "/CONFIG/STA.CFG" +#define SCREEN_CFG_FILE "/CONFIG/SCREEN.CFG" +#define SERVER_CFG_FILE "/CONFIG/SERVER.CFG" #define WWW_DIR "/WWW" #define LOG_DIR "/LOGS" #define FTP_DIR "/FTP"