03-31-2022, 09:57 AM
Looks like I broke it when I added the RTC. Month changed from 1-12 to 0-11 so it was trying to add feb 31 as date created which obviously isn't valid. You installed at a perfect time, if it was mid month I wouldn't have realized and data would be wrong. Not serious but not good.
Anyways to fix open the /var/www/html/cpp/rtc.h file using Nano or whatever.
Go down to line 44 which should be this.
short rtc::getCurrentMonth() {return currentMonth;} // get currentMonth
Change that line to the following
short rtc::getCurrentMonth() {return currentMonth + 1;} // get currentMonth
Then recompile the code but first stop robotank.service.
sudo systemctl stop robotank.service
cd /var/www/html/cpp
g++ -o robotank robotank.cpp `mysql_config --cflags --libs` -lpthread -lquickmail -lcurl
sudo ./robotank or sudo systemctl stop robotank.service
Anyways to fix open the /var/www/html/cpp/rtc.h file using Nano or whatever.
Go down to line 44 which should be this.
short rtc::getCurrentMonth() {return currentMonth;} // get currentMonth
Change that line to the following
short rtc::getCurrentMonth() {return currentMonth + 1;} // get currentMonth
Then recompile the code but first stop robotank.service.
sudo systemctl stop robotank.service
cd /var/www/html/cpp
g++ -o robotank robotank.cpp `mysql_config --cflags --libs` -lpthread -lquickmail -lcurl
sudo ./robotank or sudo systemctl stop robotank.service