This commit is contained in:
RogueMaster
2022-10-16 18:33:37 -04:00
parent e25799a9f5
commit caa73ef28a
8 changed files with 163 additions and 28 deletions

View File

@@ -85,8 +85,8 @@ DTMFDolphinSceneData DTMFDolphinSceneDataRedboxUK = {
.block = DTMF_DOLPHIN_TONE_BLOCK_REDBOX_UK,
.tone_count = 2,
.tones = {
{"10p", 1000.0, 0.0, {0, 0, 3}, 1, 200, 0},
{"50p", 1000.0, 0.0, {1, 0, 3}, 1, 350, 0},
{"10p", 1000.0, 0.0, {0, 0, 5}, 1, 200, 0},
{"50p", 1000.0, 0.0, {1, 0, 5}, 1, 350, 0},
}
};
@@ -147,6 +147,19 @@ bool dtmf_dolphin_data_get_tone_frequencies(float *freq1, float *freq2, uint8_t
return false;
}
bool dtmf_dolphin_data_get_filter_data(uint16_t *pulses, uint16_t *pulse_ms, uint16_t *gap_ms, uint8_t row, uint8_t col) {
for (size_t i = 0; i < current_scene_data->tone_count; i++) {
DTMFDolphinTones tones = current_scene_data->tones[i];
if (tones.pos.row == row && tones.pos.col == col) {
pulses[0] = tones.pulses;
pulse_ms[0] = tones.pulse_ms;
gap_ms[0] = tones.gap_duration;
return true;
}
}
return false;
}
const char* dtmf_dolphin_data_get_tone_name(uint8_t row, uint8_t col) {
for (size_t i = 0; i < current_scene_data->tone_count; i++) {
DTMFDolphinTones tones = current_scene_data->tones[i];