Skip to content

Commit e597072

Browse files
committed
Remove unused melody
1 parent 9ed6c8b commit e597072

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

buzzer/melody_notes.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,13 @@ enum {
9797
MELODY_GOTCHI_FAULT,
9898
MELODY_ESC_FAULT,
9999
MELODY_BLE_FAIL,
100-
MELODY_NOKIA,
101100
MELODY_BLE_SUCCESS,
102101
MELODY_STORAGE_LIMIT,
103102
MELODY_ESC_TEMP,
104103
MELODY_MOTOR_TEMP,
105104
MELODY_VOLTAGE_LOW,
106-
MELODY_ASC,
107-
MELODY_DESC,
105+
MELODY_LOG_START,
106+
MELODY_LOG_STOP,
108107
MELODY_STARTUP,
109108
MELODY_GPS_LOCK,
110109
MELODY_GPS_LOST,
@@ -149,16 +148,6 @@ const int melody_ble_fail[] = {
149148
};
150149
const int tempo_ble_fail = 360;
151150

152-
const int melody_nokia[] = {
153-
// Nokia Ringtone
154-
// Score available at https://musescore.com/user/29944637/scores/5266155
155-
NOTE_E5, 8, NOTE_D5, 8, NOTE_FS4, 4, NOTE_GS4, 4,
156-
NOTE_CS5, 8, NOTE_B4, 8, NOTE_D4, 4, NOTE_E4, 4,
157-
NOTE_B4, 8, NOTE_A4, 8, NOTE_CS4, 4, NOTE_E4, 4,
158-
NOTE_A4, 2,
159-
};
160-
const int tempo_nokia = 180;
161-
162151
const int melody_ble_success[] = {
163152
NOTE_D4,4, NOTE_D4,4, NOTE_G4,4
164153
};

main.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ void melody_play(int index, bool interrupt_melody)
230230
melody_notes=sizeof(melody_ble_fail)/sizeof(melody_ble_fail[0])/2;
231231
melody_wholenote = (60000 * 4) / tempo_ble_fail;
232232
break;
233-
case MELODY_NOKIA:
234-
melody = (int*)&melody_nokia;
235-
melody_notes=sizeof(melody_nokia)/sizeof(melody_nokia[0])/2;
236-
melody_wholenote = (60000 * 4) / tempo_nokia;
237-
break;
238233
case MELODY_BLE_SUCCESS:
239234
melody = (int*)&melody_ble_success;
240235
melody_notes=sizeof(melody_ble_success)/sizeof(melody_ble_success[0])/2;
@@ -264,12 +259,12 @@ void melody_play(int index, bool interrupt_melody)
264259
melody_wholenote = (60000 * 4) / tempo_voltage_low;
265260
melody_last_alert_index = MELODY_VOLTAGE_LOW;
266261
break;
267-
case MELODY_ASC:
262+
case MELODY_LOG_START:
268263
melody = (int*)&melody_ascending;
269264
melody_notes=sizeof(melody_ascending)/sizeof(melody_ascending[0])/2;
270265
melody_wholenote = (60000 * 4) / tempo_ascending;
271266
break;
272-
case MELODY_DESC:
267+
case MELODY_LOG_STOP:
273268
melody = (int*)&melody_descending;
274269
melody_notes=sizeof(melody_descending)/sizeof(melody_descending[0])/2;
275270
melody_wholenote = (60000 * 4) / tempo_descending;
@@ -2059,7 +2054,7 @@ int log_file_stop()
20592054
int lfs_close_result = lfs_file_close(&lfs, &file);
20602055
NRF_LOG_INFO("log_file_stop::lfs_file_close() result: %d", lfs_close_result);
20612056
NRF_LOG_FLUSH();
2062-
melody_play(MELODY_DESC, true); // Play log stop melody, interrupt
2057+
melody_play(MELODY_LOG_STOP, true); // Play log stop melody, interrupt
20632058
return lfs_close_result;
20642059
}
20652060
return -1;
@@ -2138,7 +2133,7 @@ void log_file_start()
21382133
NRF_LOG_INFO("LOG_HEADER Bytes Written: %ld", bytes_written);
21392134
NRF_LOG_FLUSH();
21402135

2141-
melody_play(MELODY_ASC, false); // Play log started melody, do not interrupt
2136+
melody_play(MELODY_LOG_START, false); // Play log started melody, do not interrupt
21422137
} else {
21432138
NRF_LOG_ERROR("log_file_start::lfs_file_open: Failed with result: %d", file_open_result);
21442139
NRF_LOG_FLUSH();

0 commit comments

Comments
 (0)