@@ -327,7 +327,7 @@ float getMax(WaveformParameters &waveformParameters) {
327
327
328
328
class FunctionGeneratorPage : public SetPage {
329
329
public:
330
- static const int PAGE_SIZE = 4 ;
330
+ static const int FUNC_GEN_PAGE_SIZE = 4 ;
331
331
332
332
bool m_initialized = false ;
333
333
@@ -698,14 +698,14 @@ class FunctionGeneratorPage : public SetPage {
698
698
}
699
699
700
700
void setScrollPosition (int scrollPosition) {
701
- if (g_selectedResources.m_numResources <= PAGE_SIZE ) {
701
+ if (g_selectedResources.m_numResources <= FUNC_GEN_PAGE_SIZE ) {
702
702
return ;
703
703
}
704
704
705
705
if (scrollPosition < 0 ) {
706
706
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 ;
709
709
}
710
710
711
711
if (scrollPosition != m_scrollPosition) {
@@ -773,7 +773,7 @@ void initWaveformParameters(WaveformParameters &waveformParameters) {
773
773
774
774
class FunctionGeneratorSelectChannelsPage : public SetPage {
775
775
public:
776
- static const int PAGE_SIZE = 7 ;
776
+ static const int FUNC_GEN_PAGE_SIZE = 7 ;
777
777
778
778
void pageAlloc () {
779
779
AllResources::reset ();
@@ -839,14 +839,14 @@ class FunctionGeneratorSelectChannelsPage : public SetPage {
839
839
}
840
840
841
841
void setScrollPosition (int scrollPosition) {
842
- if (AllResources::getNumResources () <= PAGE_SIZE ) {
842
+ if (AllResources::getNumResources () <= FUNC_GEN_PAGE_SIZE ) {
843
843
return ;
844
844
}
845
845
846
846
if (scrollPosition < 0 ) {
847
847
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 ;
850
850
}
851
851
852
852
if (scrollPosition != m_scrollPosition) {
@@ -1180,8 +1180,8 @@ void selectWaveformParametersForChannel(int slotIndex, int subchannelIndex, int
1180
1180
if (tmpSlotIndex == slotIndex && tmpSubchannelIndex == subchannelIndex && (resourceIndex == -1 || tmpResourceIndex == resourceIndex)) {
1181
1181
g_functionGeneratorPage.m_selectedItem = i;
1182
1182
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 );
1185
1185
}
1186
1186
1187
1187
break ;
@@ -2118,26 +2118,26 @@ void data_function_generator_channels(DataOperationEnum operation, Cursor cursor
2118
2118
} else if (operation == DATA_OPERATION_YT_DATA_GET_POSITION_INCREMENT) {
2119
2119
value = 1 ;
2120
2120
} else if (operation == DATA_OPERATION_YT_DATA_GET_PAGE_SIZE) {
2121
- value = FunctionGeneratorPage::PAGE_SIZE ;
2121
+ value = FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE ;
2122
2122
}
2123
2123
// scrollbar encoder support
2124
2124
else if (operation == DATA_OPERATION_GET) {
2125
2125
value = MakeValue (1 .0f * g_functionGeneratorPage.getScrollPosition (), UNIT_NONE);
2126
2126
} else if (operation == DATA_OPERATION_GET_MIN) {
2127
2127
value = MakeValue (0 , UNIT_NONE);
2128
2128
} 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);
2130
2130
} else if (operation == DATA_OPERATION_GET_ENCODER_STEP_VALUES) {
2131
2131
auto stepValues = value.getStepValues ();
2132
2132
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 };
2134
2134
2135
2135
stepValues->values = values;
2136
2136
stepValues->count = sizeof (values) / sizeof (float );
2137
2137
stepValues->unit = UNIT_NONE;
2138
2138
2139
2139
stepValues->encoderSettings .accelerationEnabled = true ;
2140
- stepValues->encoderSettings .range = 10 .0f * FunctionGeneratorPage::PAGE_SIZE ;
2140
+ stepValues->encoderSettings .range = 10 .0f * FunctionGeneratorPage::FUNC_GEN_PAGE_SIZE ;
2141
2141
stepValues->encoderSettings .step = 1 .0f ;
2142
2142
stepValues->encoderSettings .mode = edit_mode_step::g_scrollBarEncoderMode;
2143
2143
@@ -2176,7 +2176,7 @@ void data_function_generator_channels(DataOperationEnum operation, Cursor cursor
2176
2176
} else if (operation == DATA_OPERATION_YT_DATA_GET_POSITION_INCREMENT) {
2177
2177
value = 1 ;
2178
2178
} else if (operation == DATA_OPERATION_YT_DATA_GET_PAGE_SIZE) {
2179
- value = FunctionGeneratorSelectChannelsPage::PAGE_SIZE ;
2179
+ value = FunctionGeneratorSelectChannelsPage::FUNC_GEN_PAGE_SIZE ;
2180
2180
}
2181
2181
}
2182
2182
}
0 commit comments