@@ -21,24 +21,24 @@ StChromaArtDrawable Drawable;
2121GraphicsDeviceRenderer renderer (30 , applicationInfo.name, &Drawable);
2222StBspTouchInterrogator touchInterrogator (240 , 320 );
2323MenuTouchScreenManager touchScreen (&touchInterrogator, &renderer, iotouch::TouchInterrogator::PORTRAIT);
24+ tcextras::IoaTouchScreenCalibrator touchCalibrator (&touchScreen, &renderer, 400 );
2425
2526// Global Menu Item declarations
2627const AnalogMenuInfo minfoUnicodeLevel = { " Рівень" , 21 , 0xffff , 1000 , NO_CALLBACK, 0 , 10 , " П" };
27- AnalogMenuItem menuUnicodeLevel (&minfoUnicodeLevel, 0 , NULL );
28+ AnalogMenuItem menuUnicodeLevel (&minfoUnicodeLevel, 0 , NULL , INFO_LOCATION_PGM );
2829const char enumStrUnicodeChoice_0[] = " Салат" ;
2930const char enumStrUnicodeChoice_1[] = " піца" ;
3031const char enumStrUnicodeChoice_2[] = " борщ" ;
3132const char * const enumStrUnicodeChoice[] = { enumStrUnicodeChoice_0, enumStrUnicodeChoice_1, enumStrUnicodeChoice_2 };
3233const EnumMenuInfo minfoUnicodeChoice = { " Вибір" , 20 , 0xffff , 2 , NO_CALLBACK, enumStrUnicodeChoice };
33- EnumMenuItem menuUnicodeChoice (&minfoUnicodeChoice, 0 , &menuUnicodeLevel);
34- RENDERING_CALLBACK_NAME_INVOKE (fnUnicodeRtCall, backSubItemRenderFn, " Unicode" , -1 , NO_CALLBACK)
34+ EnumMenuItem menuUnicodeChoice (&minfoUnicodeChoice, 0 , &menuUnicodeLevel, INFO_LOCATION_PGM);
3535const SubMenuInfo minfoUnicode = { " Unicode" , 19 , 0xffff , 0 , NO_CALLBACK };
36- BackMenuItem menuBackUnicode (fnUnicodeRtCall , &menuUnicodeChoice);
37- SubMenuItem menuUnicode (&minfoUnicode, &menuBackUnicode, NULL );
36+ BackMenuItem menuBackUnicode (&minfoUnicode , &menuUnicodeChoice, INFO_LOCATION_PGM );
37+ SubMenuItem menuUnicode (&minfoUnicode, &menuBackUnicode, NULL , INFO_LOCATION_PGM );
3838const AnyMenuInfo minfoDialogs = { " Dialogs" , 18 , 0xffff , 0 , onPresentDialog };
39- ActionMenuItem menuDialogs (&minfoDialogs, &menuUnicode);
39+ ActionMenuItem menuDialogs (&minfoDialogs, &menuUnicode, INFO_LOCATION_PGM );
4040const BooleanMenuInfo minfoSamplesBoolCheck = { " Bool Check" , 22 , 0xffff , 1 , NO_CALLBACK, NAMING_CHECKBOX };
41- BooleanMenuItem menuSamplesBoolCheck (&minfoSamplesBoolCheck, false , NULL );
41+ BooleanMenuItem menuSamplesBoolCheck (&minfoSamplesBoolCheck, false , NULL , INFO_LOCATION_PGM );
4242RENDERING_CALLBACK_NAME_INVOKE (fnSamplesLgePosRtCall, largeNumItemRenderFn, " LgePos" , -1 , NO_CALLBACK)
4343EditableLargeNumberMenuItem menuSamplesLgePos(fnSamplesLgePosRtCall, LargeFixedNumber(7 , 0 , 12456U , 0U , false ), 17, false, &menuSamplesBoolCheck);
4444RENDERING_CALLBACK_NAME_INVOKE (fnSamplesRGBRtCall, rgbAlphaItemRenderFn, " RGB" , -1 , NO_CALLBACK)
@@ -48,45 +48,43 @@ TimeFormattedMenuItem menuSamplesTime(fnSamplesTimeRtCall, TimeStorage(0, 0, 0,
4848RENDERING_CALLBACK_NAME_INVOKE (fnSamplesTextRtCall, textItemRenderFn, " Text" , -1 , NO_CALLBACK)
4949TextMenuItem menuSamplesText(fnSamplesTextRtCall, " " , 14 , 10 , &menuSamplesTime);
5050const AnalogMenuInfo minfoBeltSpeed = { " Belt Speed" , 13 , 0xffff , 200 , NO_CALLBACK, 0 , 100 , " mS" };
51- AnalogMenuItem menuBeltSpeed (&minfoBeltSpeed, 200 , &menuSamplesText);
51+ AnalogMenuItem menuBeltSpeed (&minfoBeltSpeed, 200 , &menuSamplesText, INFO_LOCATION_PGM );
5252const char enumStrBeltStatus_0[] = " Running" ;
5353const char enumStrBeltStatus_1[] = " Warm Up" ;
5454const char enumStrBeltStatus_2[] = " Stopped" ;
5555const char * const enumStrBeltStatus[] = { enumStrBeltStatus_0, enumStrBeltStatus_1, enumStrBeltStatus_2 };
5656const EnumMenuInfo minfoBeltStatus = { " Belt Status" , 12 , 0xffff , 2 , NO_CALLBACK, enumStrBeltStatus };
57- EnumMenuItem menuBeltStatus (&minfoBeltStatus, 1 , &menuBeltSpeed);
58- RENDERING_CALLBACK_NAME_INVOKE (fnSamplesRtCall, backSubItemRenderFn, " Samples" , -1 , NO_CALLBACK)
57+ EnumMenuItem menuBeltStatus (&minfoBeltStatus, 1 , &menuBeltSpeed, INFO_LOCATION_PGM);
5958const SubMenuInfo minfoSamples = { " Samples" , 11 , 0xffff , 0 , NO_CALLBACK };
60- BackMenuItem menuBackSamples (fnSamplesRtCall , &menuBeltStatus);
61- SubMenuItem menuSamples (&minfoSamples, &menuBackSamples, &menuDialogs);
59+ BackMenuItem menuBackSamples (&minfoSamples , &menuBeltStatus, INFO_LOCATION_PGM );
60+ SubMenuItem menuSamples (&minfoSamples, &menuBackSamples, &menuDialogs, INFO_LOCATION_PGM );
6261const BooleanMenuInfo minfoConnectivityEnableUSB = { " Enable USB" , 10 , 8 , 1 , NO_CALLBACK, NAMING_TRUE_FALSE };
63- BooleanMenuItem menuConnectivityEnableUSB (&minfoConnectivityEnableUSB, false , NULL );
64- RENDERING_CALLBACK_NAME_INVOKE (fnConnectivityRtCall, backSubItemRenderFn, " Connectivity" , -1 , NO_CALLBACK)
62+ BooleanMenuItem menuConnectivityEnableUSB (&minfoConnectivityEnableUSB, false , NULL , INFO_LOCATION_PGM);
6563const SubMenuInfo minfoConnectivity = { " Connectivity" , 9 , 0xffff , 0 , NO_CALLBACK };
66- BackMenuItem menuBackConnectivity (fnConnectivityRtCall , &menuConnectivityEnableUSB);
67- SubMenuItem menuConnectivity (&minfoConnectivity, &menuBackConnectivity, &menuSamples);
64+ BackMenuItem menuBackConnectivity (&minfoConnectivity , &menuConnectivityEnableUSB, INFO_LOCATION_PGM );
65+ SubMenuItem menuConnectivity (&minfoConnectivity, &menuBackConnectivity, &menuSamples, INFO_LOCATION_PGM );
6866RENDERING_CALLBACK_NAME_INVOKE (fnSettingsRunDurationRtCall, timeItemRenderFn, " Run duration" , 4 , NO_CALLBACK)
6967TimeFormattedMenuItem menuSettingsRunDuration(fnSettingsRunDurationRtCall, TimeStorage(0 , 0 , 0 , 0 ), 8, (MultiEditWireType)6, NULL);
7068const AnalogMenuInfo minfoSettingsTargetSpeed = { " Target speed" , 7 , 2 , 200 , onTargetChanged, 0 , 100 , " mS" };
71- AnalogMenuItem menuSettingsTargetSpeed (&minfoSettingsTargetSpeed, 0 , &menuSettingsRunDuration);
72- RENDERING_CALLBACK_NAME_INVOKE (fnSettingsRtCall, backSubItemRenderFn, " Settings" , -1 , NO_CALLBACK)
69+ AnalogMenuItem menuSettingsTargetSpeed (&minfoSettingsTargetSpeed, 0 , &menuSettingsRunDuration, INFO_LOCATION_PGM);
7370const SubMenuInfo minfoSettings = { " Settings" , 5 , 0xffff , 0 , NO_CALLBACK };
74- BackMenuItem menuBackSettings (fnSettingsRtCall , &menuSettingsTargetSpeed);
75- SubMenuItem menuSettings (&minfoSettings, &menuBackSettings, &menuConnectivity);
71+ BackMenuItem menuBackSettings (&minfoSettings , &menuSettingsTargetSpeed, INFO_LOCATION_PGM );
72+ SubMenuItem menuSettings (&minfoSettings, &menuBackSettings, &menuConnectivity, INFO_LOCATION_PGM );
7673const AnalogMenuInfo minfoConsumption = { " Consumption" , 4 , 0xffff , 4000 , NO_CALLBACK, 0 , 1 , " W" };
77- AnalogMenuItem menuConsumption (&minfoConsumption, 200 , &menuSettings);
74+ AnalogMenuItem menuConsumption (&minfoConsumption, 200 , &menuSettings, INFO_LOCATION_PGM );
7875const AnalogMenuInfo minfoACLine = { " AC Line" , 3 , 0xffff , 2600 , NO_CALLBACK, 0 , 10 , " V" };
79- AnalogMenuItem menuACLine (&minfoACLine, 2450 , &menuConsumption);
76+ AnalogMenuItem menuACLine (&minfoACLine, 2450 , &menuConsumption, INFO_LOCATION_PGM );
8077const BooleanMenuInfo minfoPower = { " Power" , 6 , 0xffff , 1 , NO_CALLBACK, NAMING_ON_OFF };
81- BooleanMenuItem menuPower (&minfoPower, true , &menuACLine);
78+ BooleanMenuItem menuPower (&minfoPower, true , &menuACLine, INFO_LOCATION_PGM );
8279
8380void setupMenu () {
8481 // First we set up eeprom and authentication (if needed).
82+ setSizeBasedEEPROMStorageEnabled (false );
8583 glBspRom.initialise (0 );
8684 menuMgr.setEepromRef (&glBspRom);
8785 // Now add any readonly, non-remote and visible flags.
88- menuBeltSpeed.setReadOnly (true );
8986 menuBeltStatus.setReadOnly (true );
87+ menuBeltSpeed.setReadOnly (true );
9088
9189 // Code generated by plugins.
9290 renderer.setUpdatesPerSecond (10 );
0 commit comments