@@ -327,7 +327,7 @@ float getMax(WaveformParameters &waveformParameters) {
327327
328328class FunctionGeneratorPage : public SetPage {
329329public:
330- static const int PAGE_SIZE = 4 ;
330+ static const int FUNC_GEN_PAGE_SIZE = 4 ;
331331
332332 bool m_initialized = false ;
333333
@@ -698,14 +698,14 @@ class FunctionGeneratorPage : public SetPage {
698698 }
699699
700700 void setScrollPosition (int scrollPosition) {
701- if (g_selectedResources.m_numResources <= PAGE_SIZE ) {
701+ if (g_selectedResources.m_numResources <= FUNC_GEN_PAGE_SIZE ) {
702702 return ;
703703 }
704704
705705 if (scrollPosition < 0 ) {
706706 scrollPosition = 0 ;
707- } else if (scrollPosition > g_selectedResources.m_numResources - PAGE_SIZE ) {
708- scrollPosition = g_selectedResources.m_numResources - PAGE_SIZE ;
707+ } else if (scrollPosition > g_selectedResources.m_numResources - FUNC_GEN_PAGE_SIZE ) {
708+ scrollPosition = g_selectedResources.m_numResources - FUNC_GEN_PAGE_SIZE ;
709709 }
710710
711711 if (scrollPosition != m_scrollPosition) {
@@ -773,7 +773,7 @@ void initWaveformParameters(WaveformParameters &waveformParameters) {
773773
774774class FunctionGeneratorSelectChannelsPage : public SetPage {
775775public:
776- static const int PAGE_SIZE = 7 ;
776+ static const int FUNC_GEN_PAGE_SIZE = 7 ;
777777
778778 void pageAlloc () {
779779 AllResources::reset ();
@@ -839,14 +839,14 @@ class FunctionGeneratorSelectChannelsPage : public SetPage {
839839 }
840840
841841 void setScrollPosition (int scrollPosition) {
842- if (AllResources::getNumResources () <= PAGE_SIZE ) {
842+ if (AllResources::getNumResources () <= FUNC_GEN_PAGE_SIZE ) {
843843 return ;
844844 }
845845
846846 if (scrollPosition < 0 ) {
847847 scrollPosition = 0 ;
848- } else if (scrollPosition > AllResources::getNumResources () - PAGE_SIZE ) {
849- scrollPosition = AllResources::getNumResources () - PAGE_SIZE ;
848+ } else if (scrollPosition > AllResources::getNumResources () - FUNC_GEN_PAGE_SIZE ) {
849+ scrollPosition = AllResources::getNumResources () - FUNC_GEN_PAGE_SIZE ;
850850 }
851851
852852 if (scrollPosition != m_scrollPosition) {
@@ -1180,8 +1180,8 @@ void selectWaveformParametersForChannel(int slotIndex, int subchannelIndex, int
11801180 if (tmpSlotIndex == slotIndex && tmpSubchannelIndex == subchannelIndex && (resourceIndex == -1 || tmpResourceIndex == resourceIndex)) {
11811181 g_functionGeneratorPage.m_selectedItem = i;
11821182
1183- if (i >= FunctionGeneratorPage::PAGE_SIZE ) {
1184- g_functionGeneratorPage.setScrollPosition (i - FunctionGeneratorPage::PAGE_SIZE + 1 );
1183+ if (i >= FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE ) {
1184+ g_functionGeneratorPage.setScrollPosition (i - FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE + 1 );
11851185 }
11861186
11871187 break ;
@@ -2118,26 +2118,26 @@ void data_function_generator_channels(DataOperationEnum operation, Cursor cursor
21182118 } else if (operation == DATA_OPERATION_YT_DATA_GET_POSITION_INCREMENT ) {
21192119 value = 1 ;
21202120 } else if (operation == DATA_OPERATION_YT_DATA_GET_PAGE_SIZE ) {
2121- value = FunctionGeneratorPage::PAGE_SIZE ;
2121+ value = FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE ;
21222122 }
21232123 // scrollbar encoder support
21242124 else if (operation == DATA_OPERATION_GET ) {
21252125 value = MakeValue (1 .0f * g_functionGeneratorPage.getScrollPosition (), UNIT_NONE );
21262126 } else if (operation == DATA_OPERATION_GET_MIN ) {
21272127 value = MakeValue (0 , UNIT_NONE );
21282128 } else if (operation == DATA_OPERATION_GET_MAX ) {
2129- value = MakeValue (1 .0f * (g_functionGeneratorPage.m_selectedResources .m_numResources - FunctionGeneratorPage::PAGE_SIZE ), UNIT_NONE );
2129+ value = MakeValue (1 .0f * (g_functionGeneratorPage.m_selectedResources .m_numResources - FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE ), UNIT_NONE );
21302130 } else if (operation == DATA_OPERATION_GET_ENCODER_STEP_VALUES ) {
21312131 auto stepValues = value.getStepValues ();
21322132
2133- static float values[] = { 1 .0f , 1 .0f * FunctionGeneratorPage::PAGE_SIZE , 2 .0f * FunctionGeneratorPage::PAGE_SIZE , 5 .0f * FunctionGeneratorPage::PAGE_SIZE , 10 .0f * FunctionGeneratorPage::PAGE_SIZE };
2133+ static float values[] = { 1 .0f , 1 .0f * FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE , 2 .0f * FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE , 5 .0f * FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE , 10 .0f * FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE };
21342134
21352135 stepValues->values = values;
21362136 stepValues->count = sizeof (values) / sizeof (float );
21372137 stepValues->unit = UNIT_NONE ;
21382138
21392139 stepValues->encoderSettings .accelerationEnabled = true ;
2140- stepValues->encoderSettings .range = 10 .0f * FunctionGeneratorPage::PAGE_SIZE ;
2140+ stepValues->encoderSettings .range = 10 .0f * FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE ;
21412141 stepValues->encoderSettings .step = 1 .0f ;
21422142 stepValues->encoderSettings .mode = edit_mode_step::g_scrollBarEncoderMode;
21432143
@@ -2176,7 +2176,7 @@ void data_function_generator_channels(DataOperationEnum operation, Cursor cursor
21762176 } else if (operation == DATA_OPERATION_YT_DATA_GET_POSITION_INCREMENT ) {
21772177 value = 1 ;
21782178 } else if (operation == DATA_OPERATION_YT_DATA_GET_PAGE_SIZE ) {
2179- value = FunctionGeneratorSelectChannelsPage::PAGE_SIZE ;
2179+ value = FunctionGeneratorSelectChannelsPage::FUNC_GEN_PAGE_SIZE ;
21802180 }
21812181 }
21822182}
0 commit comments