Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Jun 12, 2021
1 parent 980b60b commit f6a944b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/eez/function_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ bool isActive() {
}

float getMax(WaveformParameters &waveformParameters) {
return waveformParameters.offset + waveformParameters.amplitude;
return waveformParameters.offset + waveformParameters.amplitude / 2.0f;
}

int checkLimits(int iChannel) {
Expand Down Expand Up @@ -2504,7 +2504,11 @@ void data_function_generator_is_dc(DataOperationEnum operation, Cursor cursor, V

void data_function_generator_any_selected(DataOperationEnum operation, Cursor cursor, Value &value) {
if (operation == DATA_OPERATION_GET) {
value = g_functionGeneratorSelectChannelsPage.m_selectedChannels != 0;
if (getActivePageId() == PAGE_ID_SYS_SETTINGS_FUNCTION_GENERATOR) {
value = g_functionGeneratorPage.m_selectedResources.m_numResources > 0;
} else {
value = g_functionGeneratorSelectChannelsPage.m_selectedChannels != 0;
}
}
}

Expand Down

0 comments on commit f6a944b

Please sign in to comment.