From ac10feccf728c94cb6e16b029691492246b99ee2 Mon Sep 17 00:00:00 2001 From: Marcus Date: Fri, 18 Oct 2024 21:04:07 +0200 Subject: [PATCH] create config structs --- Arduino/CanGrow/cangrow.sh | 4 +-- Arduino/CanGrow/include/CanGrow.h | 43 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/Arduino/CanGrow/cangrow.sh b/Arduino/CanGrow/cangrow.sh index 0e971ee..911a17d 100755 --- a/Arduino/CanGrow/cangrow.sh +++ b/Arduino/CanGrow/cangrow.sh @@ -4,8 +4,8 @@ test -z $TTY && TTY="/dev/ttyUSB0" test -z $IP && IP="192.168.4.20" test -z $VER && VER="0.2-dev" -#test -z $BOARD && BOARD="esp8266:esp8266:d1_mini_clone" -test -z $BOARD && BOARD="esp32:esp32:d1_mini32" +test -z $BOARD && BOARD="esp8266:esp8266:d1_mini_clone" +#test -z $BOARD && BOARD="esp32:esp32:d1_mini32" BUILD="$(git rev-parse --short HEAD)-$(echo $BOARD | cut -d : -f1)-$(date '+%Y%m%d%H%M%S')" diff --git a/Arduino/CanGrow/include/CanGrow.h b/Arduino/CanGrow/include/CanGrow.h index 33fdb51..b2d0d58 100644 --- a/Arduino/CanGrow/include/CanGrow.h +++ b/Arduino/CanGrow/include/CanGrow.h @@ -29,6 +29,49 @@ #include "CanGrow_Version.h" +struct Config_WiFi { + char ssid[32]; + char password[64]; + char ip[16]; + char netmask[16]; + char gateway[16]; + char dns[16]; + bool dhcp; +}; + +Config_WiFi configWifi; + +struct Config_System { + byte ntpOffset; + unsigned short maintenanceDuration; + char esp32camIp[16]; +}; + +Config_System configSystem; + +struct Config_Grow { + char GrowName[64]; + unsigned short DoG; + byte daysVeg; + byte daysBloom; + byte lightHoursVeg; + byte lightHoursBloom; + byte sunriseHour; + byte sunriseMinute; + bool sunFade; + byte sunFadeDuration; + +}; + +Config_Grow configGrow; + + + + + + + + struct Config { char GrowName[64]; int DoG;