2#ifdef USE_DISPLAY_MODULE
64 M5.Lcd.drawRGBBitmap(0,0, (uint16_t *)bitmap, 135,100);
69boolean _showScrollingTextWindow =
false;
71#define SHOW_BIG_BUTTON
85 return _showScrollingTextWindow;
110const char* (*_getStatusFunc)(void) = NULL;
116#define SEMANTIC_MARKER_QR_VERSION 10
120#define SCREEN_TYPE_NORMAL 0
122#define SCREEN_TYPE_HOME 1
123#define SCREEN_TYPE_STATUS 2
124#define SCREEN_TYPE_HELP 3
125#define SCREEN_TYPE_WIFI 4
126#define SCREEN_TYPE_TILT 5
127#define SCREEN_TYPE_BUZZ 6
128#define SCREEN_TYPE_AP 7
129#define SCREEN_TYPE_GUEST_PAGE 8
130#define SCREEN_TYPE_FEED_GUEST 9
131#define SCREEN_TYPE_PAIRED_DEV 10
132#define SCREEN_TYPE_RESET 11
133#define SCREEN_TYPE_REBOOT 12
135#define SCREEN_TYPE_HOME_SIMPLE 13
136#define SCREEN_TYPE_HOME_SIMPLE_1 14
137#define SCREEN_TYPE_HOME_SIMPLE_2 15
138#define SCREEN_TYPE_HOME_SIMPLE_3 16
139#define SCREEN_TYPE_DOC_FOLLOW 17
140#define SCREEN_TYPE_TIMER 18
152 if (title.compareTo(
"MINI CLICKER")==0)
156 else if (title.compareTo(
"MINI-1")==0)
160 else if (title.compareTo(
"MINI-2")==0)
166 else if (title.compareTo(
"MINI-3")==0)
171 else if (title.compareTo(
"WIFI FEED")==0)
175 else if (title.startsWith(
"HELP"))
179 else if (title.startsWith(
"WIFI"))
183 else if (title.startsWith(
"TILT"))
187 else if (title.startsWith(
"BUZZ"))
191 else if (title.startsWith(
"AP"))
195 else if (title.startsWith(
"GUEST PAGE"))
199 else if (title.startsWith(
"FEED GUEST"))
203 else if (title.startsWith(
"STATUS"))
207 else if (title.startsWith(
"RESET"))
211 else if (title.startsWith(
"DOC FOLLOW"))
215 else if (title.startsWith(
"REBOOT"))
219 else if (title.startsWith(
"TIMER"))
224 else if (title.startsWith(
"P:"))
254#define HEIGHT_3_2LINE 60
297#define MAX_ACTION_TEXT_HOME_COLORS 5
341#define SM_ACTION_SMALL 2
342#define QRAVATAR_ACTION 3
346#define TRY_SWAPPED_COLORS
347#ifdef TRY_SWAPPED_COLORS
349 {0,145,
WIDTH,
HEIGHT_3,
FONT_3,ORANGE,BLACK,BLACK,
ROTATE_0,7},
350 {0,180,
WIDTH,
HEIGHT_3,
FONT_3,WHITE,BLUE,BLACK,
ROTATE_0,7},
353 {0,145,
WIDTH,
HEIGHT_2,
FONT_2,WHITE,BLACK,BLACK,
ROTATE_0,40},
359 {0,145,
WIDTH,
HEIGHT_3,
FONT_3,WHITE,BLUE,BLACK,
ROTATE_0,7},
360 {0,180,
WIDTH,
HEIGHT_3,
FONT_3,WHITE,BLACK,BLACK,
ROTATE_0,7},
362 {0,180,
WIDTH,
HEIGHT_3,
FONT_3,ORANGE,BLACK,BLACK,
ROTATE_0,7},
365 {0,145,
WIDTH,
HEIGHT_2,
FONT_2,WHITE,BLACK,BLACK,
ROTATE_0,40},
383 M5.Lcd.setCursor(textP.
x + 2, textP.
y);
393 M5.Lcd.fillRect(0, 60, 135, 140, ORANGE);
394 M5.Lcd.setTextColor(WHITE, BLACK);
395 M5.Lcd.setCursor(10, 90);
396 M5.Lcd.setTextSize(2);
397 M5.Lcd.println(
"\nStarting \nOTA Update \nPlease Wait\n2-5 minutes");
416 M5.Lcd.fillRect(0, 0, 135, 240, BLUE);
417 M5.Lcd.setTextColor(WHITE, BLACK);
418 M5.Lcd.setCursor(10, 90);
419 M5.Lcd.setTextSize(3);
480 SerialCall.printf(
"incrementScreenColor_displayModule = %d\n", screenColor);
494 SerialLots.printf(
"getScreenColor_displayModule = %d\n", screenColor);
509 SerialCall.printf(
"setScreenColor_displayModule = %d\n", screenColor);
551 SerialTemp.print(
"createDynamicSemanticAddress: ");
560 SerialCall.print(
"createSemanticAddress: ");
565 int maxLenForIphone = 250;
570 SerialTemp.printf(
"1. Truncating chartacters to: %d\n", maxLenForIphone);
580#define USE_TIMER_DELAY_CLASS
582#ifdef USE_TIMER_DELAY_CLASS
602unsigned long _delayStart;
604boolean _delayRunning =
false;
610 SerialCall.printf(
"startDelay_displayModule: %d\n", seconds);
613 _delayRunning =
true;
614 _delaySeconds = seconds;
620 if (_delayRunning && ((
millis() - _delayStart) >= (_delaySeconds * 1000)))
622 _delayRunning =
false;
623 SerialCall.println(
"delayFinished..");
632 SerialCall.println(
"stopDelay _delayRunning=false");
634 _delayRunning =
false;
644#define BLK_PWM_CHANNEL 7
655 SerialCall.println(
"blankScreen_displayModule");
665 M5.Lcd.fillScreen(BLACK);
681#define TRY_DEVICES_AND_PAIRED
682#ifdef TRY_DEVICES_AND_PAIRED
684 char infoString[150];
685 boolean multilineScreenType;
690 multilineScreenType =
true;
714 SerialCall.println(infoString);
742 SerialCall.println(
"wakeupScreen_displayModule");
752 SerialCall.println(
"clearScreen_displayModule");
762 M5.Lcd.setRotation(0);
764 M5.Lcd.fillScreen(BLACK);
771 SerialLots.print(
"isBlankScreen_displayModule:");
772#ifdef USE_TIMER_DELAY_CLASS
776 boolean delayRunning = _delayRunning;
778 SerialLots.println(!delayRunning?
"BLANK":
"NOT BLANK");
781 return !delayRunning;
801 SerialMin.println(
"setupESP_M5");
817 M5.begin(
true,
true,
true,
818 false, kMBusModeOutput,
844 M5.Lcd.setTextColor(WHITE);
849 SerialMin.println(
"M5CORE2_MODULE");
850 M5.Lcd.drawCircle(65,220, 10, WHITE);
851 M5.Lcd.drawCircle(155,220, 10, WHITE);
852 M5.Lcd.drawCircle(255,220, 10, WHITE);
858 M5.Lcd.setRotation(0);
864 M5.Lcd.setTextSize(2);
868 M5.Lcd.printf(
"%s", VERSION);
922 loop_Alternate_displayModule();
930 SerialCall.println(
"loop_displayModule: delayFinished");
943#define LOOP_COUNTER_MICROSECONDS 20
950#define TRY_BLANKSCREEN_IN_LOOP
951#ifdef TRY_BLANKSCREEN_IN_LOOP
955 SerialCall.println(
"loop_displayModule: isBlankScreen");
962#pragma mark DEBUG_7_12
963 SerialCall.println(
"loop_displayModule: redrawSemanticMarker(KEEP_SAME)");
972 M5.Lcd.drawRect(50, 235, 10, 3, WHITE);
973 M5.Lcd.drawRect(155,235, 10, 3, WHITE);
974 M5.Lcd.drawRect(258,235, 10, 3, WHITE);
985 if (text.length() < maxLen)
991 M5.Lcd.print(text.substring(0,maxLen));
1001 int maxLen = textColor.
maxLen;
1007 for (
int i=text.length(); i< maxLen; i++)
1018 SerialCall.print(
"drawAction: ");
1019 SerialCall.print(title);
1020 SerialCall.printf(
" screenType=%d\n",screenType);
1027 title.replace(
" ",
"\r\n");
1048#ifdef M5CORE2_MODULE
1111 char infoString[150];
1112 boolean multilineScreenType =
false;
1122 boolean isConnectedBLE =
1128 String gStatus =
"g";
1129 String gStatusHome =
"";
1130 if (isConnectedBLE && gatewayOn)
1145 multilineScreenType =
true;
1147 sprintf(infoString,
"Scan Image\nFor Help");
1151 multilineScreenType =
true;
1157 sprintf(infoString,
"Swap WIFI");
1159 sprintf(infoString,
"Swap/Retry\nWIFI");
1164 sprintf(infoString,
"Scan to\nShare WIFI");
1168 multilineScreenType =
true;
1171 sprintf(infoString,
"Enter AP\n192.168.4.1");
1173 sprintf(infoString,
"In AP\n192.168.4.1");
1176 multilineScreenType =
true;
1177 sprintf(infoString,
"Share WIFI with Feeder");
1201 multilineScreenType =
true;
1228 multilineScreenType =
true;
1229 sprintf(infoString,
"Feed Guest");
1270 M5.Lcd.setTextColor(BLUE, YELLOW);
1272 M5.Lcd.setTextColor(WHITE, BLACK);
1282 else return index(modesDesired,mode) != NULL;
1353 boolean isConnectedBLE =
1360 boolean isConnectedWIFI =
1365 String gStatus =
" ";
1366 if (isConnectedBLE && gatewayOn)
1370 else if (isConnectedBLE)
1383 SerialCall.print(
"displayZoomedSemanticMarker: ");
1408 SerialTemp.println(wifi1);
1409 SerialTemp.println(wifi2);
1410 boolean wifi1Current = strcmp(json,wifi1)==0;
1412 SerialTemp.printf(
"wifi1Current == %d\n", wifi1Current);
1416 char *json1 = strstr(wifi1,
":");
1418 if (json1 && strlen(json1) > 3)
1426 char *comma = strchr(json1,
'\'');
1427 json1Len = comma?((int)(comma - json1)):strlen(json1);
1429 SerialTemp.println(json1);
1431 char *json2 = strstr(wifi2,
":");
1433 if (json2 && strlen(json2) > 3)
1441 char *comma = strchr(json2,
'\'');
1442 json2Len = comma?((int)(comma - json2)):strlen(json2);
1444 SerialTemp.println(json2);
1447 strncat(buffer, wifi1Current?json1:json2, wifi1Current?json1Len:json2Len );
1448 strcat(buffer,
"\n\r");
1452 strncat(buffer, !wifi1Current?json1:json2, !wifi1Current?json1Len:json2Len );
1454 M5.Lcd.setTextColor(WHITE, BLUE);
1455 M5.Lcd.print(buffer);
1457 SerialCall.println(buffer);
1544 SerialMin.println(
" *** INVALID screenType ***");
1557 M5.Lcd.fillRect(0, 80, 135, 130, BLACK);
1562 int textLength = 10;
1582 if (currentItem >= windowSize)
1588 startItem = currentItem - windowSize + 1;
1590 maxItems = startItem + windowSize;
1591 for (
int i=startItem; i < maxItems; i++)
1597 M5.Lcd.setTextColor(WHITE, BLUE);
1601 M5.Lcd.setTextColor(ORANGE, BLACK);
1604 sprintf(buffer,
"-%.*s\n\r", textLength, menu);
1605 M5.Lcd.print(buffer);
1620 title.replace(
" ",
"\r\n");
1634 String title =
"-MINI\r\nCLICKER";
1642 String title =
"-SHARE\r\nWIFI";
1659 SerialCall.printf(
"redrawSemanticMarker_displayModule(startNew:%d, ScreenType = %d)\n", startNew, screenType);;
1684#define TRY_CLEAR_WITH_RESET_TIMER
1686#ifdef TRY_CLEAR_WITH_RESET_TIMER
1731#ifdef M5CORE2_MODULE
1734 M5.Lcd.setRotation(0);
1752#ifdef M5CORE2_MODULE
1755 M5.Lcd.setRotation(0);
1757 SerialLots.print(
"last vs current: ");
1759 SerialLots.println(
" vs ");
1768#ifdef ESP_M5_ATOM_S3
1815 M5.Lcd.print(
"+FEED ");
1899 SerialTemp.print(
"showSemanticMarker(nulls func) ");
1900 SerialTemp.print(title);
1901 SerialTemp.print(
" SM=");
1902 SerialTemp.println(semanticMarkerAddress);
1930 SerialCall.print(
"showSemanticMarkerFunc: ");
1931 SerialCall.print(title);
1932 SerialCall.print(
" SM=");
1933 SerialCall.println(semanticMarkerAddressBase);
1967 SerialLots.println(text);
1969#ifdef M5CORE2_MODULE
1972 if (_showScrollingTextWindow)
1974#ifdef SHOW_BIG_BUTTON
1977 addToScrollingText_displayModule(text);
1986 SerialLots.println(
"Not displaying since blank screen");
2017 if (text.compareTo(
"FEED")==0)
2023#ifdef M5CORE2_MODULE
2025void loop_Alternate_displayModule()
2034void addToScrollingText_displayModule(String textString)
2036 if (_showScrollingTextWindow)
2038 M5.Lcd.setTextSize(1);
2039 M5.Lcd.println(textString);
2041 int X = M5.Lcd.getCursorX();
2042 int Y = M5.Lcd.getCursorY();
2043 SerialDebug.printf(
"cursor(%d,%d)\n", X, Y);
2046 M5.Lcd.setCursor(0,0);
2051void toggleShowingScrollingTextMode_displayModule()
2053 boolean flag = !_showScrollingTextWindow;
2054 setShowingScrollingTextMode_displayModule(flag);
2062boolean scrollingTextWindowVisible_displayModule()
2064 return _showScrollingTextWindow;
2068void showButtonTouched_displayModule()
2070#ifdef SHOW_BIG_BUTTON
2072 if (_showScrollingTextWindow)
2074 SerialDebug.println(
"showButtonTouched_displayModule");
2077 M5.Lcd.fillCircle(150,120,118, BLACK);
2078 M5.Lcd.drawCircle(150,120,118, WHITE);
2079 M5.Lcd.setTextColor(WHITE);
2080 M5.Lcd.setTextSize(5);
2081 M5.Lcd.setCursor(100, 110);
2082 M5.Lcd.print(
"Feed");
2085 M5.Lcd.fillCircle(150,120,118, GREEN);
2086 M5.Lcd.drawCircle(150,120,118, WHITE);
2087 M5.Lcd.setTextColor(BLACK);
2088 M5.Lcd.setTextSize(5);
2089 M5.Lcd.setCursor(100, 110);
2090 M5.Lcd.print(
"Feed");
2096void setShowingScrollingTextMode_displayModule(
boolean flag)
2098 SerialDebug.printf(
"setShowingScrollingTextMode_displayModule(%d, s=%d)\n", flag,_showScrollingTextWindow );
2101 _showScrollingTextWindow = flag;
2107 if (_showScrollingTextWindow)
2113#ifdef SHOW_BIG_BUTTON
2115 M5.Lcd.fillCircle(150,120,118, GREEN);
2116 M5.Lcd.drawCircle(150,120,118, WHITE);
2118 M5.Lcd.setTextColor(BLACK);
2119 M5.Lcd.setTextSize(5);
2120 M5.Lcd.setCursor(100, 110);
2121 M5.Lcd.print(
"Feed");
2127 M5.Lcd.setTextColor(WHITE, BLACK);
2128 M5.Lcd.setCursor(0, 0);
2129 M5.Lcd.setTextSize(1);
2130 M5.Lcd.println(
"Messages from the Network");
2140 M5.Lcd.fillScreen(BLACK);
2147void scrollText_displayModule()
2149 if (_showScrollingTextWindow)
2153 M5.Lcd.fillScreen(BLACK);
2154 M5.Lcd.setCursor(0, 0);
2238 return (
char*)
"unused";
2257int _loopCounter_displayModule = 0;
2261 return _loopCounter_displayModule;
2267 _loopCounter_displayModule = 0;
2270void addToScrollingText_displayModule(String textString)
2275void toggleShowingScrollingTextMode_displayModule()
2280void setShowingScrollingTextMode_displayModule(
boolean flag)
boolean isConnectedBLEClient()
returns whether connected over BLE as a client to a server(like a ESP feeder)
boolean useBLEClient()
returns if the BLEClient is turned on.. note, if connected to a BLE device, then disconnect
void loop_displayModule()
called for the loop() of this plugin
TextPositionStruct _actionTextPosition
#define SCREEN_TYPE_REBOOT
#define SCREEN_TYPE_HOME_SIMPLE_2
void showSemanticMarkerFunc_displayModule(String semanticMarkerAddressBase, String title, const char *(*getStatusFunc)(void))
finish the address after calling the function provided, called from MQTT for STATUS
#define SCREEN_TYPE_RESET
TextPositionStruct _multilineStatusTextPositionZoomed
#define SCREEN_TYPE_DOC_FOLLOW
TextPositionStruct _homeSimpleStatusTextPositionZoomedRED
new for the SM_HOME_SIMPLE - draws FEED as red if over 13 feeds..
boolean containsMode(char *modesDesired, char mode)
returns if the modesDesired contains a mode character, but also true if modesDesired in null
TextPositionStruct _actionTextHomeSimplePositionZoomed_2
int currentScreenTimeout()
current screen timeout
void addToTextMessages_displayModule(String text)
void setupTextPosition(TextPositionStruct textP)
init the text
TextPositionStruct _actionTextPositionZoomed
TextPositionStruct _helpStatusTextPosition
void setupTextPositionOverrideTextColor(TextPositionStruct textP, TextPositionStruct textColor)
init the text - but override the text color (stil using the textP.blankCOlor
void wakeupScreen_displayModule()
wakes up the screen
#define WIDTH
These are when the ESP_M5 isn't used, so the code below compiles..
void showOTAUpdatingMessage()
show an OTA message..
void printTextAtTextPositionOverrideTextColor(String text, TextPositionStruct textPosition, TextPositionStruct textColor)
use the textPositionStruct - but override the text color
void printTextPadSpaces(String text, TextPositionStruct textColor)
print the text, but pad with background color spaces..
#define SCREEN_TYPE_HOME
for home screen
void setup_displayModule()
for types: String, boolean ..
#define SCREEN_TYPE_HOME_SIMPLE_1
TextPositionStruct _menuTextPositionZoomed_4less
new Menu selection (if 4 ..)
void clearScreen_displayModule()
clears the screen (but not a blank screen) and stops the timer..
int _markerTimer
markerTimer is a semi timer for the number of times before doing anything. Kinda a kludge.
void drawSensorStatus(int screenType)
sets the "Sensor Status"
void incrementScreenColor_displayModule()
#define SCREEN_TYPE_STATUS
#define MAX_ACTION_TEXT_HOME_COLORS
these are grouped in an array for the color index to use. If index > max then use max....
#define LOOP_COUNTER_MICROSECONDS
boolean isBlankScreen_displayModule()
whether screen is blank (so the button can be a wake, vs action..)
TextPositionStruct _actionTextHomePositionZoomed
boolean displayOnBlankScreen()
whether to display on a blank screen
boolean inAlternateDisplay_displayModule()
String _semanticTitle
default semantic title
void printTextAtTextPosition(String text, TextPositionStruct textPosition)
use the textPositionStruct
void showText_displayModule(String text)
void redrawSemanticMarker_displayModule(boolean startNew)
redraws the image..
TextPositionStruct _actionTextHomeSimplePositionZoomed_4
void incrementLoopTimer()
increment the loop timer
void setScreenColor_displayModule(int screenColor)
cache for getting the screen color 0..n. Will reset the cache as well
void drawModuleStatus(char *modesDesired)
sets the "Module Status", will show only the modesDesired if non null
void displayZoomedSemanticMarker(int screenType)
perform a zoom .. of the semantic marker - or it might be something else..
#define SCREEN_TYPE_HOME_SIMPLE_3
int _currentScreenType
the current screen type (a side effect of asking for it)
void stopLoopTimer()
stop the loop timer
#define SCREEN_TYPE_GUEST_PAGE
TextPositionStruct _sensorStatusTextPositionZoomed
void setBrightness_displayModule(int brightness)
TextPositionStruct _connectedStatusTextPositionZoomed
the position of "connected" at the bottom on the first 3 screens..
String _currentSemanticMarkerAddressBase
base http address of semantic markers
TextPositionStruct _zoomedTextPositions[MAX_ACTIONS]
#define SCREEN_TYPE_TIMER
String _lastSemanticMarkerAddress
TextPositionStruct _homeSimpleStatusTextPositionZoomed
new for the SM_HOME_SIMPLE
boolean _fullScreenMessageDisplayed
set so it can be erased on next loop
TextPositionStruct _menuTextPositionZoomed_4plus
#define SCREEN_TYPE_FEED_GUEST
void showSemanticMarker_displayModule(String semanticMarkerAddress, String title)
displays the Semantic Marker (a super QR code) on the M5 screen (with an N second display)
int getScreenColor_displayModule()
cache for getting the screen color 0..n. Will reset the cache as well
const char *(* _getStatusFunc)(void)
stores the statusFunc (it's a pointer to a function)
TextPositionStruct _actionTextHomeSimpleColor[MAX_ACTION_TEXT_HOME_COLORS]
void blankScreen_displayModule()
blanks the screen
TextPositionStruct _actionTextHomeSimplePositionZoomed
int _fullscreenLoopCount
used to create a mini
TextPositionStruct _moduleStatusTextPositionZoomed
struct TextPosition TextPositionStruct
TextPositionStruct _multilineStatusTextPosition
Help.
TextPositionStruct _moduleStatusTextPosition
status are the state modules (WIFI ON/off, etc)
void drawAction(String title, int screenType)
sets the "ACTION" – The TOP line
TextPositionStruct _actionTextHomeSimplePositionZoomed_1
TimerDelayClass * _timerDelayClass_DisplayModule
3.29.25 RaiiiinIeeeeR Beer movie
void printText(String text, int maxLen)
prints the text up to the maxLen (the setup of position, etc is already done)
String _currentSemanticMarkerAddress
default semantic marker (or the current one)
#define SCREEN_TYPE_NORMAL
void displayFullscreenMessage(String text, boolean turnOn)
void displaySimpleStatus()
just draw the simple status at bottom
void drawStatusText(String text, boolean isOn)
draws the text and differeent if ON or OFF
TextPositionStruct _sensorStatusTextPosition
mode is the status of sensors .
const char * currentSemanticMarkerAddress_displayModule()
returns the current semantic marker (eg. guest page)
boolean _semanticMarkerShown
if blank, then only show something after a click (not a message)
int screenTypeForTitle_displayModule(String title)
TextPositionStruct _actionTextHomeSimplePositionZoomed_3
#define SEMANTIC_MARKER_QR_VERSION
1.26.24 10 seems to be working..
String createSemanticAddress()
int getLoopTimer_displayModule()
returns the loop timer (just a timer..)
void startDelay(int seconds)
#define SCREEN_TYPE_PAIRED_DEV
int _loopTimer
ticks.. when it rest? (show to blank screen)
void resetLoopTimer_displayModule()
reset the loop timer .. useful for testing,
#define SCREEN_TYPE_HOME_SIMPLE
try simple menu
void setupESP_M5()
setup the Lcd, etc..
char * getLastDocFollowSemanticMarker_MQTTNetworking()
boolean isConnectedMQTT_MQTTState()
value of MQTT connected
boolean isConnectedWIFI_MQTTState()
value of WIFI connected
char * deviceName_mainModule()
gets the device name
int getFeedCount_mainModule()
feedcount info..
char * main_JSONStringForWIFICredentials()
retrieve a JSON string for the ssid and ssid_password: {'ssid':<ssid>,'ssidPassword':<pass>"}
int feedCountMax_mainModule()
returns the max for this feeder
char * getPairedDeviceOrAddress_mainModule()
returns if the paired device is not NONE .. returns address or device
void refreshDelayButtonTouched_MainModule()
called by the feed operation to say the device is still running.. and count it as a button click.
char * connectedBLEDeviceName_mainModule()
returns the connected BLE Device name (the :NAME of advertisment, Address: 01:39:3f:33 part of name,...
float getTemperature_mainModule()
retrieves the temperature .
boolean isValidPairedDevice_mainModule()
returns if the paired device is not NONE. Note, the paired Name might be an address now (see below)
float getBatPercentage_mainModule()
start of the sensor updates ... TODO: tie these to the MQTT messaging as well..
void updateMenuState(ModelKindEnum modelKind)
updates the model for the menu state, this sets max etc
char * menuForState(ModelKindEnum modelKind, int item)
returns the menu string for the deviceState's item number (use woudl go 0..maxItems -1
ModelStateStruct * getModel(ModelKindEnum modelKind)
retrieves the state model for the modelKind
ModelKindEnum
a pseudo Class
@ pairedButNotConnectedEnum
@ notConnectedEnum
factory default but not connecte to anything..
@ pairableAndConnectedEnum
void savePreferenceInt_mainModule(int preferenceID, int val)
sets an int preference
boolean getPreferenceBoolean_mainModule(int preferenceID)
called to set a preference (which will be an identifier and a string, which can be converted to a num...
void setOnBootPreferences_mainModule()
set some defaults on boot - that override EPROM this can be called on the HOME screen to set back to ...
int getPreferenceInt_mainModule(int preferenceID)
called to set a preference (which will be an identifier and a string, which can be converted to a num...
char * getPreferenceString_mainModule(int preferenceID)
returns the preference but in it's own string buffer. As long as you use it before calling getPrefere...
#define PREFERENCE_SENSOR_TILT_VALUE
Sensor preferences.
#define PREFERENCE_ONLY_GEN3_CONNECT_SETTING
if true, only BLEClient connect to GEN3 feeders..
#define PREFERENCE_SEMANTIC_MARKER_ZOOMED_VALUE
Display preferences (SemanticMarker etc) - boolean.
#define PREFERENCE_WIFI_CREDENTIAL_2_SETTING
#define PREFERENCE_MAIN_BLE_SERVER_VALUE
#define PREFERENCE_STEPPER_BUZZER_VALUE
stepper preferences
#define PREFERENCE_WIFI_CREDENTIAL_1_SETTING
#define PREFERENCE_DISPLAY_SCREEN_TIMEOUT_VALUE
sets the timeout value
#define PREFERENCE_DISPLAY_ON_BLANK_SCREEN_VALUE
Display preferences - show messages on blank screen- boolean.
#define PREFERENCE_IS_MINIMAL_MENU_SETTING
sets the max temp for a poweroff
#define PREFERENCE_SCREEN_COLOR_SETTING
ithe color of the screen 0..n
#define PREFERENCE_MAIN_GATEWAY_VALUE
boolean doneWIFI_APModule_Credentials()
called to see if the WIFIModule has finished bootstrapping..
void startDelay(float delayAmountSeconds)
starts delay calculation
boolean delayFinished()
whether the currently delay is finished, false if not running at all
void stopDelay()
stops delay
the struct for the models. Since this isn't straight OO, we are overlaying information....
int currentItem
the current item
boolean perfersBigText
a preference to the View that big text is desired
PairedDeviceStateEnum pairedDeviceStateEnum
int delaySeconds
length of delay (changable..)
int maxItems
the number of items in the model
uint16_t textColorBackground