197 lines
4.5 KiB
C
197 lines
4.5 KiB
C
/***************************************************************************
|
|
* Copyright (C) 2022 by Federico Amedeo Izzo IU2NUO, *
|
|
* Niccolò Izzo IU2KIN, *
|
|
* Silvano Seva IU2KWO *
|
|
* Joseph Stephen VK7JS *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 3 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU General Public License *
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/> *
|
|
***************************************************************************/
|
|
#ifndef VOICE_PROMPT_UTILS_H
|
|
#define VOICE_PROMPT_UTILS_H
|
|
|
|
#include "cps.h"
|
|
#include "ui/ui_strings.h"
|
|
#include "voicePrompts.h"
|
|
|
|
/*
|
|
Please Note!
|
|
|
|
Many of the functions take queue flags because sometimes messages must be
|
|
played in sequence (i.e. the announceXX functions may be called one after the
|
|
other) and thus the init must only be sent prior to the first message queued
|
|
and the play must only be invoked after the last message queued.
|
|
|
|
When an announceXX function is called in isolation, vpqInit|vpqPlayImmediately
|
|
should be used to ensure that the message interupts the current prompt and
|
|
plays immediately.
|
|
*/
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceVFO();
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceChannelName(const channel_t* channel,
|
|
const uint16_t channelIndex,
|
|
const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_queueFrequency(const freq_t freq);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceFrequencies(const freq_t rx, const freq_t tx,
|
|
const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceRadioMode(const uint8_t mode, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceBandwidth(const uint8_t bandwidth, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceChannelSummary(const channel_t* channel,
|
|
const uint16_t channelIndex, const uint16_t bank);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceInputChar(const char ch);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceInputReceiveOrTransmit(const bool tx, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_replayLastPrompt();
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceError(const vpQueueFlags_t flags);
|
|
|
|
/*
|
|
This function first tries to see if we have a prompt for the text
|
|
passed in and if so, queues it, but if not, just spells the text
|
|
character by character.
|
|
*/
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceText(const char* text, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceCTCSS(const bool rxToneEnabled, const uint8_t rxTone,
|
|
const bool txToneEnabled, const uint8_t txTone,
|
|
const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_anouncePower(const float power, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceBrightness(const uint8_t brightness, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceSquelch(const uint8_t squelch,const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceContact(const contact_t* contact, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceContactWithIndex(const uint16_t index, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceTimeslot(const uint8_t timeslot, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceColorCode(const uint8_t rxColorCode, const uint8_t txColorCode,
|
|
const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceBank(const uint16_t bank, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceM17Info(const channel_t* channel, const vpQueueFlags_t flags);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
#ifdef GPS_PRESENT
|
|
void vp_announceGPSInfo();
|
|
#endif
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceAboutScreen();
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceBackupScreen();
|
|
|
|
/**
|
|
*
|
|
*/
|
|
void vp_announceRestoreScreen();
|
|
|
|
/**
|
|
*
|
|
*/
|
|
#ifdef RTC_PRESENT
|
|
void vp_announceSettingsTimeDate();
|
|
#endif
|
|
|
|
/**
|
|
*
|
|
*/
|
|
vpQueueFlags_t vp_getVoiceLevelQueueFlags();
|
|
|
|
#endif // VOICE_PROMPT_UTILS_H
|