Hi Zane! Cool you're writing custom menus!
The issue you are experiencing is that your code is never setting the "FR" variable. the "FR" variable defaults to 1, but can be changed in the code by calling
fed3.FR = N, where
N is your ratio. The ClassicMenu script calls a function "ClassicMenu", which you can view in the
FED3.cpp file. Starting in line 1535 the "FR" gets set based on the mode for this Menu:
Because you're not using the "ClassicMenu" function these lines never run. So you just need to set these explicitly in your Arduino code. ie, for Mode 1 your if statement should be:
if (fed3.FEDmode == 1) {
fed3.sessiontype = "FR1 optofood"; //The text in "sessiontype" will appear on the screen and in the logfile
fed3.FR = 1;
}
I'm attaching a revision to your code with these updates, let me know if this works! Best, -Lex