Skip to content

Commit

Permalink
sound updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Nov 16, 2019
1 parent 1400aa0 commit 8710027
Show file tree
Hide file tree
Showing 9 changed files with 830 additions and 1,211 deletions.
4 changes: 2 additions & 2 deletions modular-psu-firmware.eez-project
Original file line number Diff line number Diff line change
Expand Up @@ -24179,7 +24179,7 @@
},
"left": 8,
"top": 8,
"width": 130,
"width": 122,
"height": 32,
"text": "Sound:",
"focusStyle": {}
Expand Down Expand Up @@ -24231,7 +24231,7 @@
},
"left": 8,
"top": 46,
"width": 130,
"width": 122,
"height": 32,
"text": "Click sound:",
"focusStyle": {}
Expand Down
5 changes: 1 addition & 4 deletions src/eez/gui/action_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,10 +808,7 @@ void action_trigger_toggle_initiate_continuously() {
}

void action_trigger_generate_manual() {
if (trigger::generateTrigger(trigger::SOURCE_MANUAL, false) != SCPI_ERROR_TRIGGER_IGNORED) {
sound::playClick();
return;
}
trigger::generateTrigger(trigger::SOURCE_MANUAL, false);
}

void action_trigger_show_general_settings() {
Expand Down
9 changes: 3 additions & 6 deletions src/eez/modules/psu/gui/edit_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ int getInfoTextPartIndex(data::Cursor &cursor, uint16_t dataId) {
dataIdIndex = 14;
}

return g_focusCursor.i * NUM_PARTS + dataIdIndex;
return (g_focusCursor.i + 1) * NUM_PARTS + dataIdIndex;
}

void getInfoText(int partIndex, char *infoText) {
Expand Down Expand Up @@ -288,14 +288,13 @@ void getInfoText(int partIndex, char *infoText) {
unitName = "";
}

cursorIndex--;
data::Cursor cursor(cursorIndex);
float minValue = data::getMin(cursor, dataId).getFloat();
float maxValue = (dataId == DATA_ID_CHANNEL_U_EDIT || dataId == DATA_ID_CHANNEL_I_EDIT) ?
data::getLimit(cursor, dataId).getFloat() : data::getMax(cursor, dataId).getFloat();

#if OPTION_SD_CARD
if (dataId != DATA_ID_DLOG_VALUE_DIV && dataId != DATA_ID_DLOG_VALUE_OFFSET && dataId != DATA_ID_DLOG_TIME_OFFSET) {
#endif
if (cursorIndex >= 0) {
Channel& channel = Channel::get(cursorIndex);
if ((channel.channelIndex < 2 && channel_dispatcher::getCouplingType() != channel_dispatcher::COUPLING_TYPE_NONE) || channel.flags.trackingEnabled) {
strcpy(infoText, "Set ");
Expand All @@ -305,11 +304,9 @@ void getInfoText(int partIndex, char *infoText) {

strcat(infoText, dataName);
}
#if OPTION_SD_CARD
else {
strcat(infoText, dataName);
}
#endif

strcat(infoText, " [");
strcatFloat(infoText, minValue);
Expand Down
2 changes: 1 addition & 1 deletion src/eez/platform/stm32/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define DLOG_BUFFER_SIZE (1024 * 1024)

#define SOUND_TUNES_MEMORY (DLOG_BUFFER + DLOG_BUFFER_SIZE)
#define SOUND_TUNES_MEMORY_SIZE (256 * 1024)
#define SOUND_TUNES_MEMORY_SIZE (32 * 1024)

#define VRAM_SCREENSHOOT_JPEG_OUT_BUFFER (SOUND_TUNES_MEMORY + SOUND_TUNES_MEMORY_SIZE)
#define VRAM_SCREENSHOOT_JPEG_OUT_BUFFER_SIZE (256 * 1024)
Expand Down
Loading

0 comments on commit 8710027

Please sign in to comment.