2022-05-08 07:13:15 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* 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/> *
|
|
|
|
***************************************************************************/
|
2022-08-16 19:20:51 +00:00
|
|
|
#ifndef VOICE_PROMPT_UTILS_H
|
|
|
|
#define VOICE_PROMPT_UTILS_H
|
2022-06-22 18:21:18 +00:00
|
|
|
|
2022-05-08 07:13:15 +00:00
|
|
|
#include "cps.h"
|
2022-08-16 07:21:32 +00:00
|
|
|
#include "ui/ui_strings.h"
|
2022-06-22 18:21:18 +00:00
|
|
|
#include "voicePrompts.h"
|
2022-05-14 02:12:06 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Please Note!
|
|
|
|
|
2022-06-22 18:21:18 +00:00
|
|
|
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
|
2022-05-14 02:12:06 +00:00
|
|
|
and the play must only be invoked after the last message queued.
|
|
|
|
|
2022-06-22 18:21:18 +00:00
|
|
|
When an announceXX function is called in isolation, vpqInit|vpqPlayImmediately
|
|
|
|
should be used to ensure that the message interupts the current prompt and
|
2022-05-14 02:12:06 +00:00
|
|
|
plays immediately.
|
|
|
|
*/
|
2022-08-16 19:20:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2022-09-02 22:58:23 +00:00
|
|
|
* Note: channelNumber is 1-based, index is 0-based.
|
2022-08-16 19:20:51 +00:00
|
|
|
*/
|
|
|
|
void vp_announceChannelName(const channel_t* channel,
|
2022-09-02 22:58:23 +00:00
|
|
|
const uint16_t channelNumber,
|
2022-08-16 19:20:51 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
/**
|
2022-09-02 22:58:23 +00:00
|
|
|
* channelNumber is 1-based, channelIndex is 0-based.
|
2022-08-16 19:20:51 +00:00
|
|
|
*/
|
|
|
|
void vp_announceChannelSummary(const channel_t* channel,
|
2022-09-06 12:07:56 +00:00
|
|
|
const uint16_t channelNumber, const uint16_t bank,
|
|
|
|
const vpSummaryInfoFlags_t infoFlags);
|
2022-08-16 19:20:51 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
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);
|
2022-05-12 11:41:43 +00:00
|
|
|
|
2022-06-22 18:21:18 +00:00
|
|
|
/*
|
|
|
|
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
|
2022-05-12 11:41:43 +00:00
|
|
|
character by character.
|
|
|
|
*/
|
2022-08-16 19:20:51 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
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_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);
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2022-09-22 01:24:26 +00:00
|
|
|
void vp_announceM17Info(const channel_t* channel, bool isEditing, const vpQueueFlags_t flags);
|
2022-08-16 19:20:51 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2022-05-19 06:34:58 +00:00
|
|
|
#ifdef GPS_PRESENT
|
2022-09-13 05:40:12 +00:00
|
|
|
void vp_announceGPSInfo(vpGPSInfoFlags_t gpsInfoFlags);
|
2022-08-16 19:20:51 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void vp_announceAboutScreen();
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void vp_announceBackupScreen();
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void vp_announceRestoreScreen();
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2022-05-20 11:55:31 +00:00
|
|
|
#ifdef RTC_PRESENT
|
2022-08-16 19:20:51 +00:00
|
|
|
void vp_announceSettingsTimeDate();
|
|
|
|
#endif
|
|
|
|
|
2022-08-26 14:58:43 +00:00
|
|
|
/**
|
|
|
|
* This is called to speak voice prompt level changes.
|
|
|
|
*/
|
|
|
|
void vp_announceSettingsVoiceLevel(const vpQueueFlags_t flags);
|
|
|
|
|
2022-08-26 15:03:13 +00:00
|
|
|
/**
|
|
|
|
* This is called to speak generic settings on/off toggles.
|
|
|
|
*/
|
|
|
|
void vp_announceSettingsOnOffToggle(const char* const* stringTableStringPtr,
|
|
|
|
const vpQueueFlags_t flags, bool val);
|
|
|
|
|
2022-09-02 11:02:53 +00:00
|
|
|
/**
|
|
|
|
* This is called to speak generic settings int values.
|
|
|
|
*/
|
|
|
|
void vp_announceSettingsInt(const char* const* stringTableStringPtr,
|
|
|
|
const vpQueueFlags_t flags,
|
|
|
|
int val);
|
|
|
|
|
2022-09-01 11:43:53 +00:00
|
|
|
/**
|
|
|
|
* This function is called from ui_updateFSM to speak informational screens.
|
|
|
|
*/
|
|
|
|
void vp_announceScreen(uint8_t ui_screen);
|
|
|
|
|
2022-09-05 11:01:58 +00:00
|
|
|
/**
|
|
|
|
* This function is called from ui_updateFSM to speak string buffers.
|
|
|
|
*/
|
|
|
|
void vp_announceBuffer(const char* const* stringTableStringPtr, bool editMode,
|
2022-09-05 11:59:10 +00:00
|
|
|
bool callsign, const char* buffer);
|
2022-09-05 11:01:58 +00:00
|
|
|
|
2022-09-06 00:23:47 +00:00
|
|
|
/**
|
|
|
|
* This function is called from ui_updateFSM to speak display timer changes.
|
|
|
|
*/
|
|
|
|
void vp_announceDisplayTimer();
|
|
|
|
|
2022-08-16 19:20:51 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
vpQueueFlags_t vp_getVoiceLevelQueueFlags();
|
2022-09-06 02:18:45 +00:00
|
|
|
void vp_playMenuBeepIfNeeded(bool firstItem);
|
2022-05-14 05:54:51 +00:00
|
|
|
|
2022-08-16 19:20:51 +00:00
|
|
|
#endif // VOICE_PROMPT_UTILS_H
|