struct atcMessage {
string msg;
bool repeating;
+ double counter; // count of how many seconds since the message was registered
+ double start_count; // value of counter at which display should start (seconds)
+ double stop_count; // value of counter at which display should stop (seconds)
int id;
+ double dsp_offset;
};
// ASSUMPTION - with two radios the list won't be long so we don't need to map the id's
private:
bool rep_msg; // Flag to indicate there is a repeating transmission to display
bool change_msg_flag; // Flag to indicate that the repeating message has changed
- float dsp_offset1; // Used to set the correct position of scrolling display
- float dsp_offset2;
+ double dsp_offset1; // Used to set the correct position of scrolling display
+ double dsp_offset2;
string rep_msg_str; // The repeating transmission to play
atcMessageList msgList;
atcMessageListIterator msgList_itr;
void unbind();
// Display any registered messages
- void update(int dt);
+ void update(double dt);
- // Register a single message for display when possible
- void RegisterSingleMessage(string msg); // OK - I know passing a string in and out is probably not good but it will have to do for now.
+ // Register a single message for display after a delay of delay seconds
+ // Will automatically stop displaying after a suitable interval.
+ void RegisterSingleMessage(string msg, double delay); // OK - I know passing a string in and out is probably not good but it will have to do for now.
// For now we will assume only one repeating message at once
// This is not really robust